From 8702927f8d2897ee7abb7f27a2c9d1fe075b8ef1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 7 Feb 2023 14:40:21 +0000 Subject: [PATCH] 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 #3 ($subject) of type array|string is deprecated }}} Props ipajen, jrf, SergeyBiryukov. Fixes #57578. Built from https://develop.svn.wordpress.org/trunk@55263 git-svn-id: http://core.svn.wordpress.org/trunk@54796 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/erase-personal-data.php | 3 +++ wp-admin/export-personal-data.php | 3 +++ wp-admin/options-privacy.php | 3 +++ wp-admin/privacy-policy-guide.php | 3 +++ wp-includes/version.php | 2 +- 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/wp-admin/erase-personal-data.php b/wp-admin/erase-personal-data.php index 1fe3561f01..bbcc086288 100644 --- a/wp-admin/erase-personal-data.php +++ b/wp-admin/erase-personal-data.php @@ -13,6 +13,9 @@ if ( ! current_user_can( 'erase_others_personal_data' ) || ! current_user_can( ' 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( diff --git a/wp-admin/export-personal-data.php b/wp-admin/export-personal-data.php index 1b1a3eb9ed..6e44ce9c63 100644 --- a/wp-admin/export-personal-data.php +++ b/wp-admin/export-personal-data.php @@ -13,6 +13,9 @@ if ( ! current_user_can( 'export_others_personal_data' ) ) { 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( diff --git a/wp-admin/options-privacy.php b/wp-admin/options-privacy.php index 8f2f6d6e36..b477cc40b1 100644 --- a/wp-admin/options-privacy.php +++ b/wp-admin/options-privacy.php @@ -18,6 +18,9 @@ if ( isset( $_GET['tab'] ) && 'policyguide' === $_GET['tab'] ) { return; } +// Used in the HTML title tag. +$title = __( 'Privacy' ); + add_filter( 'admin_body_class', static function( $body_class ) { diff --git a/wp-admin/privacy-policy-guide.php b/wp-admin/privacy-policy-guide.php index 3185d0c870..7f649f0887 100644 --- a/wp-admin/privacy-policy-guide.php +++ b/wp-admin/privacy-policy-guide.php @@ -17,6 +17,9 @@ if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) { 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 ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 9709ace729..b9cc0e759c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55262'; +$wp_version = '6.2-alpha-55263'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.