Changeset 7389
- Timestamp:
- 12/29/2025 05:07:24 PM (4 months ago)
- Location:
- trunk/src/includes
- Files:
-
- 2 edited
-
common/functions.php (modified) (2 diffs)
-
core/filters.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/functions.php
r7385 r7389 15 15 16 16 /** 17 * Return array of bbPress registered post type s.17 * Return array of bbPress registered post type names. 18 18 * 19 19 * @since 2.6.0 bbPress (r6813) … … 139 139 140 140 /** Misc **********************************************************************/ 141 142 /** 143 * Filters whether or not to use the block editor for bbPress post types. 144 * 145 * As of 2.7.0 this is explicitly false, because the `show_in_rest` property 146 * of each post type is now set to true, and because support for blocks in 147 * user-facing forum content is not properly handled yet. 148 * 149 * The default return value of this function is highly likely to change once 150 * the block editor is integrated into the Forum/Topic/Reply experience. 151 * 152 * If you're feeling adventurous or working on this feature, override this 153 * filter with 154 * 155 * @since 2.7.0 bbPress (r7388) 156 * 157 * @param bool $use Optional. Default false. If using. 158 * @param string $post_type Optional. Default empty string. The post type to check. 159 * 160 * @return bool 161 */ 162 function bbp_filter_use_block_editor_for_post_type( $use = false, $post_type = '' ) { 163 164 // Get bbPress post types 165 $bbp_post_types = bbp_get_post_types(); 166 167 // Compare post types 168 $is_post_type = in_array( $post_type, $bbp_post_types, true ); 169 $retval = ! $is_post_type; 170 171 // Filter & return 172 return (bool) apply_filters( 'bbp_filter_use_block_editor_for_post_type', $retval, $is_post_type, $use, $post_type ); 173 } 141 174 142 175 /** -
trunk/src/includes/core/filters.php
r7380 r7389 75 75 // User Creation 76 76 add_filter( 'signup_user_meta', 'bbp_user_add_role_to_signup_meta', 10 ); 77 78 // No block editor for bbPress post types 79 add_filter( 'use_block_editor_for_post_type', 'bbp_filter_use_block_editor_for_post_type', 10, 2 ); 77 80 78 81 /**
Note: See TracChangeset
for help on using the changeset viewer.