diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 1e55d55f53..6c6b30575a 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -1084,6 +1084,22 @@ function get_super_admins() { } } +/** + * Determines whether user is a site admin. + * + * @since 6.1.0 + * + * This function is an alias for is_super_admin(). + * + * @see is_super_admin() + * + * @param int|false $user_id Optional. The ID of a user. Defaults to false, to check the current user. + * @return bool Whether the user is a site admin. + */ +function is_super_admin_user( $user_id = false ) { + return is_super_admin( $user_id ); +} + /** * Determines whether user is a site admin. * diff --git a/wp-includes/load.php b/wp-includes/load.php index f927fd3e4f..6ea81319fe 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -1154,6 +1154,21 @@ function is_login_screen() { return false !== stripos( wp_login_url(), $_SERVER['SCRIPT_NAME'] ); } +/** + * Determines whether the current request is for an administrative interface page. + * + * This function is an alias for is_admin(). + * + * @since 6.1.0 + * + * @see is_admin() + * + * @return bool True if inside WordPress administration interface, false otherwise. + */ +function is_admin_screen() { + return is_admin(); +} + /** * Determines whether the current request is for an administrative interface page. * @@ -1181,7 +1196,22 @@ function is_admin() { } /** - * Whether the current request is for a site's administrative interface. + * Determines whether the current request is for a site's administrative interface. + * + * This function is an alias for is_blog_admin(). + * + * @since 6.1.0 + * + * @see is_blog_admin() + * + * @return bool True if inside WordPress site administration pages. + */ +function is_site_admin_screen() { + return is_blog_admin(); +} + +/** + * Determines whether the current request is for a site's administrative interface. * * e.g. `/wp-admin/` * @@ -1192,7 +1222,7 @@ function is_admin() { * * @global WP_Screen $current_screen WordPress current screen object. * - * @return bool True if inside WordPress blog administration pages. + * @return bool True if inside WordPress site administration pages. */ function is_blog_admin() { if ( isset( $GLOBALS['current_screen'] ) ) { @@ -1205,7 +1235,24 @@ function is_blog_admin() { } /** - * Whether the current request is for the network administrative interface. + * Determines whether the current request is for the network administrative interface. + * + * e.g. `/wp-admin/network/` + * + * This function is an alias for is_network_admin(). + * + * @since 6.1.0 + * + * @see is_network_admin() + * + * @return bool True if inside WordPress network administration pages. + */ +function is_network_admin_screen() { + return is_network_admin(); +} + +/** + * Determines whether the current request is for the network administrative interface. * * e.g. `/wp-admin/network/` * @@ -1232,7 +1279,24 @@ function is_network_admin() { } /** - * Whether the current request is for a user admin screen. + * Determines whether the current request is for a user admin screen. + * + * e.g. `/wp-admin/user/` + * + * This function is an alias for is_user_admin(). + * + * @since 6.1.0 + * + * @see is_user_admin() + * + * @return bool True if inside WordPress user administration pages. + */ +function is_user_admin_screen() { + return is_user_admin(); +} + +/** + * Determines whether the current request is for a user admin screen. * * e.g. `/wp-admin/user/` * diff --git a/wp-includes/version.php b/wp-includes/version.php index b46be7c718..b2937723bb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-54258'; +$wp_version = '6.1-alpha-54259'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.