diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 0e6370d17f..f79c95428d 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1069,7 +1069,7 @@ function update_meta( $meta_id, $meta_key, $meta_value ) { // /** - * Replace hrefs of attachment anchors with up-to-date permalinks. + * Replaces hrefs of attachment anchors with up-to-date permalinks. * * @since 2.3.0 * @access private @@ -1361,6 +1361,7 @@ function postbox_classes( $box_id, $screen_id ) { * @param string[] $classes An array of postbox classes. */ $classes = apply_filters( "postbox_classes_{$screen_id}_{$box_id}", $classes ); + return implode( ' ', $classes ); } @@ -2336,12 +2337,12 @@ function the_block_editor_meta_boxes() { } } - /** + /* * Sadly we probably cannot add this data directly into editor settings. * - * Some meta boxes need admin_head to fire for meta box registry. - * admin_head fires after admin_enqueue_scripts, which is where we create our - * editor instance. + * Some meta boxes need `admin_head` to fire for meta box registry. + * `admin_head` fires after `admin_enqueue_scripts`, which is where we create + * our editor instance. */ $script = 'window._wpLoadBlockEditor.then( function() { wp.data.dispatch( \'core/edit-post\' ).setAvailableMetaBoxesPerLocation( ' . wp_json_encode( $meta_boxes_per_location ) . ' ); @@ -2349,19 +2350,21 @@ function the_block_editor_meta_boxes() { wp_add_inline_script( 'wp-edit-post', $script ); - /** - * When `wp-edit-post` is output in the ``, the inline script needs to be manually printed. Otherwise, - * meta boxes will not display because inline scripts for `wp-edit-post` will not be printed again after this point. + /* + * When `wp-edit-post` is output in the ``, the inline script needs to be manually printed. + * Otherwise, meta boxes will not display because inline scripts for `wp-edit-post` + * will not be printed again after this point. */ if ( wp_script_is( 'wp-edit-post', 'done' ) ) { printf( "\n", trim( $script ) ); } - /** - * If the 'postcustom' meta box is enabled, then we need to perform some - * extra initialization on it. + /* + * If the 'postcustom' meta box is enabled, then we need to perform + * some extra initialization on it. */ $enable_custom_fields = (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ); + if ( $enable_custom_fields ) { $script = "( function( $ ) { if ( $('#postcustom').length ) { @@ -2405,8 +2408,9 @@ function the_block_editor_meta_box_post_form_hidden_fields( $post ) { wp_nonce_field( $nonce_action ); /* - * 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. + * Some meta boxes hook into these actions to add hidden input fields in the classic post form. + * For backward compatibility, we can capture the output from these actions, + * and extract the hidden input fields. */ ob_start(); /** This filter is documented in wp-admin/edit-form-advanced.php */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 9492316073..303f731dc6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53055'; +$wp_version = '6.0-alpha-53056'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.