| @@ 911-923 (lines=13) @@ | ||
| 908 | $this->add_my_home_submenu_item( $wp_admin_bar ); |
|
| 909 | ||
| 910 | // Stats. |
|
| 911 | if ( Jetpack::is_module_active( 'stats' ) && current_user_can( 'view_stats' ) ) { |
|
| 912 | $wp_admin_bar->add_menu( |
|
| 913 | array( |
|
| 914 | 'parent' => 'blog', |
|
| 915 | 'id' => 'blog-stats', |
|
| 916 | 'title' => esc_html__( 'Stats', 'jetpack' ), |
|
| 917 | 'href' => Redirect::get_url( 'calypso-stats' ), |
|
| 918 | 'meta' => array( |
|
| 919 | 'class' => 'mb-icon', |
|
| 920 | ), |
|
| 921 | ) |
|
| 922 | ); |
|
| 923 | } |
|
| 924 | ||
| 925 | if ( current_user_can( 'manage_options' ) ) { |
|
| 926 | $wp_admin_bar->add_menu( |
|
| @@ 1235-1247 (lines=13) @@ | ||
| 1232 | ) |
|
| 1233 | ); |
|
| 1234 | ||
| 1235 | if ( Jetpack::is_module_active( 'publicize' ) || Jetpack::is_module_active( 'sharedaddy' ) ) { |
|
| 1236 | $wp_admin_bar->add_menu( |
|
| 1237 | array( |
|
| 1238 | 'parent' => 'configuration', |
|
| 1239 | 'id' => 'sharing', |
|
| 1240 | 'title' => esc_html__( 'Sharing', 'jetpack' ), |
|
| 1241 | 'href' => Redirect::get_url( 'calypso-sharing' ), |
|
| 1242 | 'meta' => array( |
|
| 1243 | 'class' => 'mb-icon', |
|
| 1244 | ), |
|
| 1245 | ) |
|
| 1246 | ); |
|
| 1247 | } |
|
| 1248 | ||
| 1249 | $people_title = $this->create_menu_item_pair( |
|
| 1250 | array( |
|