- fixed is_um_screen() function for new a widgets admin area

This commit is contained in:
ashubawork
2021-07-08 11:26:35 +03:00
parent fec9c50c1c
commit 384ab3b988
+9 -7
View File
@@ -44,16 +44,18 @@ if ( ! class_exists( 'um\admin\Admin_Functions' ) ) {
*/
function is_um_screen() {
global $current_screen;
$screen_id = $current_screen->id;
$is_um_screen = false;
if ( strstr( $screen_id, 'ultimatemember') ||
strstr( $screen_id, 'um_') ||
strstr( $screen_id, 'user' ) ||
strstr( $screen_id, 'profile' ) ||
$screen_id == 'nav-menus' ) {
$is_um_screen = true;
if ( ! empty( $current_screen ) ) {
$screen_id = $current_screen->id;
if ( strstr( $screen_id, 'ultimatemember' ) ||
strstr( $screen_id, 'um_' ) ||
strstr( $screen_id, 'user' ) ||
strstr( $screen_id, 'profile' ) ||
$screen_id == 'nav-menus' ) {
$is_um_screen = true;
}
}
if ( $this->is_plugin_post_type() ) {