Make WordPress Core


Ignore:
Timestamp:
08/03/2023 12:08:30 PM (20 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use instanceof keyword instead of the is_a() function.

This is a micro-optimization that removes a few unnecessary function calls.

Follow-up to [31188], [34369], [38986], [41159], [43211], [43230], [44606], [45757].

Props ayeshrajans, jrf, rajinsharwar, costdev, mukesh27, SergeyBiryukov.
Fixes #58943.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r56245 r56352  
    13041304
    13051305            // Check if it is time to add a redirect to the admin email confirmation screen.
    1306             if ( is_a( $user, 'WP_User' ) && $user->exists() && $user->has_cap( 'manage_options' ) ) {
     1306            if ( $user instanceof WP_User && $user->exists() && $user->has_cap( 'manage_options' ) ) {
    13071307                $admin_email_lifespan = (int) get_option( 'admin_email_lifespan' );
    13081308
Note: See TracChangeset for help on using the changeset viewer.