@@ -30,7 +30,7 @@ final class WP_Admin {
30
30
public function __construct () {
31
31
\add_action ( 'init ' , array ( __CLASS__ , 'load_php_textdomain ' ) );
32
32
\add_action ( 'admin_menu ' , array ( __CLASS__ , 'register_page ' ) );
33
- \add_filter ( 'admin_title ' , array ( __CLASS__ , 'page_title ' ), 10 , 1 );
33
+ \add_action ( 'load-dashboard_page_ ' . self :: $ slug , array ( __CLASS__ , 'page_title ' ), 9 , 1 );
34
34
\add_action ( 'load-dashboard_page_ ' . self ::$ slug , array ( __CLASS__ , 'initialize ' ) );
35
35
if ( 'sitegen ' === Data::current_flow () ) {
36
36
\add_action ( 'load-themes.php ' , array ( __CLASS__ , 'mark_sitegen_generated_themes ' ) );
@@ -74,15 +74,13 @@ public static function register_page() {
74
74
/**
75
75
* Set the page title for the Onboarding page.
76
76
*
77
- * @param string $admin_title The title of the admin page.
78
- * @return string
79
- */
80
- public static function page_title ( $ admin_title ) {
77
+ * @return void
78
+ * */
79
+ public static function page_title () {
81
80
if ( isset ( $ _GET ['page ' ] ) && \sanitize_text_field ( wp_unslash ( $ _GET ['page ' ] ) ) === self ::$ slug ) {
82
- $ admin_title = \__ ( 'Onboarding ' , 'wp-module-onboarding ' ) . $ admin_title ;
81
+ global $ title ;
82
+ $ title = \__ ( 'Onboarding ' , 'wp-module-onboarding ' ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
83
83
}
84
-
85
- return $ admin_title ;
86
84
}
87
85
88
86
/**
0 commit comments