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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51158 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-06-15 15:49:22 +00:00
parent 68be2fe3c9
commit 8bb7054907
2 changed files with 7 additions and 4 deletions

View File

@ -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' );
}

View File

@ -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 '<div class="notice notice-warning inline"><p>' . __( 'You are currently editing the page that shows your latest posts.' ) . '</p></div>';
printf(
'<div class="notice notice-warning inline"><p>%s</p></div>',
__( '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