@@ 899-911 (lines=13) @@ | ||
896 | $this->add_my_home_submenu_item( $wp_admin_bar ); |
|
897 | ||
898 | // Stats. |
|
899 | if ( Jetpack::is_module_active( 'stats' ) && current_user_can( 'view_stats' ) ) { |
|
900 | $wp_admin_bar->add_menu( |
|
901 | array( |
|
902 | 'parent' => 'blog', |
|
903 | 'id' => 'blog-stats', |
|
904 | 'title' => esc_html__( 'Stats', 'jetpack' ), |
|
905 | 'href' => 'https://wordpress.com/stats/' . esc_attr( $this->primary_site_slug ), |
|
906 | 'meta' => array( |
|
907 | 'class' => 'mb-icon', |
|
908 | ), |
|
909 | ) |
|
910 | ); |
|
911 | } |
|
912 | ||
913 | if ( current_user_can( 'manage_options' ) ) { |
|
914 | $wp_admin_bar->add_menu( |
|
@@ 913-925 (lines=13) @@ | ||
910 | ); |
|
911 | } |
|
912 | ||
913 | if ( current_user_can( 'manage_options' ) ) { |
|
914 | $wp_admin_bar->add_menu( |
|
915 | array( |
|
916 | 'parent' => 'blog', |
|
917 | 'id' => 'activity', |
|
918 | 'title' => esc_html__( 'Activity', 'jetpack' ), |
|
919 | 'href' => 'https://wordpress.com/activity-log/' . esc_attr( $this->primary_site_slug ), |
|
920 | 'meta' => array( |
|
921 | 'class' => 'mb-icon', |
|
922 | ), |
|
923 | ) |
|
924 | ); |
|
925 | } |
|
926 | ||
927 | // Add Calypso plans link and plan type indicator. |
|
928 | if ( is_user_member_of_blog( $current_user->ID ) && current_user_can( 'manage_options' ) ) { |
|
@@ 1047-1059 (lines=13) @@ | ||
1044 | ); |
|
1045 | ||
1046 | // Comments. |
|
1047 | if ( current_user_can( 'moderate_comments' ) ) { |
|
1048 | $wp_admin_bar->add_menu( |
|
1049 | array( |
|
1050 | 'parent' => 'publish', |
|
1051 | 'id' => 'comments', |
|
1052 | 'title' => __( 'Comments', 'jetpack' ), |
|
1053 | 'href' => 'https://wordpress.com/comments/' . esc_attr( $this->primary_site_slug ), |
|
1054 | 'meta' => array( |
|
1055 | 'class' => 'mb-icon', |
|
1056 | ), |
|
1057 | ) |
|
1058 | ); |
|
1059 | } |
|
1060 | ||
1061 | // Testimonials. |
|
1062 | if ( Jetpack::is_module_active( 'custom-content-types' ) && get_option( 'jetpack_testimonial' ) ) { |
|
@@ 1223-1235 (lines=13) @@ | ||
1220 | ) |
|
1221 | ); |
|
1222 | ||
1223 | if ( Jetpack::is_module_active( 'publicize' ) || Jetpack::is_module_active( 'sharedaddy' ) ) { |
|
1224 | $wp_admin_bar->add_menu( |
|
1225 | array( |
|
1226 | 'parent' => 'configuration', |
|
1227 | 'id' => 'sharing', |
|
1228 | 'title' => esc_html__( 'Sharing', 'jetpack' ), |
|
1229 | 'href' => 'https://wordpress.com/sharing/' . esc_attr( $this->primary_site_slug ), |
|
1230 | 'meta' => array( |
|
1231 | 'class' => 'mb-icon', |
|
1232 | ), |
|
1233 | ) |
|
1234 | ); |
|
1235 | } |
|
1236 | ||
1237 | $people_title = $this->create_menu_item_pair( |
|
1238 | array( |