WordPress.org

Make WordPress Core

Ticket #46831: 46831.diff

File 46831.diff, 863 bytes (added by subrataemfluence, 8 months ago)
  • options-reading.php

    diff --git a/options-reading.php b/options-reading.php
    index f302f70..076f332 100755
    a b else : 
    124124<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
    125125<?php endif; ?>
    126126
     127<?php
     128/**
     129 * Since 5.2 Privacy Policy page should not be set either as Homepage or as Posts page
     130 */
     131$privacy_policy_page = (int) get_option( 'wp_page_for_privacy_policy' );
     132
     133if( $privacy_policy_page === (int)get_option( 'page_on_front' ) ||  $privacy_policy_page === (int)get_option( 'page_for_posts' ) ) : ?>
     134        <div id="front-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>
     135<?php endif; ?>
    127136
    128137</fieldset></td>
    129138</tr>