Skip to content

Commit 1668719

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54332 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c576adb commit 1668719

File tree

2 files changed

+0
-80
lines changed

2 files changed

+0
-80
lines changed

src/wp-includes/capabilities.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,22 +1084,6 @@ function get_super_admins() {
10841084
}
10851085
}
10861086

1087-
/**
1088-
* Determines whether user is a site admin.
1089-
*
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-
11031087
/**
11041088
* Determines whether user is a site admin.
11051089
*

src/wp-includes/load.php

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,21 +1154,6 @@ function is_login_screen() {
11541154
return false !== stripos( wp_login_url(), $_SERVER['SCRIPT_NAME'] );
11551155
}
11561156

1157-
/**
1158-
* Determines whether the current request is for an administrative interface page.
1159-
*
1160-
* This function is an alias for is_admin().
1161-
*
1162-
* @since 6.1.0
1163-
*
1164-
* @see is_admin()
1165-
*
1166-
* @return bool True if inside WordPress administration interface, false otherwise.
1167-
*/
1168-
function is_admin_screen() {
1169-
return is_admin();
1170-
}
1171-
11721157
/**
11731158
* Determines whether the current request is for an administrative interface page.
11741159
*
@@ -1195,21 +1180,6 @@ function is_admin() {
11951180
return false;
11961181
}
11971182

1198-
/**
1199-
* Determines whether the current request is for a site's administrative interface.
1200-
*
1201-
* This function is an alias for is_blog_admin().
1202-
*
1203-
* @since 6.1.0
1204-
*
1205-
* @see is_blog_admin()
1206-
*
1207-
* @return bool True if inside WordPress site administration pages.
1208-
*/
1209-
function is_site_admin_screen() {
1210-
return is_blog_admin();
1211-
}
1212-
12131183
/**
12141184
* Determines whether the current request is for a site's administrative interface.
12151185
*
@@ -1234,23 +1204,6 @@ function is_blog_admin() {
12341204
return false;
12351205
}
12361206

1237-
/**
1238-
* Determines whether the current request is for the network administrative interface.
1239-
*
1240-
* e.g. `/wp-admin/network/`
1241-
*
1242-
* This function is an alias for is_network_admin().
1243-
*
1244-
* @since 6.1.0
1245-
*
1246-
* @see is_network_admin()
1247-
*
1248-
* @return bool True if inside WordPress network administration pages.
1249-
*/
1250-
function is_network_admin_screen() {
1251-
return is_network_admin();
1252-
}
1253-
12541207
/**
12551208
* Determines whether the current request is for the network administrative interface.
12561209
*
@@ -1278,23 +1231,6 @@ function is_network_admin() {
12781231
return false;
12791232
}
12801233

1281-
/**
1282-
* Determines whether the current request is for a user admin screen.
1283-
*
1284-
* e.g. `/wp-admin/user/`
1285-
*
1286-
* This function is an alias for is_user_admin().
1287-
*
1288-
* @since 6.1.0
1289-
*
1290-
* @see is_user_admin()
1291-
*
1292-
* @return bool True if inside WordPress user administration pages.
1293-
*/
1294-
function is_user_admin_screen() {
1295-
return is_user_admin();
1296-
}
1297-
12981234
/**
12991235
* Determines whether the current request is for a user admin screen.
13001236
*

0 commit comments

Comments
 (0)