Skip to content

Commit

Permalink
Coding Standards: Use strict comparison in `wp-includes/class-wp-user…
Browse files Browse the repository at this point in the history
….php`.

Follow-up to [15919], [21866], [41624].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56184 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jul 10, 2023
1 parent 03ff5a4 commit f933aa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ protected function _init_caps( $cap_key = '' ) {
*/
public function get_role_caps() {
$switch_site = false;
if ( is_multisite() && get_current_blog_id() != $this->site_id ) {
if ( is_multisite() && get_current_blog_id() !== $this->site_id ) {
$switch_site = true;

switch_to_blog( $this->site_id );
Expand Down Expand Up @@ -602,7 +602,7 @@ public function remove_role( $role ) {
* @param string $role Role name.
*/
public function set_role( $role ) {
if ( 1 === count( $this->roles ) && current( $this->roles ) == $role ) {
if ( 1 === count( $this->roles ) && current( $this->roles ) === $role ) {
return;
}

Expand Down

0 comments on commit f933aa3

Please sign in to comment.