mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Coding Standards: Use Yoda conditions where appropriate.
See #49222. git-svn-id: https://develop.svn.wordpress.org/trunk@47219 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -76,7 +76,7 @@ $post_ID = isset( $post_ID ) ? (int) $post_ID : 0;
|
||||
$user_ID = isset( $user_ID ) ? (int) $user_ID : 0;
|
||||
$action = isset( $action ) ? $action : '';
|
||||
|
||||
if ( $post_ID == get_option( 'page_for_posts' ) && empty( $post->post_content ) ) {
|
||||
if ( get_option( 'page_for_posts' ) == $post_ID && empty( $post->post_content ) ) {
|
||||
add_action( 'edit_form_after_title', '_wp_posts_page_notice' );
|
||||
remove_post_type_support( $post_type, 'editor' );
|
||||
}
|
||||
@@ -534,7 +534,7 @@ do_action( 'edit_form_top', $post );
|
||||
if ( has_filter( 'pre_get_shortlink' ) || has_filter( 'get_shortlink' ) ) {
|
||||
$shortlink = wp_get_shortlink( $post->ID, 'post' );
|
||||
|
||||
if ( ! empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url( '?page_id=' . $post->ID ) ) {
|
||||
if ( ! empty( $shortlink ) && $shortlink !== $permalink && home_url( '?page_id=' . $post->ID ) !== $permalink ) {
|
||||
$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr( $shortlink ) . '" /><button type="button" class="button button-small" onclick="prompt('URL:', jQuery(\'#shortlink\').val());">' . __( 'Get Shortlink' ) . '</button>';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user