Privacy: Only show the Privacy Policy page notice when editing the page, not on drafts list.

Props chetan200891, xkon, garrett-eclipse.
Fixes #48431.
Built from https://develop.svn.wordpress.org/trunk@47284


git-svn-id: http://core.svn.wordpress.org/trunk@47084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-02-12 11:44:08 +00:00
parent b2ecf2c2bc
commit 534fcd7b0e
2 changed files with 3 additions and 2 deletions

View File

@ -318,9 +318,10 @@ final class WP_Privacy_Policy_Content {
return; return;
} }
$current_screen = get_current_screen();
$policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); $policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );
if ( ! $policy_page_id || $policy_page_id !== $post->ID ) { if ( 'post' !== $current_screen->base || $policy_page_id !== $post->ID ) {
return; return;
} }

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-beta1-47283'; $wp_version = '5.4-beta1-47284';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.