PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | inc/class-wpseo-admin-bar-menu.php +28 -1 27.6 → trunk View file →
@@ -283,8 +283,9 @@
283 283 elseif ( is_network_admin() ) {
284 284 $this->add_network_settings_submenu( $wp_admin_bar );
285 285 }
286 286
287 + $this->add_academy_link( $wp_admin_bar );
287 288 $this->add_premium_link( $wp_admin_bar );
288 289 $this->add_brand_insights_link( $wp_admin_bar );
289 290 }
290 291
@@ -577,14 +578,35 @@
577 578 $this->add_submenu_items( $submenu_items, $wp_admin_bar, 'wpseo-sub-get-help' );
578 579 }
579 580
580 581 /**
581 - * Adds the admin bar How To submenu.
582 + * Adds the Academy link to the admin bar.
582 583 *
583 584 * @param WP_Admin_Bar $wp_admin_bar Admin bar instance to add the menu to.
584 585 *
585 586 * @return void
586 587 */
588 + protected function add_academy_link( WP_Admin_Bar $wp_admin_bar ) {
589 + $wp_admin_bar->add_menu(
590 + [
591 + 'parent' => self::MENU_IDENTIFIER,
592 + 'id' => 'wpseo-academy',
593 + 'title' => __( 'Academy', 'wordpress-seo' ),
594 + 'href' => admin_url( 'admin.php?page=wpseo_page_academy' ),
595 + 'meta' => [
596 + 'tabindex' => '0',
597 + ],
598 + ],
599 + );
600 + }
601 +
602 + /**
603 + * Adds the Upgrade link to the admin bar.
604 + *
605 + * @param WP_Admin_Bar $wp_admin_bar Admin bar instance to add the menu to.
606 + *
607 + * @return void
608 + */
587 609 protected function add_premium_link( WP_Admin_Bar $wp_admin_bar ) {
588 610 // Don't show the Upgrade button if Yoast SEO WooCommerce addon is active.
589 611 $addon_manager = new WPSEO_Addon_Manager();
590 612 if ( $addon_manager->is_installed( WPSEO_Addon_Manager::WOOCOMMERCE_SLUG ) ) {
@@ -687,8 +709,13 @@
687 709 }
688 710
689 711 // Don't add the Google Search Console menu item.
690 712 if ( $submenu_page[4] === 'wpseo_search_console' ) {
713 + continue;
714 + }
715 +
716 + // Don't add the Academy menu item (it's now in the main menu).
717 + if ( $submenu_page[4] === 'wpseo_page_academy' ) {
691 718 continue;
692 719 }
693 720
694 721 // Don't add the Brand Insights menu items (they're now in the main menu).