Changeset 12581
- Timestamp:
- 03/25/2020 10:12:18 AM (6 years ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 2 edited
-
bp-core-blocks.php (modified) (1 diff)
-
classes/class-bp-component.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-blocks.php
r12578 r12581 10 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 13 /** 14 * BuddyPress blocks require WordPress >= 5.0.0 & the BP REST API. 15 * 16 * @since 6.0.0 17 * 18 * @return bool True if the current installation supports BP Blocks. 19 * False otherwise. 20 */ 21 function bp_support_blocks() { 22 return function_exists( 'register_block_type' ) && bp_rest_api_is_available(); 23 } 12 24 13 25 /** -
trunk/src/bp-core/classes/class-bp-component.php
r12578 r12581 468 468 469 469 // Register BP Blocks. 470 if ( bp_ rest_api_is_available() ) {470 if ( bp_support_blocks() ) { 471 471 add_action( 'bp_blocks_init', array( $this, 'blocks_init' ), 10 ); 472 472 }
Note: See TracChangeset
for help on using the changeset viewer.