PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
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 | admin/menu/class-admin-menu.php +8 -12 18.328.5 View file →
@@ -21,8 +21,10 @@
21 21 }
22 22
23 23 /**
24 24 * Registers the menu item submenus.
25 + *
26 + * @return void
25 27 */
26 28 public function register_settings_page() {
27 29 $manage_capability = $this->get_manage_capability();
28 30 $page_identifier = $this->get_page_identifier();
@@ -51,14 +53,14 @@
51 53 global $admin_page_hooks;
52 54
53 55 add_menu_page(
54 56 'Yoast SEO: ' . __( 'Dashboard', 'wordpress-seo' ),
55 - __( 'SEO', 'wordpress-seo' ) . ' ' . $this->get_notification_counter(),
57 + 'Yoast SEO ' . $this->get_notification_counter(),
56 58 $manage_capability,
57 59 $page_identifier,
58 60 $admin_page_callback,
59 61 $this->get_icon_svg(),
60 - 99
62 + 99,
61 63 );
62 64
63 65 // Wipe notification bits from hooks.
64 66 // phpcs:ignore WordPress.WP.GlobalVariablesOverride -- This is a deliberate action.
@@ -85,24 +87,20 @@
85 87 }
86 88
87 89 // Submenu pages.
88 90 $submenu_pages = [
89 - $this->get_submenu_page( __( 'General', 'wordpress-seo' ), $this->get_page_identifier() ),
90 - $this->get_submenu_page( __( 'Search Appearance', 'wordpress-seo' ), 'wpseo_titles' ),
91 91 $this->get_submenu_page(
92 92 __( 'Search Console', 'wordpress-seo' ),
93 93 'wpseo_search_console',
94 - $search_console_callback
94 + $search_console_callback,
95 95 ),
96 - $this->get_submenu_page( __( 'Social', 'wordpress-seo' ), 'wpseo_social' ),
97 96 $this->get_submenu_page( __( 'Tools', 'wordpress-seo' ), 'wpseo_tools' ),
98 - $this->get_submenu_page( $this->get_license_page_title(), 'wpseo_licenses' ),
99 97 ];
100 98
101 99 /**
102 100 * Filter: 'wpseo_submenu_pages' - Collects all submenus that need to be shown.
103 101 *
104 - * @api array $submenu_pages List with all submenu pages.
102 + * @param array $submenu_pages List with all submenu pages.
105 103 */
106 104 return (array) apply_filters( 'wpseo_submenu_pages', $submenu_pages );
107 105 }
108 106
@@ -115,14 +113,12 @@
115 113 $notification_center = Yoast_Notification_Center::get();
116 114 $notification_count = $notification_center->get_notification_count();
117 115
118 116 // Add main page.
119 - /* translators: %s: number of notifications */
117 + /* translators: Hidden accessibility text; %s: number of notifications. */
120 118 $notifications = sprintf( _n( '%s notification', '%s notifications', $notification_count, 'wordpress-seo' ), number_format_i18n( $notification_count ) );
121 119
122 - $counter = sprintf( '<span class="update-plugins count-%1$d"><span class="plugin-count" aria-hidden="true">%1$d</span><span class="screen-reader-text">%2$s</span></span>', $notification_count, $notifications );
123 -
124 - return $counter;
120 + return sprintf( '<span class="update-plugins count-%1$d"><span class="plugin-count" aria-hidden="true">%1$d</span><span class="screen-reader-text">%2$s</span></span>', $notification_count, $notifications );
125 121 }
126 122
127 123 /**
128 124 * Returns the capability that is required to manage all options.