From 58efcbdcd6a4ecff702536e7b3a5a969176450a1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 12 Feb 2020 11:42:23 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/class-wp-privacy-policy-content.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-privacy-policy-content.php b/src/wp-admin/includes/class-wp-privacy-policy-content.php index 65f27470a3..c252bdebb6 100644 --- a/src/wp-admin/includes/class-wp-privacy-policy-content.php +++ b/src/wp-admin/includes/class-wp-privacy-policy-content.php @@ -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; }