[buddypress-trac] [BuddyPress Trac] #8048: BuddyPress Blocks !

buddypress-trac noreply at wordpress.org
Wed Mar 25 07:31:11 UTC 2020


#8048: BuddyPress Blocks !
-------------------------+---------------------
 Reporter:  imath        |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  6.0.0
Component:  REST API     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+---------------------

Comment (by imath):

 In [changeset:"12578" 12578]:
 {{{
 #!CommitTicketReference repository="" revision="12578"
 Introduce the BP Blocks API into BP Core

 - The `BP_Block` class is wrapping the `WP_Block_Type` one to manage
 JavaScript and CSS assets registration and script translations.
 - To register a new BP Block, we are introducing a new function using this
 `BP_Block` class : `bp_register_block()`.
 - Registering BP Blocks needs to happen hooking the `bp_blocks_init`
 action.
 - The `BP_Component` class now includes a new method BuddyPress components
 can use to register their blocks. It also makes sure this method is only
 usable if the BP REST API is available.
 - The dynamic filter `bp_{component_id}_register_blocks` let developers
 add or disable BP component blocks.
 - A dynamic action `bp_{component_id}_blocks_init` is fired once all
 corresponding BP component blocks has been registered.
 - The `bp_blocks_editor_settings` filter is gathering specific BuddyPress
 editor settings into a `bp` object.

 See #8048
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8048#comment:19>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list