Skip to content
Permalink
Browse files

Administration: Show a warning in Reading Settings when a Privacy Pol…

…icy page is accidentally set as a Homepage or Posts page.

Props garrett-eclipse, subrataemfluence.
Fixes #46831.

git-svn-id: https://develop.svn.wordpress.org/trunk@45766 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
SergeyBiryukov committed Aug 7, 2019
1 parent 72d2ed8 commit 98642e4893cb06f69f9393b073e1896360a7f560
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/wp-admin/options-reading.php
@@ -121,8 +121,11 @@
</label></li>
</ul>
<?php if ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) === get_option( 'page_on_front' ) ) : ?>
<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
<?php endif; ?>
<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
<?php endif; ?>
<?php 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' ) ) : ?>
<div id="privacy-policy-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same as your Privacy Policy page!' ); ?></p></div>
<?php endif; ?>
</fieldset></td>
</tr>
<?php endif; ?>

0 comments on commit 98642e4

Please sign in to comment.
You can’t perform that action at this time.