| @@ 641-651 (lines=11) @@ | ||
| 638 | } |
|
| 639 | ||
| 640 | // Stats |
|
| 641 | if ( Jetpack::is_module_active( 'stats' ) ) { |
|
| 642 | $wp_admin_bar->add_menu( array( |
|
| 643 | 'parent' => 'blog', |
|
| 644 | 'id' => 'blog-stats', |
|
| 645 | 'title' => esc_html__( 'Stats', 'jetpack' ), |
|
| 646 | 'href' => 'https://wordpress.com/stats/' . esc_attr( $this->primary_site_slug ), |
|
| 647 | 'meta' => array( |
|
| 648 | 'class' => 'mb-icon', |
|
| 649 | ), |
|
| 650 | ) ); |
|
| 651 | } |
|
| 652 | ||
| 653 | if ( current_user_can( 'manage_options' ) ) { |
|
| 654 | $wp_admin_bar->add_menu( array( |
|
| @@ 653-663 (lines=11) @@ | ||
| 650 | ) ); |
|
| 651 | } |
|
| 652 | ||
| 653 | if ( current_user_can( 'manage_options' ) ) { |
|
| 654 | $wp_admin_bar->add_menu( array( |
|
| 655 | 'parent' => 'blog', |
|
| 656 | 'id' => 'activity', |
|
| 657 | 'title' => esc_html__( 'Activity', 'jetpack' ), |
|
| 658 | 'href' => 'https://wordpress.com/activity-log/' . esc_attr( $this->primary_site_slug ), |
|
| 659 | 'meta' => array( |
|
| 660 | 'class' => 'mb-icon', |
|
| 661 | ), |
|
| 662 | ) ); |
|
| 663 | } |
|
| 664 | ||
| 665 | // Add Calypso plans link and plan type indicator |
|
| 666 | if ( is_user_member_of_blog( $current_user->ID ) ) { |
|
| @@ 775-785 (lines=11) @@ | ||
| 772 | ) ); |
|
| 773 | ||
| 774 | // Comments |
|
| 775 | if ( current_user_can( 'moderate_comments' ) ) { |
|
| 776 | $wp_admin_bar->add_menu( array( |
|
| 777 | 'parent' => 'publish', |
|
| 778 | 'id' => 'comments', |
|
| 779 | 'title' => __( 'Comments' ), |
|
| 780 | 'href' => 'https://wordpress.com/comments/' . esc_attr( $this->primary_site_slug ), |
|
| 781 | 'meta' => array( |
|
| 782 | 'class' => 'mb-icon', |
|
| 783 | ), |
|
| 784 | ) ); |
|
| 785 | } |
|
| 786 | ||
| 787 | // Testimonials |
|
| 788 | if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_testimonial' ) ) { |
|
| @@ 923-933 (lines=11) @@ | ||
| 920 | ), |
|
| 921 | ) ); |
|
| 922 | ||
| 923 | if ( Jetpack::is_module_active( 'publicize' ) || Jetpack::is_module_active( 'sharedaddy' ) ) { |
|
| 924 | $wp_admin_bar->add_menu( array( |
|
| 925 | 'parent' => 'configuration', |
|
| 926 | 'id' => 'sharing', |
|
| 927 | 'title' => esc_html__( 'Sharing', 'jetpack' ), |
|
| 928 | 'href' => 'https://wordpress.com/sharing/' . esc_attr( $this->primary_site_slug ), |
|
| 929 | 'meta' => array( |
|
| 930 | 'class' => 'mb-icon', |
|
| 931 | ), |
|
| 932 | ) ); |
|
| 933 | } |
|
| 934 | ||
| 935 | $people_title = $this->create_menu_item_pair( |
|
| 936 | array( |
|