From 1ea8475be259d58e524ec7f1edcf7f5ea51ca10b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 2 Jan 2025 18:27:23 +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. Built from https://develop.svn.wordpress.org/trunk@59572 git-svn-id: http://core.svn.wordpress.org/trunk@58958 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 3c3a422430..a197180d9e 100644 --- a/wp-includes/post.php +++ b/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 ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index e8b6015fd7..b3ed9221a2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59571'; +$wp_version = '6.8-alpha-59572'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.