Make WordPress Core

Ticket #60750: 60750.diff

File 60750.diff, 768 bytes (added by safedawn, 5 weeks ago)

Fix false positive in privacy policy admin notice condition

  • src/wp-admin/options-reading.php

    diff --git a/src/wp-admin/options-reading.php b/src/wp-admin/options-reading.php
    index 5a8ad87ef7..410016f2e6 100644
    a b else : 
    152152                        )
    153153                );
    154154        endif;
    155         if ( get_option( 'wp_page_for_privacy_policy' ) === get_option( 'page_for_posts' ) || get_option( 'wp_page_for_privacy_policy' ) === get_option( 'page_on_front' ) ) :
     155        $privacy_policy_page = get_option( 'wp_page_for_privacy_policy' );
     156        if ( $privacy_policy_page && ( $privacy_policy_page === get_option( 'page_for_posts' ) || $privacy_policy_page === get_option( 'page_on_front' ) ) ) :
    156157                wp_admin_notice(
    157158                        __( '<strong>Warning:</strong> these pages should not be the same as your Privacy Policy page!' ),
    158159                        array(