From 1251cb8c5eea57adb4d49bba73fb782a00edcb17 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 20 May 2024 13:44:15 +0000 Subject: [PATCH] Coding Standards: Rewrite an empty conditional in `get_post_status()`. Expand the comment to further clarify the post object check performed. Follow-up to [58174]. See #59283. Built from https://develop.svn.wordpress.org/trunk@58175 git-svn-id: http://core.svn.wordpress.org/trunk@57638 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 5 ++--- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 15bbfc7ab2..4741d989fa 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1219,9 +1219,8 @@ function get_post_mime_type( $post = null ) { * @return string|false Post status on success, false on failure. */ function get_post_status( $post = null ) { - if ( $post instanceof WP_Post && isset( $post->filter ) && 'sample' === $post->filter ) { - // Skip normalization - } else { + // Normalize the post object if necessary, skip normalization if called from get_sample_permalink(). + if ( ! $post instanceof WP_Post || ! isset( $post->filter ) || 'sample' !== $post->filter ) { $post = get_post( $post ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index dd413a3f98..c9378a82cb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58174'; +$wp_version = '6.6-alpha-58175'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.