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

Props chetan200891, xkon, garrett-eclipse.
Fixes #48431.

git-svn-id: https://develop.svn.wordpress.org/trunk@47284 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-02-12 11:42:23 +00:00
parent a6d078c228
commit 58efcbdcd6
1 changed files with 2 additions and 1 deletions

View File

@ -318,9 +318,10 @@ final class WP_Privacy_Policy_Content {
return;
}
$current_screen = get_current_screen();
$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;
}