Action hook 'block_editor_meta_box_hidden_fields'

in WP Core File wp-admin/includes/post.php at line 2602

View Source

block_editor_meta_box_hidden_fields

Action Hook
Description
Adds hidden input fields to the meta box save form. Hook into this action to print `` fields, which will be POSTed back to the server when meta boxes are saved.

Hook Information

File Location wp-admin/includes/post.php View on GitHub
Hook Type Action
Line Number 2602

Hook Parameters

Type Name Description
WP_Post $post The post that is being edited.

Usage Examples

Basic Usage
<?php
// Hook into block_editor_meta_box_hidden_fields
add_action('block_editor_meta_box_hidden_fields', 'my_custom_function', 10, 1);

function my_custom_function($post) {
    // Your custom code here
}

Source Code Context

wp-admin/includes/post.php:2602 - How this hook is used in WordPress core
<?php
2597  	 *
2598  	 * @since 5.0.0
2599  	 *
2600  	 * @param WP_Post $post The post that is being edited.
2601  	 */
2602  	do_action( 'block_editor_meta_box_hidden_fields', $post );
2603  }
2604  
2605  /**
2606   * Disables block editor for wp_navigation type posts so they can be managed via the UI.
2607   *

PHP Documentation

<?php
/**
	 * Adds hidden input fields to the meta box save form.
	 *
	 * Hook into this action to print `<input type="hidden" ... />` fields, which will be POSTed back to
	 * the server when meta boxes are saved.
	 *
	 * @since 5.0.0
	 *
	 * @param WP_Post $post The post that is being edited.
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-admin/includes/post.php
Related Hooks

Related hooks will be displayed here in future updates.