diff --git a/admin.php b/admin.php index 7e83fae..a88b6c1 100644 --- a/admin.php +++ b/admin.php @@ -13,13 +13,8 @@ /* add admin menu for plugin */ -function csm_admin_menu1() -{ - // add_menu_page(__('Coming Soon Mode', 'csm'), __('Coming Soon Mode - Settings', 'csm'), 'activate_plugins', 'csm-settings', 'csm_settings'); - -} add_action('admin_menu', 'csm_admin_menu'); -add_action('wp_footer', 'showfooter'); +add_filter('body_class', 'showfooter'); /* end */ /*dd code*/ add_action("admin_menu", "csm_admin_menu"); @@ -49,50 +44,37 @@ function csm_admin_menu() /** * Define constants showfooter * - * @since 1.0.0 + * @param object $classes classes object. + * * @return void */ -function showfooter() +function showfooter($classes) { global $post; $dis_header = get_option('dis_header'); - $dis_more_option= get_option('dis_more_option');$dis_footer = get_option('dis_footer'); + $dis_more_option= get_option('dis_more_option'); + $dis_footer = get_option('dis_footer'); $dis_sidebar = get_option('dis_sidebar'); $loadonly_content = get_option('csm_appearance'); $getpage = get_option('csm_show_page'); $pageid = $post->ID; - $selected=(array) get_option('csm_show_page'); $selected1=(array)get_option('csm_page'); $csm_page = array_merge($selected, $selected1); - - if ($dis_header == "on" && !is_user_logged_in() && in_array($pageid, $csm_page)) { - ?> - - - - - - - -