| @@ 635-645 (lines=11) @@ | ||
| 632 | } |
|
| 633 | ||
| 634 | // Stats |
|
| 635 | if ( Jetpack::is_module_active( 'stats' ) ) { |
|
| 636 | $wp_admin_bar->add_menu( array( |
|
| 637 | 'parent' => 'blog', |
|
| 638 | 'id' => 'blog-stats', |
|
| 639 | 'title' => esc_html__( 'Stats', 'jetpack' ), |
|
| 640 | 'href' => 'https://wordpress.com/stats/' . esc_attr( $this->primary_site_slug ), |
|
| 641 | 'meta' => array( |
|
| 642 | 'class' => 'mb-icon', |
|
| 643 | ), |
|
| 644 | ) ); |
|
| 645 | } |
|
| 646 | ||
| 647 | if ( current_user_can( 'manage_options' ) ) { |
|
| 648 | $wp_admin_bar->add_menu( array( |
|
| @@ 647-657 (lines=11) @@ | ||
| 644 | ) ); |
|
| 645 | } |
|
| 646 | ||
| 647 | if ( current_user_can( 'manage_options' ) ) { |
|
| 648 | $wp_admin_bar->add_menu( array( |
|
| 649 | 'parent' => 'blog', |
|
| 650 | 'id' => 'activity', |
|
| 651 | 'title' => esc_html__( 'Activity', 'jetpack' ), |
|
| 652 | 'href' => 'https://wordpress.com/activity-log/' . esc_attr( $this->primary_site_slug ), |
|
| 653 | 'meta' => array( |
|
| 654 | 'class' => 'mb-icon', |
|
| 655 | ), |
|
| 656 | ) ); |
|
| 657 | } |
|
| 658 | ||
| 659 | // Add Calypso plans link and plan type indicator |
|
| 660 | if ( is_user_member_of_blog( $current_user->ID ) ) { |
|
| @@ 769-779 (lines=11) @@ | ||
| 766 | ) ); |
|
| 767 | ||
| 768 | // Comments |
|
| 769 | if ( current_user_can( 'moderate_comments' ) ) { |
|
| 770 | $wp_admin_bar->add_menu( array( |
|
| 771 | 'parent' => 'publish', |
|
| 772 | 'id' => 'comments', |
|
| 773 | 'title' => __( 'Comments' ), |
|
| 774 | 'href' => 'https://wordpress.com/comments/' . esc_attr( $this->primary_site_slug ), |
|
| 775 | 'meta' => array( |
|
| 776 | 'class' => 'mb-icon', |
|
| 777 | ), |
|
| 778 | ) ); |
|
| 779 | } |
|
| 780 | ||
| 781 | // Testimonials |
|
| 782 | if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_testimonial' ) ) { |
|
| @@ 917-927 (lines=11) @@ | ||
| 914 | ), |
|
| 915 | ) ); |
|
| 916 | ||
| 917 | if ( Jetpack::is_module_active( 'publicize' ) || Jetpack::is_module_active( 'sharedaddy' ) ) { |
|
| 918 | $wp_admin_bar->add_menu( array( |
|
| 919 | 'parent' => 'configuration', |
|
| 920 | 'id' => 'sharing', |
|
| 921 | 'title' => esc_html__( 'Sharing', 'jetpack' ), |
|
| 922 | 'href' => 'https://wordpress.com/sharing/' . esc_attr( $this->primary_site_slug ), |
|
| 923 | 'meta' => array( |
|
| 924 | 'class' => 'mb-icon', |
|
| 925 | ), |
|
| 926 | ) ); |
|
| 927 | } |
|
| 928 | ||
| 929 | $people_title = $this->create_menu_item_pair( |
|
| 930 | array( |
|