Make WordPress Core

Changeset 59572


Ignore:
Timestamp:
01/02/2025 06:25:59 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in _reset_front_page_settings_for_post().

Follow-up to [6337], [25686].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r59567 r59572  
    38603860         * adjust the corresponding options.
    38613861         */
    3862         if ( get_option( 'page_on_front' ) == $post->ID ) {
     3862        if ( (int) get_option( 'page_on_front' ) === $post->ID ) {
    38633863            update_option( 'show_on_front', 'posts' );
    38643864            update_option( 'page_on_front', 0 );
    38653865        }
    3866         if ( get_option( 'page_for_posts' ) == $post->ID ) {
     3866        if ( (int) get_option( 'page_for_posts' ) === $post->ID ) {
    38673867            update_option( 'page_for_posts', 0 );
    38683868        }
Note: See TracChangeset for help on using the changeset viewer.