| @@ 216-222 (lines=7) @@ | ||
| 213 | * |
|
| 214 | * @param bool $calypso Optional. Whether links should point to Calypso or wp-admin. Default true (Calypso). |
|
| 215 | */ |
|
| 216 | public function add_tools_menu( $calypso = true ) { |
|
| 217 | $menu_slug = $calypso ? 'https://wordpress.com/marketing/tools/' . $this->domain : 'tools.php'; |
|
| 218 | ||
| 219 | add_submenu_page( $menu_slug, esc_attr__( 'Marketing', 'jetpack' ), __( 'Marketing', 'jetpack' ), 'manage_options', 'https://wordpress.com/marketing/tools/' . $this->domain, null, 5 ); |
|
| 220 | add_submenu_page( $menu_slug, esc_attr__( 'Earn', 'jetpack' ), __( 'Earn', 'jetpack' ), 'manage_options', 'https://wordpress.com/earn/' . $this->domain, null, 10 ); |
|
| 221 | ||
| 222 | parent::add_tools_menu( $calypso ); |
|
| 223 | } |
|
| 224 | ||
| 225 | /** |
|
| @@ 316-323 (lines=8) @@ | ||
| 313 | * |
|
| 314 | * @param bool $calypso Optional. Whether links should point to Calypso or wp-admin. Default true (Calypso). |
|
| 315 | */ |
|
| 316 | public function add_tools_menu( $calypso = true ) { |
|
| 317 | $menu_slug = $calypso ? 'https://wordpress.com/marketing/tools/' . $this->domain : 'tools.php'; |
|
| 318 | ||
| 319 | add_submenu_page( $menu_slug, esc_attr__( 'Marketing', 'jetpack' ), __( 'Marketing', 'jetpack' ), 'manage_options', 'https://wordpress.com/marketing/tools/' . $this->domain, null, 5 ); |
|
| 320 | add_submenu_page( $menu_slug, esc_attr__( 'Earn', 'jetpack' ), __( 'Earn', 'jetpack' ), 'manage_options', 'https://wordpress.com/earn/' . $this->domain, null, 10 ); |
|
| 321 | ||
| 322 | parent::add_tools_menu( $calypso ); |
|
| 323 | } |
|
| 324 | ||
| 325 | /** |
|
| 326 | * Adds Settings menu. |
|