slug = 'ultimatemember';
add_action('admin_head', array(&$this, 'admin_head'), 9);
add_action('admin_enqueue_scripts', array(&$this, 'admin_enqueue_scripts'), 9);
add_filter('admin_body_class', array(&$this, 'admin_body_class'), 9 );
add_filter('enter_title_here', array(&$this, 'enter_title_here') );
}
/***
*** @enter title placeholder
***/
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(){
global $current_screen, $post;
$screen_id = $current_screen->id;
if ( strstr($screen_id, 'um_form') ) $highlighted_id = 3;
if ( strstr($screen_id, 'um_role') ) $highlighted_id = 4;
if ( strstr($screen_id, 'um_directory') ) $highlighted_id = 5;
if ( isset($highlighted_id) ) { ?>
is_plugin_post_type() ){
?>
id;
if ( !is_admin() ) return false;
if ( strstr( $screen_id, 'ultimatemember') || strstr( $screen_id, 'um_') || strstr($screen_id, 'user') || strstr($screen_id, 'profile') )return true;
if ( $screen_id == 'nav-menus' ) return true;
if ( isset( $post->post_type ) ) return true;
return false;
}
/***
*** @Adds class to our admin pages
***/
function admin_body_class($classes){
if ( $this->is_UM_admin() )
$classes .= 'um-admin';
return $classes;
}
/***
*** @Enqueue scripts and styles
***/
function admin_enqueue_scripts(){
global $ultimatemember;
if ( $this->is_UM_admin() ) {
$ultimatemember->styles->wp_enqueue_scripts();
$this->load_global_css();
$this->load_form();
$this->load_modal();
$this->load_dashboard();
$this->load_field();
$this->load_users_js();
$this->load_builder();
$this->load_redux_css();
$this->load_css();
$this->load_core_wp();
$this->load_ajax_js();
$this->load_custom_scripts();
}
}
}