Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
358a8fb
Initial pass of adding blocks.
georgestephanis Dec 16, 2020
ad3bd69
Yeah, and don't build the sass like this, it comes out in the wrong d…
georgestephanis Dec 16, 2020
abead7f
Add instructions keys to the placeholders.
georgestephanis Dec 16, 2020
18c8236
Add "New Forum Form" block.
georgestephanis Dec 16, 2020
5a10396
Simplify and abstract out a ForumPicker component.
georgestephanis Dec 16, 2020
d4bc55c
Add stats block.
georgestephanis Dec 16, 2020
27e7094
Use the BlockIcon component in placeholders.
georgestephanis Dec 16, 2020
bf5e3f4
User account blocks.
georgestephanis Dec 16, 2020
aa4ff5d
Add search results and search form blocks.
georgestephanis Dec 16, 2020
71e276b
Ignore the built js from jshint.
georgestephanis Dec 16, 2020
bbdde69
Add textdomain.
georgestephanis Dec 16, 2020
1b08f81
Four more blocks.
georgestephanis Dec 16, 2020
b037b8d
Add in textfield stubs for the pickers and start the blocks.
georgestephanis Dec 17, 2020
de7d0fa
Flesh out the pickers to specify a bit more closely what they want un…
georgestephanis Dec 17, 2020
ce647bb
Only localize the forum count and post type, not the forum list.
adamsilverstein Dec 19, 2020
7b66efa
ForumPicker : add data, hierarchical items and searchable combobox se…
adamsilverstein Dec 19, 2020
823f84e
Add a command to watch block files w/ npm run watch.
adamsilverstein Dec 19, 2020
da3baee
Build artifacts.
adamsilverstein Dec 19, 2020
7a366ff
Improve count, selection.
adamsilverstein Dec 19, 2020
aa761bf
Merge pull request #1 from adamsilverstein/add/blocks-data
georgestephanis Dec 21, 2020
e596ff1
Merge branch 'master' into add/blocks
georgestephanis Jun 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/phpcs.xml
/phpunit.xml
/pnpm-lock.yaml
/.cache

# Output directory.
/build/
Expand Down
6 changes: 5 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@
"Backbone": false,
"jQuery": false,
"wp": false
}
},

"ignores": [
"src/includes/admin/assets/js/blocks.js"
]
}
13,047 changes: 10,047 additions & 3,000 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"grunt-wp-i18n": "~1.0.3",
"matchdep": "~2.0.0",
"node-sass": "~4.14.1",
"parcel-bundler": "^1.10.1",
"postcss-scss": "~1.0.2",
"stylelint": "~13.6.1",
"stylelint-config-wordpress": "~15.0.0"
Expand All @@ -35,6 +36,10 @@
"node": ">=12.0.0",
"npm": ">=6.9.0"
},
"scripts": {
"blocks": "parcel build src/includes/admin/assets/js/blocks.jsx --out-dir src/includes/admin/assets/js --public-url .",
"watch": "parcel watch src/includes/admin/assets/js/blocks.jsx --out-dir src/includes/admin/assets/js --public-url ."
},
"keywords": [
"community",
"forums",
Expand Down
5 changes: 4 additions & 1 deletion src/bbpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ private function includes() {
require $this->includes_dir . 'common/template.php';
require $this->includes_dir . 'common/widgets.php';
require $this->includes_dir . 'common/shortcodes.php';
require $this->includes_dir . 'common/blocks.php';

// Forums
require $this->includes_dir . 'forums/capabilities.php';
Expand Down Expand Up @@ -521,6 +522,7 @@ public static function register_post_types() {
'show_in_nav_menus' => true,
'public' => true,
'show_ui' => current_user_can( 'bbp_forums_admin' ),
'show_in_rest' => true,
'can_export' => true,
'hierarchical' => true,
'query_var' => true,
Expand Down Expand Up @@ -734,12 +736,13 @@ public static function register_views() {
}

/**
* Register the bbPress shortcodes
* Register the bbPress shortcodes and blocks
*
* @since 2.0.0 bbPress (r3031)
*/
public function register_shortcodes() {
$this->shortcodes = new BBP_Shortcodes();
$this->blocks = new BBP_Blocks( $this->shortcodes );
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/includes/admin/assets/css/blocks.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

/* Blocks styling goes here */
Loading