Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

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

    r47198 r47219  
    7777$action  = isset( $action ) ? $action : '';
    7878
    79 if ( $post_ID == get_option( 'page_for_posts' ) && empty( $post->post_content ) ) {
     79if ( get_option( 'page_for_posts' ) == $post_ID && empty( $post->post_content ) ) {
    8080    add_action( 'edit_form_after_title', '_wp_posts_page_notice' );
    8181    remove_post_type_support( $post_type, 'editor' );
     
    535535            $shortlink = wp_get_shortlink( $post->ID, 'post' );
    536536
    537             if ( ! empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url( '?page_id=' . $post->ID ) ) {
     537            if ( ! empty( $shortlink ) && $shortlink !== $permalink && home_url( '?page_id=' . $post->ID ) !== $permalink ) {
    538538                $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr( $shortlink ) . '" /><button type="button" class="button button-small" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val());">' . __( 'Get Shortlink' ) . '</button>';
    539539            }
Note: See TracChangeset for help on using the changeset viewer.