From ba22977b29a2a05482d8542178e5a096277f4b2b Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 3 Oct 2016 08:38:29 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@38708 git-svn-id: http://core.svn.wordpress.org/trunk@38651 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/admin-bar.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 1468e85153..e87ac141f2 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -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', diff --git a/wp-includes/version.php b/wp-includes/version.php index f388e30c89..259b49cc0c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38707'; +$wp_version = '4.7-alpha-38708'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.