| @@ 904-916 (lines=13) @@ | ||
| 901 | $this->add_my_home_submenu_item( $wp_admin_bar ); |
|
| 902 | ||
| 903 | // Stats. |
|
| 904 | if ( Jetpack::is_module_active( 'stats' ) && current_user_can( 'view_stats' ) ) { |
|
| 905 | $wp_admin_bar->add_menu( |
|
| 906 | array( |
|
| 907 | 'parent' => 'blog', |
|
| 908 | 'id' => 'blog-stats', |
|
| 909 | 'title' => esc_html__( 'Stats', 'jetpack' ), |
|
| 910 | 'href' => Redirect::get_url( 'calypso-stats' ), |
|
| 911 | 'meta' => array( |
|
| 912 | 'class' => 'mb-icon', |
|
| 913 | ), |
|
| 914 | ) |
|
| 915 | ); |
|
| 916 | } |
|
| 917 | ||
| 918 | if ( current_user_can( 'manage_options' ) ) { |
|
| 919 | $wp_admin_bar->add_menu( |
|
| @@ 1228-1240 (lines=13) @@ | ||
| 1225 | ) |
|
| 1226 | ); |
|
| 1227 | ||
| 1228 | if ( Jetpack::is_module_active( 'publicize' ) || Jetpack::is_module_active( 'sharedaddy' ) ) { |
|
| 1229 | $wp_admin_bar->add_menu( |
|
| 1230 | array( |
|
| 1231 | 'parent' => 'configuration', |
|
| 1232 | 'id' => 'sharing', |
|
| 1233 | 'title' => esc_html__( 'Sharing', 'jetpack' ), |
|
| 1234 | 'href' => Redirect::get_url( 'calypso-sharing' ), |
|
| 1235 | 'meta' => array( |
|
| 1236 | 'class' => 'mb-icon', |
|
| 1237 | ), |
|
| 1238 | ) |
|
| 1239 | ); |
|
| 1240 | } |
|
| 1241 | ||
| 1242 | $people_title = $this->create_menu_item_pair( |
|
| 1243 | array( |
|