ID,'avante_welcome_admin_notice'); if($current_theme->get('Name')== "Avante Lite" && !$welcome_dismissed){ add_action( 'admin_notices', array( $this, 'avante_welcome_admin_notice' ), 99 ); } wp_enqueue_style( 'avante-welcome-notice-css', get_template_directory_uri() . '/inc/welcome/css/notice.css' ); } } /** * Adds a button to dismiss the notice */ function dismiss_welcome() { global $current_user; $user_id = $current_user->ID; if ( isset($_GET['avante_welcome_dismiss']) && $_GET['avante_welcome_dismiss'] == '1' ) { add_user_meta($user_id, 'avante_welcome_admin_notice', 'true', true); } } /** * Display an admin notice linking to the welcome screen */ public function avante_welcome_admin_notice() { $dismiss_url = ''; ?>
'themely-upgrade-avante', 'title' => esc_html__('Upgrade to Avante Pro ➡', 'avante-lite'), 'href' => 'https://www.themely.com/themes/avante/', 'meta' => array( 'class' => 'themely-toolbar-upgrade', 'target' => '_blank' ) ); $wp_admin_bar->add_node( $args ); } /** * Load welcome screen css and javascript */ public function avante_welcome_style_and_scripts( $hook_suffix ) { if ( 'appearance_page_avante-welcome' == $hook_suffix ) { wp_enqueue_style( 'avante-welcome-screen-css', get_template_directory_uri() . '/inc/welcome/css/welcome.css' ); wp_enqueue_script( 'avante-welcome-screen-js', get_template_directory_uri() . '/inc/welcome/js/welcome.js', array('jquery') ); } } /** * Welcome screen content */ public function avante_welcome_screen() { ?>