| @@ 873-885 (lines=13) @@ | ||
| 870 | $this->add_my_home_submenu_item( $wp_admin_bar ); |
|
| 871 | ||
| 872 | // Stats. |
|
| 873 | if ( Jetpack::is_module_active( 'stats' ) && current_user_can( 'view_stats' ) ) { |
|
| 874 | $wp_admin_bar->add_menu( |
|
| 875 | array( |
|
| 876 | 'parent' => 'blog', |
|
| 877 | 'id' => 'blog-stats', |
|
| 878 | 'title' => esc_html__( 'Stats', 'jetpack' ), |
|
| 879 | 'href' => 'https://wordpress.com/stats/' . esc_attr( $this->primary_site_slug ), |
|
| 880 | 'meta' => array( |
|
| 881 | 'class' => 'mb-icon', |
|
| 882 | ), |
|
| 883 | ) |
|
| 884 | ); |
|
| 885 | } |
|
| 886 | ||
| 887 | if ( current_user_can( 'manage_options' ) ) { |
|
| 888 | $wp_admin_bar->add_menu( |
|
| @@ 887-899 (lines=13) @@ | ||
| 884 | ); |
|
| 885 | } |
|
| 886 | ||
| 887 | if ( current_user_can( 'manage_options' ) ) { |
|
| 888 | $wp_admin_bar->add_menu( |
|
| 889 | array( |
|
| 890 | 'parent' => 'blog', |
|
| 891 | 'id' => 'activity', |
|
| 892 | 'title' => esc_html__( 'Activity', 'jetpack' ), |
|
| 893 | 'href' => 'https://wordpress.com/activity-log/' . esc_attr( $this->primary_site_slug ), |
|
| 894 | 'meta' => array( |
|
| 895 | 'class' => 'mb-icon', |
|
| 896 | ), |
|
| 897 | ) |
|
| 898 | ); |
|
| 899 | } |
|
| 900 | ||
| 901 | // Add Calypso plans link and plan type indicator. |
|
| 902 | if ( is_user_member_of_blog( $current_user->ID ) && current_user_can( 'manage_options' ) ) { |
|
| @@ 1197-1209 (lines=13) @@ | ||
| 1194 | ) |
|
| 1195 | ); |
|
| 1196 | ||
| 1197 | if ( Jetpack::is_module_active( 'publicize' ) || Jetpack::is_module_active( 'sharedaddy' ) ) { |
|
| 1198 | $wp_admin_bar->add_menu( |
|
| 1199 | array( |
|
| 1200 | 'parent' => 'configuration', |
|
| 1201 | 'id' => 'sharing', |
|
| 1202 | 'title' => esc_html__( 'Sharing', 'jetpack' ), |
|
| 1203 | 'href' => 'https://wordpress.com/sharing/' . esc_attr( $this->primary_site_slug ), |
|
| 1204 | 'meta' => array( |
|
| 1205 | 'class' => 'mb-icon', |
|
| 1206 | ), |
|
| 1207 | ) |
|
| 1208 | ); |
|
| 1209 | } |
|
| 1210 | ||
| 1211 | $people_title = $this->create_menu_item_pair( |
|
| 1212 | array( |
|