[wp-trac] [WordPress Trac] #39666: Put front page on top of "All pages" list
WordPress Trac
noreply at wordpress.org
Sun Apr 15 13:56:32 UTC 2018
#39666: Put front page on top of "All pages" list
-------------------------------+-----------------------------
Reporter: Presskopp | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: administration
-------------------------------+-----------------------------
Comment (by birgire):
The sticky posts are displayed in a post list table with:
{{{
if ( ! empty( $q['show_sticky'] ) ) {
$query['post__in'] = (array) get_option( 'sticky_posts' );
}
}}}
in {{{wp_edit_posts_query()}}}
([https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-
admin/includes/post.php#L1070 src]), where the link text is e.g.
{{{Sticky(3)}}}.
One suggestion could be to use a similar approach for the ''static
pages'', like:
{{{
if ( ! empty( $q['show_static'] ) ) {
$query['post__in'] = array_filter(
wp_parse_id_list(
array( get_option( 'page_on_front' ), get_option(
'page_for_posts' ) )
)
);
}
}}}
where the link text could be {{{Static(2)}}}, instead of using two links
{{{Front Page (1)}}} and {{{Page for Posts (1)}}}.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39666#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list