From 016bbeca9bfe96b3e024441059b76a3ad7d31df9 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 2 Jan 2025 18:25:59 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `_reset_front_page_settings_for_post()`. Follow-up to [6337], [25686]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59572 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 3c3a422430324..a197180d9e172 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -3859,11 +3859,11 @@ function _reset_front_page_settings_for_post( $post_id ) { * If the page is defined in option page_on_front or post_for_posts, * adjust the corresponding options. */ - if ( get_option( 'page_on_front' ) == $post->ID ) { + if ( (int) get_option( 'page_on_front' ) === $post->ID ) { update_option( 'show_on_front', 'posts' ); update_option( 'page_on_front', 0 ); } - if ( get_option( 'page_for_posts' ) == $post->ID ) { + if ( (int) get_option( 'page_for_posts' ) === $post->ID ) { update_option( 'page_for_posts', 0 ); } }