Skip to content

Commit

Permalink
Merge pull request #16 from humanmade/fix-stream-menu-notice
Browse files Browse the repository at this point in the history
Only change Stream menu item label if set
  • Loading branch information
rmccue authored May 13, 2019
2 parents 77156c4 + cf6e93c commit 6557d6d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inc/stream/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ function remove_stream_admin_pages() {
* @param WP_Admin_Bar $wp_admin_bar
*/
function override_network_admin_bar_menu( WP_Admin_Bar $wp_admin_bar ) {
// Menu item is only registered inside the admin, so don't try and replace
// it if it hasn't been registered.
if ( empty( wp_stream_get_instance()->admin ) ) {
return;
}

$wp_admin_bar->remove_menu( 'network-admin-stream' );
$href = add_query_arg(
[
Expand Down

0 comments on commit 6557d6d

Please sign in to comment.