Make WordPress Core


Ignore:
Timestamp:
09/27/2022 04:29:59 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Bootstrap/Load: Revert the is_*_admin_screen() aliases for is_*_admin() function family.

After some further discussion, it is apparent that the added clarity was subjective, and the _screen suffix may not always be appropriate, e.g. in Ajax context. To address any confusion with the existing names, the documentation for these functions can be updated instead.

Additionally, the is_super_admin_user() alias for is_super_admin() is reverted as well, which may be reconsidered in the future.

Follow-up to [54259].

Props azaozz, jrf, johnbillion, manfcarlo, Clorith.
See #56400.

File:
1 edited

Legend:

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

    r54259 r54332  
    10881088 * Determines whether user is a site admin.
    10891089 *
    1090  * @since 6.1.0
    1091  *
    1092  * This function is an alias for is_super_admin().
    1093  *
    1094  * @see is_super_admin()
    1095  *
    1096  * @param int|false $user_id Optional. The ID of a user. Defaults to false, to check the current user.
    1097  * @return bool Whether the user is a site admin.
    1098  */
    1099 function is_super_admin_user( $user_id = false ) {
    1100     return is_super_admin( $user_id );
    1101 }
    1102 
    1103 /**
    1104  * Determines whether user is a site admin.
    1105  *
    11061090 * @since 3.0.0
    11071091 *
Note: See TracChangeset for help on using the changeset viewer.