| @@ 897-909 (lines=13) @@ | ||
| 894 | $this->add_my_home_submenu_item( $wp_admin_bar ); |
|
| 895 | ||
| 896 | // Stats. |
|
| 897 | if ( Jetpack::is_module_active( 'stats' ) && current_user_can( 'view_stats' ) ) { |
|
| 898 | $wp_admin_bar->add_menu( |
|
| 899 | array( |
|
| 900 | 'parent' => 'blog', |
|
| 901 | 'id' => 'blog-stats', |
|
| 902 | 'title' => esc_html__( 'Stats', 'jetpack' ), |
|
| 903 | 'href' => Redirect::get_url( 'calypso-stats' ), |
|
| 904 | 'meta' => array( |
|
| 905 | 'class' => 'mb-icon', |
|
| 906 | ), |
|
| 907 | ) |
|
| 908 | ); |
|
| 909 | } |
|
| 910 | ||
| 911 | if ( current_user_can( 'manage_options' ) ) { |
|
| 912 | $wp_admin_bar->add_menu( |
|
| @@ 1221-1233 (lines=13) @@ | ||
| 1218 | ) |
|
| 1219 | ); |
|
| 1220 | ||
| 1221 | if ( Jetpack::is_module_active( 'publicize' ) || Jetpack::is_module_active( 'sharedaddy' ) ) { |
|
| 1222 | $wp_admin_bar->add_menu( |
|
| 1223 | array( |
|
| 1224 | 'parent' => 'configuration', |
|
| 1225 | 'id' => 'sharing', |
|
| 1226 | 'title' => esc_html__( 'Sharing', 'jetpack' ), |
|
| 1227 | 'href' => Redirect::get_url( 'calypso-sharing' ), |
|
| 1228 | 'meta' => array( |
|
| 1229 | 'class' => 'mb-icon', |
|
| 1230 | ), |
|
| 1231 | ) |
|
| 1232 | ); |
|
| 1233 | } |
|
| 1234 | ||
| 1235 | $people_title = $this->create_menu_item_pair( |
|
| 1236 | array( |
|