From 0def70a94c166bb737f6ccdaa3ec65608951d74f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 15 Jun 2021 15:50:58 +0000 Subject: [PATCH] Coding Standards: Use consistent formatting for `_wp_posts_page_notice()` and `_wp_block_editor_posts_page_notice()`. Remove redundant casting to `int` for post ID, which is always an integer. Follow-up to [51116]. See #45537, #52627. Built from https://develop.svn.wordpress.org/trunk@51158 git-svn-id: http://core.svn.wordpress.org/trunk@50767 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-blocks.php | 2 +- wp-admin/includes/template.php | 9 ++++++--- wp-includes/version.php | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index 408806b125..e757dc4fe8 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -313,7 +313,7 @@ $script = sprintf( ); wp_add_inline_script( 'wp-edit-post', $script ); -if ( (int) get_option( 'page_for_posts' ) === (int) $post->ID ) { +if ( (int) get_option( 'page_for_posts' ) === $post->ID ) { add_action( 'admin_enqueue_scripts', '_wp_block_editor_posts_page_notice' ); } diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index fedf3fcbc9..acdc12798d 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -2666,17 +2666,20 @@ function wp_star_rating( $args = array() ) { } /** - * Output a notice when editing the page for posts (internal use only). + * Outputs a notice when editing the page for posts (internal use only). * * @ignore * @since 4.2.0 */ function _wp_posts_page_notice() { - echo '

' . __( 'You are currently editing the page that shows your latest posts.' ) . '

'; + printf( + '

%s

', + __( 'You are currently editing the page that shows your latest posts.' ) + ); } /** - * Output a notice when editing the page for posts in the block editor (internal use only). + * Outputs a notice when editing the page for posts in the block editor (internal use only). * * @ignore * @since 5.8.0 diff --git a/wp-includes/version.php b/wp-includes/version.php index c73d2290df..2cdb7de3ff 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-beta1-51157'; +$wp_version = '5.8-beta1-51158'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.