mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Customize: Prevent showing "Front Page" and "Posts Page" states for pages in list table when show_on_front
is not "page".
Changing the `show_on_front` option back to "posts" also resets the `page_on_front` and `page_for_posts` options when updating via the Reading settings page. In the Customizer, however, this is not the case as these other options remain unchanged. This change accounts for this difference in behavior. Fixes #34004. Built from https://develop.svn.wordpress.org/trunk@34605 git-svn-id: http://core.svn.wordpress.org/trunk@34569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cc8df8ecb6
commit
7493641f86
@ -1631,12 +1631,14 @@ function _post_states($post) {
|
|||||||
$post_states['scheduled'] = __( 'Scheduled' );
|
$post_states['scheduled'] = __( 'Scheduled' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( get_option( 'page_on_front' ) == $post->ID ) {
|
if ( 'page' === get_option( 'show_on_front' ) ) {
|
||||||
$post_states['page_on_front'] = __( 'Front Page' );
|
if ( intval( get_option( 'page_on_front' ) ) === $post->ID ) {
|
||||||
}
|
$post_states['page_on_front'] = __( 'Front Page' );
|
||||||
|
}
|
||||||
|
|
||||||
if ( get_option( 'page_for_posts' ) == $post->ID ) {
|
if ( intval( get_option( 'page_for_posts' ) ) === $post->ID ) {
|
||||||
$post_states['page_for_posts'] = __( 'Posts Page' );
|
$post_states['page_for_posts'] = __( 'Posts Page' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-34604';
|
$wp_version = '4.4-alpha-34605';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user