Make WordPress Core

Ticket #34004: 34004.diff

File 34004.diff, 886 bytes (added by westonruter, 11 years ago)
  • src/wp-admin/includes/template-functions.php

    diff --git src/wp-admin/includes/template-functions.php src/wp-admin/includes/template-functions.php
    index 7860f19..e9b3000 100644
    function _post_states($post) { 
    16311631                $post_states['scheduled'] = __( 'Scheduled' );
    16321632        }
    16331633
    1634         if ( get_option( 'page_on_front' ) == $post->ID ) {
    1635                 $post_states['page_on_front'] = __( 'Front Page' );
    1636         }
     1634        if ( 'page' === get_option( 'show_on_front' ) ) {
     1635                if ( intval( get_option( 'page_on_front' ) ) === $post->ID ) {
     1636                        $post_states['page_on_front'] = __( 'Front Page' );
     1637                }
    16371638
    1638         if ( get_option( 'page_for_posts' ) == $post->ID ) {
    1639                 $post_states['page_for_posts'] = __( 'Posts Page' );
     1639                if ( intval( get_option( 'page_for_posts' ) ) === $post->ID ) {
     1640                        $post_states['page_for_posts'] = __( 'Posts Page' );
     1641                }
    16401642        }
    16411643
    16421644        /**