List tables: Display front and posts page indicators.
fixes #30190. git-svn-id: https://develop.svn.wordpress.org/trunk@31610 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f9a6a7aa56
commit
c4673e8c79
@ -1677,13 +1677,20 @@ function _post_states($post) {
|
|||||||
if ( is_sticky($post->ID) )
|
if ( is_sticky($post->ID) )
|
||||||
$post_states['sticky'] = __('Sticky');
|
$post_states['sticky'] = __('Sticky');
|
||||||
|
|
||||||
|
if ( get_option( 'page_on_front' ) == $post->ID ) {
|
||||||
|
$post_states['page_on_front'] = __( 'Front Page' );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( get_option( 'page_for_posts' ) == $post->ID ) {
|
||||||
|
$post_states['page_for_posts'] = __( 'Posts Page' );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the default post display states used in the Posts list table.
|
* Filter the default post display states used in the posts list table.
|
||||||
*
|
*
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*
|
*
|
||||||
* @param array $post_states An array of post display states. Values include 'Password protected',
|
* @param array $post_states An array of post display states.
|
||||||
* 'Private', 'Draft', 'Pending', and 'Sticky'.
|
|
||||||
* @param int $post The post ID.
|
* @param int $post The post ID.
|
||||||
*/
|
*/
|
||||||
$post_states = apply_filters( 'display_post_states', $post_states, $post );
|
$post_states = apply_filters( 'display_post_states', $post_states, $post );
|
||||||
|
Loading…
Reference in New Issue
Block a user