Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/25/2023 10:17:33 PM (13 months 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-core/admin/bp-core-admin-functions.php

    r13455 r13464  
    14571457 * @since 5.0.0
    14581458 * @since 8.0.0 The `bp_block_category_post_types` filter has been deprecated.
     1459 * @since 12.0.0 This category is left for third party plugin but not used anymmore.
     1460 *
     1461 * @todo deprecate.
    14591462 *
    14601463 * @param array          $categories Array of block categories.
     
    14771480            array(
    14781481                'slug'  => 'buddypress',
    1479                 'title' => __( 'BuddyPress', 'buddypress' ),
    1480                 'icon'  => 'buddicons-buddypress-logo',
     1482                'title' => __( 'Community blocks', 'buddypress' ),
     1483                'icon'  => 'buddicons-community',
    14811484            ),
    14821485        )
Note: See TracChangeset for help on using the changeset viewer.