From b8fa6385d0cc5e797b51b2a1e3338f04764ae70f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 29 Dec 2024 21:54:22 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `sanitize_post()`. Follow-up to [12062]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. Built from https://develop.svn.wordpress.org/trunk@59565 git-svn-id: http://core.svn.wordpress.org/trunk@58951 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 eb90e762f5..cadc929457 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2823,7 +2823,7 @@ function is_sticky( $post_id = 0 ) { function sanitize_post( $post, $context = 'display' ) { if ( is_object( $post ) ) { // Check if post already filtered for this context. - if ( isset( $post->filter ) && $context == $post->filter ) { + if ( isset( $post->filter ) && $context === $post->filter ) { return $post; } if ( ! isset( $post->ID ) ) { @@ -2835,7 +2835,7 @@ function sanitize_post( $post, $context = 'display' ) { $post->filter = $context; } elseif ( is_array( $post ) ) { // Check if post already filtered for this context. - if ( isset( $post['filter'] ) && $context == $post['filter'] ) { + if ( isset( $post['filter'] ) && $context === $post['filter'] ) { return $post; } if ( ! isset( $post['ID'] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 9393470e53..e676469f04 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59564'; +$wp_version = '6.8-alpha-59565'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.