|
@@ 702-709 (lines=8) @@
|
| 699 |
|
* |
| 700 |
|
* @return bool True if inside WordPress administration interface, false otherwise. |
| 701 |
|
*/ |
| 702 |
|
function is_admin() { |
| 703 |
|
if ( isset( $GLOBALS['current_screen'] ) ) |
| 704 |
|
return $GLOBALS['current_screen']->in_admin(); |
| 705 |
|
elseif ( defined( 'WP_ADMIN' ) ) |
| 706 |
|
return WP_ADMIN; |
| 707 |
|
|
| 708 |
|
return false; |
| 709 |
|
} |
| 710 |
|
|
| 711 |
|
/** |
| 712 |
|
* Whether the current request is for a site's admininstrative interface. |
|
@@ 725-732 (lines=8) @@
|
| 722 |
|
* |
| 723 |
|
* @return bool True if inside WordPress blog administration pages. |
| 724 |
|
*/ |
| 725 |
|
function is_blog_admin() { |
| 726 |
|
if ( isset( $GLOBALS['current_screen'] ) ) |
| 727 |
|
return $GLOBALS['current_screen']->in_admin( 'site' ); |
| 728 |
|
elseif ( defined( 'WP_BLOG_ADMIN' ) ) |
| 729 |
|
return WP_BLOG_ADMIN; |
| 730 |
|
|
| 731 |
|
return false; |
| 732 |
|
} |
| 733 |
|
|
| 734 |
|
/** |
| 735 |
|
* Whether the current request is for the network administrative interface. |
|
@@ 748-755 (lines=8) @@
|
| 745 |
|
* |
| 746 |
|
* @return bool True if inside WordPress network administration pages. |
| 747 |
|
*/ |
| 748 |
|
function is_network_admin() { |
| 749 |
|
if ( isset( $GLOBALS['current_screen'] ) ) |
| 750 |
|
return $GLOBALS['current_screen']->in_admin( 'network' ); |
| 751 |
|
elseif ( defined( 'WP_NETWORK_ADMIN' ) ) |
| 752 |
|
return WP_NETWORK_ADMIN; |
| 753 |
|
|
| 754 |
|
return false; |
| 755 |
|
} |
| 756 |
|
|
| 757 |
|
/** |
| 758 |
|
* Whether the current request is for a user admin screen. |
|
@@ 772-779 (lines=8) @@
|
| 769 |
|
* |
| 770 |
|
* @return bool True if inside WordPress user administration pages. |
| 771 |
|
*/ |
| 772 |
|
function is_user_admin() { |
| 773 |
|
if ( isset( $GLOBALS['current_screen'] ) ) |
| 774 |
|
return $GLOBALS['current_screen']->in_admin( 'user' ); |
| 775 |
|
elseif ( defined( 'WP_USER_ADMIN' ) ) |
| 776 |
|
return WP_USER_ADMIN; |
| 777 |
|
|
| 778 |
|
return false; |
| 779 |
|
} |
| 780 |
|
|
| 781 |
|
/** |
| 782 |
|
* If Multisite is enabled. |