Changeset 12944
- Timestamp:
- 05/09/2021 04:45:15 PM (4 years ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-functions.php
r12927 r12944 1345 1345 ); 1346 1346 } 1347 add_filter( 'block_categories', 'bp_block_category', 1, 2 ); 1347 1348 /** 1349 * Select the right `block_categories` filter according to WP version. 1350 * 1351 * @since 8.0.0 1352 */ 1353 function bp_block_init_category_filter() { 1354 if ( function_exists( 'get_default_block_categories' ) ) { 1355 add_filter( 'block_categories_all', 'bp_block_category', 1, 2 ); 1356 } else { 1357 add_filter( 'block_categories', 'bp_block_category', 1, 2 ); 1358 } 1359 } 1360 add_action( 'bp_init', 'bp_block_init_category_filter' ); -
trunk/src/bp-core/bp-core-blocks.php
r12745 r12944 68 68 return $editor_settings; 69 69 } 70 add_filter( 'block_editor_settings', 'bp_blocks_editor_settings' ); 70 71 /** 72 * Select the right `block_editor_settings` filter according to WP version. 73 * 74 * @since 8.0.0 75 */ 76 function bp_block_init_editor_settings_filter() { 77 if ( function_exists( 'get_block_editor_settings' ) ) { 78 add_filter( 'block_editor_settings_all', 'bp_blocks_editor_settings' ); 79 } else { 80 add_filter( 'block_editor_settings', 'bp_blocks_editor_settings' ); 81 } 82 } 83 add_action( 'bp_init', 'bp_block_init_editor_settings_filter' ); 71 84 72 85 /**
Note: See TracChangeset
for help on using the changeset viewer.