Skip to content

Commit 7422891

Browse files
Administration: Define the $title global on privacy screens.
This brings more consistency with other screens and avoids a PHP warning in `get_plugin_page_hookname()`: {{{ preg_replace(): Passing null to parameter WordPress#3 ($subject) of type array|string is deprecated }}} Props ipajen, jrf, SergeyBiryukov. Fixes #57578. git-svn-id: https://develop.svn.wordpress.org/trunk@55263 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 67662cb commit 7422891

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/wp-admin/erase-personal-data.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
wp_die( __( 'Sorry, you are not allowed to erase personal data on this site.' ) );
1414
}
1515

16+
// Used in the HTML title tag.
17+
$title = __( 'Erase Personal Data' );
18+
1619
// Contextual help - choose Help on the top right of admin panel to preview this.
1720
get_current_screen()->add_help_tab(
1821
array(

src/wp-admin/export-personal-data.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
wp_die( __( 'Sorry, you are not allowed to export personal data on this site.' ) );
1414
}
1515

16+
// Used in the HTML title tag.
17+
$title = __( 'Export Personal Data' );
18+
1619
// Contextual help - choose Help on the top right of admin panel to preview this.
1720
get_current_screen()->add_help_tab(
1821
array(

src/wp-admin/options-privacy.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
return;
1919
}
2020

21+
// Used in the HTML title tag.
22+
$title = __( 'Privacy' );
23+
2124
add_filter(
2225
'admin_body_class',
2326
static function( $body_class ) {

src/wp-admin/privacy-policy-guide.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
include_once ABSPATH . 'wp-admin/includes/class-wp-privacy-policy-content.php';
1818
}
1919

20+
// Used in the HTML title tag.
21+
$title = __( 'Privacy Policy Guide' );
22+
2023
add_filter(
2124
'admin_body_class',
2225
static function( $body_class ) {

0 commit comments

Comments
 (0)