mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 11:44:33 +00:00
Toolbar: Be more strict about adding a 'View Posts' link to the toolbar.
After [38634], this adjusts the behaviour to remove redundancy by not displaying the link if the latest posts are shown on the front page. In that scenario, the 'Visit Site' link already points to the latest posts. Fixes #34113. git-svn-id: https://develop.svn.wordpress.org/trunk@38708 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -598,7 +598,8 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) {
|
||||
&& ( $post_type_object = get_post_type_object( $current_screen->post_type ) )
|
||||
&& ( $post_type_object->public )
|
||||
&& ( $post_type_object->show_in_admin_bar )
|
||||
&& ( get_post_type_archive_link( $post_type_object->name ) ) )
|
||||
&& ( get_post_type_archive_link( $post_type_object->name ) )
|
||||
&& ! ( 'post' === $post_type_object->name && 'posts' === get_option( 'show_on_front' ) ) )
|
||||
{
|
||||
$wp_admin_bar->add_node( array(
|
||||
'id' => 'archive',
|
||||
|
||||
Reference in New Issue
Block a user