Ticket #7659: 7659.01.patch
File 7659.01.patch, 1.8 KB (added by , 7 years ago) |
---|
-
src/bp-core/bp-core-buddybar.php
608 608 } 609 609 610 610 $parent_nav = $bp->{$component}->nav->get_primary( array( 'slug' => $r['parent_slug'] ), false ); 611 if ( ! $parent_nav ) { 612 return ; 613 } 614 615 $parent_nav = reset( $parent_nav ); 611 616 612 617 // If we *do* meet condition (2), then the added subnav item is currently being requested. 613 618 if ( ( bp_current_action() && bp_is_current_action( $r['slug'] ) ) || ( bp_is_user() && ! bp_current_action() && ! empty( $parent_nav->screen_function ) && $r['screen_function'] == $parent_nav->screen_function ) ) { … … 670 675 671 676 $bp = buddypress(); 672 677 673 // If a redirect URL has been passed to the subnav 674 // item, respect it. 678 // If a redirect URL has been passed to the subnav item, respect it. 675 679 if ( ! empty( $subnav_item['no_access_url'] ) ) { 676 $message = __( 'You do not have access to th ispage.', 'buddypress' );680 $message = __( 'You do not have access to that page.', 'buddypress' ); 677 681 $redirect_to = trailingslashit( $subnav_item['no_access_url'] ); 678 682 679 683 // In the case of a user page, we try to assume a … … 689 693 // component, as long as that component is 690 694 // publicly accessible. 691 695 if ( bp_is_my_profile() || ( isset( $parent_nav_default_item ) && $parent_nav_default_item->show_for_displayed_user ) ) { 692 $message = __( 'You do not have access to th ispage.', 'buddypress' );696 $message = __( 'You do not have access to that page.', 'buddypress' ); 693 697 $redirect_to = bp_displayed_user_domain(); 694 698 695 699 // In some cases, the default tab is not accessible to … … 717 721 'message' => $message, 718 722 'root' => $redirect_to, 719 723 'redirect' => false, 724 'mode' => 1 720 725 ); 721 726 722 727 } else {