mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- 2.0.1 version;
- small code optimization; - fix for update user profile role change;
This commit is contained in:
@@ -21,6 +21,29 @@ if ( ! class_exists( 'Admin' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if current page load UM post type
|
||||
*
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function is_plugin_post_type() {
|
||||
if ( isset( $_REQUEST['post_type'] ) ) {
|
||||
$post_type = $_REQUEST['post_type'];
|
||||
if ( in_array( $post_type, array( 'um_form','um_directory' ) ) ) {
|
||||
return true;
|
||||
}
|
||||
} elseif ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'edit' ) {
|
||||
$post_type = get_post_type();
|
||||
if ( in_array( $post_type, array( 'um_form', 'um_directory' ) ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if plugin is installed with correct folder
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user