WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/03/2016 08:37:27 AM (4 years ago)
Author:
swissspidy
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/admin-bar.php

    r38698 r38708  
    599599            && ( $post_type_object->public )
    600600            && ( $post_type_object->show_in_admin_bar )
    601             && ( get_post_type_archive_link( $post_type_object->name ) ) )
     601            && ( get_post_type_archive_link( $post_type_object->name ) )
     602            && ! ( 'post' === $post_type_object->name && 'posts' === get_option( 'show_on_front' ) ) )
    602603        {
    603604            $wp_admin_bar->add_node( array(
Note: See TracChangeset for help on using the changeset viewer.