boundlessnews_show_hide_notice() ){ if( is_multisite() ){ add_action( 'network_admin_notices',array( $this,'boundlessnews_admin_notice' ) ); } else { add_action( 'admin_notices',array( $this,'boundlessnews_admin_notice' ) ); } } add_action( 'wp_ajax_boundlessnews_notice_dismiss', array( $this, 'boundlessnews_notice_dismiss' ) ); add_action( 'switch_theme', array( $this, 'boundlessnews_notice_clear_cache' ) ); if( isset( $_GET['page'] ) && $_GET['page'] == 'boundlessnews-about' ){ add_action('in_admin_header', array( $this,'boundlessnews_hide_all_admin_notice' ),1000 ); } } public function boundlessnews_hide_all_admin_notice(){ remove_all_actions('admin_notices'); remove_all_actions('all_admin_notices'); } public static function boundlessnews_show_hide_notice( $status = false ){ if( $status ){ if( (class_exists( 'Booster_Extension_Class' ) ) || get_option('boundlessnews_admin_notice') ){ return false; }else{ return true; } } // Check If current Page if ( isset( $_GET['page'] ) && $_GET['page'] == 'boundlessnews-about' ) { return false; } // Hide if dismiss notice if( get_option('boundlessnews_admin_notice') ){ return false; } // Hide if all plugin active if ( class_exists( 'Booster_Extension_Class' ) && class_exists( 'Demo_Import_Kit_Class' ) && class_exists( 'Themeinwp_Import_Companion' ) ) { return false; } // Hide On TGMPA pages if ( ! empty( $_GET['tgmpa-nonce'] ) ) { return false; } // Hide if user can't access if ( current_user_can( 'manage_options' ) ) { return true; } } // Define Global Value public static function boundlessnews_admin_notice(){ $theme_info = wp_get_theme(); $theme_name = $theme_info->__get( 'Name' ); ?>

' . esc_html( $current_user->display_name ) . '', '' . esc_html( $theme_name ) . '', 'ONBOARDINGDISCOUNT', '25%' ); ?>