@@ 708-715 (lines=8) @@ | ||
705 | * |
|
706 | * @return bool True if inside WordPress administration interface, false otherwise. |
|
707 | */ |
|
708 | function is_admin() { |
|
709 | if ( isset( $GLOBALS['current_screen'] ) ) |
|
710 | return $GLOBALS['current_screen']->in_admin(); |
|
711 | elseif ( defined( 'WP_ADMIN' ) ) |
|
712 | return WP_ADMIN; |
|
713 | ||
714 | return false; |
|
715 | } |
|
716 | ||
717 | /** |
|
718 | * Whether the current request is for a site's admininstrative interface. |
|
@@ 731-738 (lines=8) @@ | ||
728 | * |
|
729 | * @return bool True if inside WordPress blog administration pages. |
|
730 | */ |
|
731 | function is_blog_admin() { |
|
732 | if ( isset( $GLOBALS['current_screen'] ) ) |
|
733 | return $GLOBALS['current_screen']->in_admin( 'site' ); |
|
734 | elseif ( defined( 'WP_BLOG_ADMIN' ) ) |
|
735 | return WP_BLOG_ADMIN; |
|
736 | ||
737 | return false; |
|
738 | } |
|
739 | ||
740 | /** |
|
741 | * Whether the current request is for the network administrative interface. |
|
@@ 754-761 (lines=8) @@ | ||
751 | * |
|
752 | * @return bool True if inside WordPress network administration pages. |
|
753 | */ |
|
754 | function is_network_admin() { |
|
755 | if ( isset( $GLOBALS['current_screen'] ) ) |
|
756 | return $GLOBALS['current_screen']->in_admin( 'network' ); |
|
757 | elseif ( defined( 'WP_NETWORK_ADMIN' ) ) |
|
758 | return WP_NETWORK_ADMIN; |
|
759 | ||
760 | return false; |
|
761 | } |
|
762 | ||
763 | /** |
|
764 | * Whether the current request is for a user admin screen. |
|
@@ 778-785 (lines=8) @@ | ||
775 | * |
|
776 | * @return bool True if inside WordPress user administration pages. |
|
777 | */ |
|
778 | function is_user_admin() { |
|
779 | if ( isset( $GLOBALS['current_screen'] ) ) |
|
780 | return $GLOBALS['current_screen']->in_admin( 'user' ); |
|
781 | elseif ( defined( 'WP_USER_ADMIN' ) ) |
|
782 | return WP_USER_ADMIN; |
|
783 | ||
784 | return false; |
|
785 | } |
|
786 | ||
787 | /** |
|
788 | * If Multisite is enabled. |