backward.php
1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* Contains function which were introduced in late wordpress versions
*/
if ( ! function_exists('is_network_admin')):
/**
* Whether the current request is for a network admin screen /wp-admin/network/
*
* Does not inform on whether the user is a network admin! Use capability checks to
* tell if the user should be accessing a section or not.
*
* @since 3.1.0
*
* @return bool True if inside WordPress network administration pages.
*/
function is_network_admin() {
if ( defined( 'WP_NETWORK_ADMIN' ) )
return WP_NETWORK_ADMIN;
return false;
}
endif;
if ( ! function_exists('is_user_admin')):
/**
* Whether the current request is for a user admin screen /wp-admin/user/
*
* Does not inform on whether the user is an admin! Use capability checks to
* tell if the user should be accessing a section or not.
*
* @since 3.1.0
*
* @return bool True if inside WordPress user administration pages.
*/
function is_user_admin() {
if ( defined( 'WP_USER_ADMIN' ) )
return WP_USER_ADMIN;
return false;
}
endif;