Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/12/2021 07:48:13 PM (5 years ago)
Author:
imath
Message:

Make sure all BP components init their BP Blocks

Even if some components don't have native BP Blocks, it makes it easier for developers to add their custom blocks or override existing BP Blocks or disable BP Blocks. Working on the BP Blocks feature as a plugin made us realize this.

This commit also improves the BP_Block constructor inline documentation, adds a new method to the Core component to register REST controllers and moves the BP_REST_Components_Endpoint one from the Members component to the Core component.

Fixes #8511

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-block.php

    r12661 r12994  
    4848     * @since 6.0.0
    4949     *
    50      * @param array $args The registration arguments for the BP Block.
     50     * @param array $args {
     51     *     The registration arguments for the BP Block. Part of the arguments are the ones
     52     *     used by `WP_Block_Type`. Below are BP specific arguments.
     53     *
     54     *     @type string $name               The name of the block (eg: `bp/member`).
     55     *     @type string $editor_script_url  URL to the JavaScript main file of the BP Block
     56     *                                      to load into the Block Editor.
     57     *     @type array  $editor_script_deps The list of JavaScript dependency handles for the
     58     *                                      BP Block main file.
     59     *     @type string $script_url         URL to the JavaScript file to load into the Block
     60     *                                      Editor and on front-end.
     61     *     @type array  $script_deps        The list of JavaScript dependency handles for the
     62     *                                      JavaScript file to load into the Block Editor and
     63     *                                      on front-end.
     64     *     @type string $editor_style_url   URL to the CSS main file of the BP Block to load
     65     *                                      into the Block Editor.
     66     *     @type array  $editor_style_deps  The list of CSS dependency handles for the
     67     *                                      CSS main file.
     68     *     @type string $style_url          URL to the CSS file to load into the Block Editor
     69     *                                      and on front-end.
     70     *     @type array  $style_deps         The list of CSS dependency handles for the CSS file
     71     *                                      to load into the Block Editor and on front-end.
     72     * }
    5173     */
    5274    public function __construct( $args ) {
Note: See TracChangeset for help on using the changeset viewer.