Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed May 31, 2021
0 parents commit 8d6cc7b
Show file tree
Hide file tree
Showing 8 changed files with 44,325 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
/node_modules/
1 change: 1 addition & 0 deletions build/index.asset.php
@@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-components', 'wp-edit-post', 'wp-element', 'wp-plugins', 'wp-polyfill'), 'version' => 'f9d5280a8777e3cefd08cc2313a9e373');
1 change: 1 addition & 0 deletions build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions jsconfig.json
@@ -0,0 +1 @@
{}
44,253 changes: 44,253 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions package.json
@@ -0,0 +1,24 @@
{
"name": "post-kinds-sidebar",
"version": "1.0.0",
"description": "",
"main": "build/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "wp-scripts build",
"start": "wp-scripts start"
},
"keywords": [],
"author": "chee <chee@snoot.club>",
"license": "CC0-1.0",
"devDependencies": {
"@wordpress/scripts": "^16.1.1"
},
"dependencies": {
"@wordpress/components": "^14.1.1",
"@wordpress/compose": "^4.1.1",
"@wordpress/edit-post": "^4.1.3",
"@wordpress/element": "^3.1.1",
"@wordpress/plugins": "^3.1.1"
}
}
12 changes: 12 additions & 0 deletions post-kinds-sidebar.php
@@ -0,0 +1,12 @@
<?php
/**
* Plugin Name: Post Kinds Sidebar
* Plugin URI: https://git.snoot.club/chee/post-kinds-sidebar
* Description: All the things a rabbit needs to post a post kind with gutenberg
* Version: 1.0.0
* Released: May 21st 2021
* Author: chee rabbits
* Author URI: https://chee.snoot.club
* License: CC0-1.0
**/
?>
32 changes: 32 additions & 0 deletions src/index.js
@@ -0,0 +1,32 @@
import {registerPlugin} from "@wordpress/plugins"
import {PluginSidebar} from "@wordpress/edit-post"
import {
SelectControl,
TextControl
} from "@wordpress/components"

let kind = "note"

registerPlugin("post-kinds-sidebar", {
render () {
return (
<PluginSidebar
name="post-kinds"
icon="admin-post"
title="Post kinds">
<SelectControl
label="Post Kind"
value={kind}
onChange={k => kind = k}
options={[
{label: "Note", value: "note"},
{label: "Article", value: "article"},
{label: "Like", value: "like"},
{label: "Reply", value: "reply"},
{label: "RSVP", value: "rsvp"}
]}
/>
</PluginSidebar>
)
}
})

0 comments on commit 8d6cc7b

Please sign in to comment.