mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Coding Standards: Always use parentheses when instantiating an object.
Note: This will be enforced by WPCS 3.0.0. Props jrf. See #56791. git-svn-id: https://develop.svn.wordpress.org/trunk@54891 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -975,7 +975,7 @@ function user_can( $user, $capability, ...$args ) {
|
||||
if ( empty( $user ) ) {
|
||||
// User is logged out, create anonymous user object.
|
||||
$user = new WP_User( 0 );
|
||||
$user->init( new stdClass );
|
||||
$user->init( new stdClass() );
|
||||
}
|
||||
|
||||
return $user->has_cap( $capability, ...$args );
|
||||
|
||||
Reference in New Issue
Block a user