Make WordPress Core

Changeset 45766


Ignore:
Timestamp:
08/07/2019 11:02:43 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-reading.php

    r45752 r45766  
    122122</ul>
    123123    <?php if ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) === get_option( 'page_on_front' ) ) : ?>
    124 <div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
    125 <?php endif; ?>
     124    <div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
     125    <?php endif; ?>
     126    <?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' ) ) : ?>
     127    <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>
     128    <?php endif; ?>
    126129</fieldset></td>
    127130</tr>
Note: See TracChangeset for help on using the changeset viewer.