Make WordPress Core


Ignore:
Timestamp:
07/10/2023 12:51:51 PM (17 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-includes/class-wp-user.php.

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-user.php

    r56180 r56184  
    501501    public function get_role_caps() {
    502502        $switch_site = false;
    503         if ( is_multisite() && get_current_blog_id() != $this->site_id ) {
     503        if ( is_multisite() && get_current_blog_id() !== $this->site_id ) {
    504504            $switch_site = true;
    505505
     
    603603     */
    604604    public function set_role( $role ) {
    605         if ( 1 === count( $this->roles ) && current( $this->roles ) == $role ) {
     605        if ( 1 === count( $this->roles ) && current( $this->roles ) === $role ) {
    606606            return;
    607607        }
Note: See TracChangeset for help on using the changeset viewer.