Make WordPress Core

Changeset 51158


Ignore:
Timestamp:
06/15/2021 03:49:22 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-blocks.php

    r51116 r51158  
    314314wp_add_inline_script( 'wp-edit-post', $script );
    315315
    316 if ( (int) get_option( 'page_for_posts' ) === (int) $post->ID ) {
     316if ( (int) get_option( 'page_for_posts' ) === $post->ID ) {
    317317    add_action( 'admin_enqueue_scripts', '_wp_block_editor_posts_page_notice' );
    318318}
  • trunk/src/wp-admin/includes/template.php

    r51116 r51158  
    26672667
    26682668/**
    2669  * Output a notice when editing the page for posts (internal use only).
     2669 * Outputs a notice when editing the page for posts (internal use only).
    26702670 *
    26712671 * @ignore
     
    26732673 */
    26742674function _wp_posts_page_notice() {
    2675     echo '<div class="notice notice-warning inline"><p>' . __( 'You are currently editing the page that shows your latest posts.' ) . '</p></div>';
    2676 }
    2677 
    2678 /**
    2679  * Output a notice when editing the page for posts in the block editor (internal use only).
     2675    printf(
     2676        '<div class="notice notice-warning inline"><p>%s</p></div>',
     2677        __( 'You are currently editing the page that shows your latest posts.' )
     2678    );
     2679}
     2680
     2681/**
     2682 * Outputs a notice when editing the page for posts in the block editor (internal use only).
    26802683 *
    26812684 * @ignore
Note: See TracChangeset for help on using the changeset viewer.