Skip to content

Commit

Permalink
Administration: Define the $title global on privacy screens.
Browse files Browse the repository at this point in the history
This brings more consistency with other screens and avoids a PHP warning in `get_plugin_page_hookname()`:
{{{
preg_replace(): Passing null to parameter #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
  • Loading branch information
SergeyBiryukov committed Feb 7, 2023
1 parent 67662cb commit 7422891
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wp-admin/erase-personal-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
wp_die( __( 'Sorry, you are not allowed to erase personal data on this site.' ) );
}

// Used in the HTML title tag.
$title = __( 'Erase Personal Data' );

// Contextual help - choose Help on the top right of admin panel to preview this.
get_current_screen()->add_help_tab(
array(
Expand Down
3 changes: 3 additions & 0 deletions src/wp-admin/export-personal-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
wp_die( __( 'Sorry, you are not allowed to export personal data on this site.' ) );
}

// Used in the HTML title tag.
$title = __( 'Export Personal Data' );

// Contextual help - choose Help on the top right of admin panel to preview this.
get_current_screen()->add_help_tab(
array(
Expand Down
3 changes: 3 additions & 0 deletions src/wp-admin/options-privacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
return;
}

// Used in the HTML title tag.
$title = __( 'Privacy' );

add_filter(
'admin_body_class',
static function( $body_class ) {
Expand Down
3 changes: 3 additions & 0 deletions src/wp-admin/privacy-policy-guide.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
include_once ABSPATH . 'wp-admin/includes/class-wp-privacy-policy-content.php';
}

// Used in the HTML title tag.
$title = __( 'Privacy Policy Guide' );

add_filter(
'admin_body_class',
static function( $body_class ) {
Expand Down

0 comments on commit 7422891

Please sign in to comment.