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
This commit is contained in:
parent
e1034e15f0
commit
1251cb8c5e
|
@ -1219,9 +1219,8 @@ function get_post_mime_type( $post = null ) {
|
||||||
* @return string|false Post status on success, false on failure.
|
* @return string|false Post status on success, false on failure.
|
||||||
*/
|
*/
|
||||||
function get_post_status( $post = null ) {
|
function get_post_status( $post = null ) {
|
||||||
if ( $post instanceof WP_Post && isset( $post->filter ) && 'sample' === $post->filter ) {
|
// Normalize the post object if necessary, skip normalization if called from get_sample_permalink().
|
||||||
// Skip normalization
|
if ( ! $post instanceof WP_Post || ! isset( $post->filter ) || 'sample' !== $post->filter ) {
|
||||||
} else {
|
|
||||||
$post = get_post( $post );
|
$post = get_post( $post );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue