Administration: Show a warning in Reading Settings when a Privacy Policy page is accidentally set as a Homepage or Posts page.

Props garrett-eclipse, subrataemfluence.
Fixes #46831.
Built from https://develop.svn.wordpress.org/trunk@45766


git-svn-id: http://core.svn.wordpress.org/trunk@45577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-08-07 23:03:54 +00:00
parent b8fd2b631b
commit c965d2e097
2 changed files with 6 additions and 3 deletions

View File

@ -121,8 +121,11 @@ else :
</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; ?>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45765';
$wp_version = '5.3-alpha-45766';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.