Skip to content

Commit cfa06b1

Browse files
Administration: Only warn about a Privacy Policy page collision when the page is set.
Follow-up to [45766]. Props safedawn, OctoTooT, rollybueno, sabernhardt, SirLouen, dd32, SergeyBiryukov. Fixes #60750. git-svn-id: https://develop.svn.wordpress.org/trunk@61498 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 19d4eef commit cfa06b1

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/wp-admin/options-reading.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@
142142
</label></li>
143143
</ul>
144144
<?php
145-
if ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) === get_option( 'page_on_front' ) ) :
145+
if ( 'page' === get_option( 'show_on_front' )
146+
&& get_option( 'page_for_posts' ) === get_option( 'page_on_front' )
147+
) :
146148
wp_admin_notice(
147149
__( '<strong>Warning:</strong> these pages should not be the same!' ),
148150
array(
@@ -152,7 +154,13 @@
152154
)
153155
);
154156
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' ) ) :
157+
158+
$privacy_policy_page = get_option( 'wp_page_for_privacy_policy' );
159+
160+
if ( $privacy_policy_page
161+
&& ( get_option( 'page_for_posts' ) === $privacy_policy_page
162+
|| get_option( 'page_on_front' ) === $privacy_policy_page )
163+
) :
156164
wp_admin_notice(
157165
__( '<strong>Warning:</strong> these pages should not be the same as your Privacy Policy page!' ),
158166
array(

0 commit comments

Comments
 (0)