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:
@@ -51,26 +51,24 @@ if ( ! class_exists( 'Admin_Enqueue' ) ) {
|
||||
/***
|
||||
*** @enter title placeholder
|
||||
***/
|
||||
function enter_title_here( $title ){
|
||||
function enter_title_here( $title ) {
|
||||
$screen = get_current_screen();
|
||||
if ( 'um_directory' == $screen->post_type ){
|
||||
$title = 'e.g. Member Directory';
|
||||
}
|
||||
if ( 'um_role' == $screen->post_type ){
|
||||
$title = 'e.g. Community Member';
|
||||
}
|
||||
if ( 'um_form' == $screen->post_type ){
|
||||
$title = 'e.g. New Registration Form';
|
||||
}
|
||||
return $title;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @Runs on admin head
|
||||
***/
|
||||
function admin_head(){
|
||||
|
||||
if ( $this->is_plugin_post_type() ){
|
||||
if ( UM()->admin()->is_plugin_post_type() ){
|
||||
|
||||
?>
|
||||
|
||||
@@ -87,25 +85,6 @@ if ( ! class_exists( 'Admin_Enqueue' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @check that we're on a custom post type supported by UM
|
||||
***/
|
||||
function is_plugin_post_type(){
|
||||
if (isset($_REQUEST['post_type'])){
|
||||
$post_type = $_REQUEST['post_type'];
|
||||
if ( in_array($post_type, array('um_form','um_role','um_directory'))){
|
||||
return true;
|
||||
}
|
||||
} else if ( isset($_REQUEST['action'] ) && $_REQUEST['action'] == 'edit') {
|
||||
$post_type = get_post_type();
|
||||
if ( in_array($post_type, array('um_form','um_role','um_directory'))){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @Load Form
|
||||
***/
|
||||
|
||||
Reference in New Issue
Block a user