mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Coding Standards: Use strict type check for in_array() and array_search().
This addresses all the remaining `WordPress.PHP.StrictInArray.MissingTrueStrict` issues in core. Includes minor code layout fixes for better readability. Follow-up to [47550]. See #49542. git-svn-id: https://develop.svn.wordpress.org/trunk@47557 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -519,7 +519,7 @@ function wp_dashboard_quick_press( $error_msg = false ) {
|
||||
$post = get_default_post_to_edit( 'post', true );
|
||||
$user_id = get_current_user_id();
|
||||
// Don't create an option if this is a super admin who does not belong to this site.
|
||||
if ( in_array( get_current_blog_id(), array_keys( get_blogs_of_user( $user_id ) ) ) ) {
|
||||
if ( in_array( get_current_blog_id(), array_keys( get_blogs_of_user( $user_id ) ), true ) ) {
|
||||
update_user_option( $user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user