Coding Standards: Use strict comparison in `get_posts_by_author_sql()`.
Follow-up to [13576], [25669]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. Built from https://develop.svn.wordpress.org/trunk@59596 git-svn-id: http://core.svn.wordpress.org/trunk@58982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
504d02539f
commit
b273bbf538
|
@ -7358,7 +7358,7 @@ function get_posts_by_author_sql( $post_type, $full = true, $post_author = null,
|
||||||
$id = get_current_user_id();
|
$id = get_current_user_id();
|
||||||
if ( null === $post_author || ! $full ) {
|
if ( null === $post_author || ! $full ) {
|
||||||
$post_status_sql .= " OR post_status = 'private' AND post_author = $id";
|
$post_status_sql .= " OR post_status = 'private' AND post_author = $id";
|
||||||
} elseif ( $id == (int) $post_author ) {
|
} elseif ( $id === (int) $post_author ) {
|
||||||
$post_status_sql .= " OR post_status = 'private'";
|
$post_status_sql .= " OR post_status = 'private'";
|
||||||
} // Else none.
|
} // Else none.
|
||||||
} // Else none.
|
} // Else none.
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.8-alpha-59595';
|
$wp_version = '6.8-alpha-59596';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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