$daysinseconds) { add_action('admin_notices', 'envothemes_review_notice_message'); } } add_action('admin_init', 'envothemes_review_notice'); /** * For the notice preview. */ function envothemes_review_notice_message() { if (isset($_SERVER['REQUEST_URI'])) { $server = sanitize_text_field( wp_unslash($_SERVER['REQUEST_URI'])); } $scheme = (parse_url($server, PHP_URL_QUERY)) ? '&' : '?'; $url = $server . $scheme . 'envothemes_review_dismiss=yes'; $dismiss_url = wp_nonce_url($url, 'envo-review-nonce'); $_later_link = $server . $scheme . 'envothemes_review_later=yes'; $later_url = wp_nonce_url($_later_link, 'envo-review-nonce'); $theme = wp_get_theme(); $themetemplate = $theme->template; $themename = $theme->name; ?>
template; $activetheme = str_replace('-', '_', strtoupper($themetemplate)); $activation_time = get_site_option('envothemes_active_pro_time'); if (!$activation_time) { add_site_option('envothemes_active_pro_time', time()); } $daysinseconds = 86400; // 1 Day in seconds. if (time() - $activation_time > $daysinseconds) { if (defined($activetheme . '_PRO_CURRENT_VERSION')) { return; } add_action('admin_notices', 'envothemes_pro_notice_message'); } } add_action('admin_init', 'envothemes_pro_notice'); /** * For PRO notice */ function envothemes_pro_notice_message() { if (isset($_SERVER['REQUEST_URI'])) { $server = sanitize_text_field( wp_unslash($_SERVER['REQUEST_URI'])); } $scheme = (parse_url($server, PHP_URL_QUERY)) ? '&' : '?'; $url = $server . $scheme . 'envothemes_pro_dismiss=yes'; $dismiss_url = wp_nonce_url($url, 'envo-pro-nonce'); $theme = wp_get_theme(); $themetemplate = $theme->template; $themename = $theme->name; if ($themetemplate == 'enwoo') { $templateurl = 'https://enwoo-wp.com/' . $themetemplate . '-pro/'; } else { $templateurl = 'https://envothemes.com/product/' . $themetemplate . '-pro/'; } ?>
PRO addon') ?>
Enwoo', 'Demos') ?>