Block Editor: Remove a deprecated notice being generated by the meta box compat functions.
Props pento. Merges [44248] into trunk. Fixes #45456. Built from https://develop.svn.wordpress.org/trunk@44315 git-svn-id: http://core.svn.wordpress.org/trunk@44145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
75dfa5f7f6
commit
1a4d511696
|
@ -2367,26 +2367,13 @@ function the_block_editor_meta_box_post_form_hidden_fields( $post ) {
|
||||||
* Some meta boxes hook into these actions to add hidden input fields in the classic post form. For backwards
|
* Some meta boxes hook into these actions to add hidden input fields in the classic post form. For backwards
|
||||||
* compatibility, we can capture the output from these actions, and extract the hidden input fields.
|
* compatibility, we can capture the output from these actions, and extract the hidden input fields.
|
||||||
*/
|
*/
|
||||||
$actions = array(
|
|
||||||
'edit_form_after_title',
|
|
||||||
'edit_form_advanced',
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ( $actions as $action ) {
|
|
||||||
ob_start();
|
ob_start();
|
||||||
do_action_deprecated(
|
/** This filter is documented in wp-admin/edit-form-advanced.php */
|
||||||
$action,
|
do_action( 'edit_form_after_title', $post );
|
||||||
array( $post ),
|
/** This filter is documented in wp-admin/edit-form-advanced.php */
|
||||||
'5.0.0',
|
do_action( 'edit_form_advanced', $post );
|
||||||
'block_editor_meta_box_hidden_fields',
|
|
||||||
__( 'This action is still supported in the classic editor, but is deprecated in the block editor.' )
|
|
||||||
);
|
|
||||||
$classic_output = ob_get_clean();
|
$classic_output = ob_get_clean();
|
||||||
|
|
||||||
if ( ! $classic_output ) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$classic_elements = wp_html_split( $classic_output );
|
$classic_elements = wp_html_split( $classic_output );
|
||||||
$hidden_inputs = '';
|
$hidden_inputs = '';
|
||||||
foreach ( $classic_elements as $element ) {
|
foreach ( $classic_elements as $element ) {
|
||||||
|
@ -2398,7 +2385,6 @@ function the_block_editor_meta_box_post_form_hidden_fields( $post ) {
|
||||||
echo $element;
|
echo $element;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_id; ?>" />
|
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_id; ?>" />
|
||||||
<input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ); ?>" />
|
<input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ); ?>" />
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.1-alpha-44314';
|
$wp_version = '5.1-alpha-44315';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue