Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/25/2023 10:17:33 PM (3 years ago)
Author:
imath
Message:

Update all BP Blocks & Modern JS PHP registration code

  • Use the metadata argument of the bp_register_block() function to load all BP Blocks JSON files.
  • Get BP Blocks dependencies using the @wordpress/scripts index.asset.php generated files.
  • Although the BP Blocks category has been replaced by the BP Blocks collection, leave the no more used bp_block_category() function in place in case some third party plugins are using it for their custom blocks.
  • PHPUnit tests: make sure to unregister all BP Blocks when using the BP_UnitTestCase->go_to() method.

See #8842
Fixes #8457
Closes https://github.com/buddypress/buddypress/pull/92

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-blocks.php

    r13096 r13464  
    3838
    3939        // Don't display the block if there are no Notices to show.
    40         $notice = \BP_Messages_Notice::get_active();
     40        $notice = BP_Messages_Notice::get_active();
    4141        if ( empty( $notice->id ) ) {
    4242                // Previewing the Block inside the editor.
Note: See TracChangeset for help on using the changeset viewer.