Make WordPress Core

Changeset 47284


Ignore:
Timestamp:
02/12/2020 11:42:23 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-privacy-policy-content.php

    r46596 r47284  
    319319        }
    320320
     321        $current_screen = get_current_screen();
    321322        $policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );
    322323
    323         if ( ! $policy_page_id || $policy_page_id !== $post->ID ) {
     324        if ( 'post' !== $current_screen->base || $policy_page_id !== $post->ID ) {
    324325            return;
    325326        }
Note: See TracChangeset for help on using the changeset viewer.