filter_block_editor_meta_boxes
Filter HookDescription
Fires right before the meta boxes are rendered. This allows for the filtering of meta box data, that should already be present by this point. Do not use as a means of adding meta box data.Hook Information
| File Location |
wp-admin/includes/post.php
View on GitHub
|
| Hook Type | Filter |
| Line Number | 2375 |
Hook Parameters
| Type | Name | Description |
|---|---|---|
array
|
$wp_meta_boxes
|
Global meta box state. |
Usage Examples
Basic Usage
<?php
// Hook into filter_block_editor_meta_boxes
add_filter('filter_block_editor_meta_boxes', 'my_custom_filter', 10, 1);
function my_custom_filter($wp_meta_boxes) {
// Your custom filtering logic here
return $wp_meta_boxes;
}
Source Code Context
wp-admin/includes/post.php:2375
- How this hook is used in WordPress core
<?php
2370 *
2371 * @since 5.0.0
2372 *
2373 * @param array $wp_meta_boxes Global meta box state.
2374 */
2375 $wp_meta_boxes = apply_filters( 'filter_block_editor_meta_boxes', $wp_meta_boxes );
2376 $locations = array( 'side', 'normal', 'advanced' );
2377 $priorities = array( 'high', 'sorted', 'core', 'default', 'low' );
2378
2379 // Render meta boxes.
2380 ?>
PHP Documentation
<?php
/**
* Fires right before the meta boxes are rendered.
*
* This allows for the filtering of meta box data, that should already be
* present by this point. Do not use as a means of adding meta box data.
*
* @since 5.0.0
*
* @param array $wp_meta_boxes Global meta box state.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/post.php
Related Hooks
Related hooks will be displayed here in future updates.