compare_date = (int) strtotime('now'); if ( current_user_can('administrator') ) { if ( empty(get_option('ashe_update_to_pro_dismiss_notice', false)) ) { add_action( 'admin_init', [$this, 'check_theme_install_time'] ); } } if ( is_admin() ) { add_action( 'admin_head', [$this, 'enqueue_scripts' ] ); } add_action( 'wp_ajax_ashe_update_to_pro_dismiss_notice', [$this, 'ashe_update_to_pro_dismiss_notice'] ); add_action( 'wp_ajax_ashe_update_to_pro_maybe_later', [$this, 'ashe_update_to_pro_maybe_later'] ); } public function check_theme_install_time() { $install_date = (int) get_option('ashe_activation_time_update_to_pro'); if ( get_option('ashe_update_to_pro_maybe_later_time') != false && !(($this->compare_date - $install_date) >= 172800) ) { return; } add_action( 'admin_notices', [$this, 'render_update_to_pro_notice' ]); if ( get_option('ashe_update_to_pro_maybe_later_time') != false && (($this->compare_date - $install_date) >= 172800) ) { delete_option('ashe_update_to_pro_maybe_later_time'); } } public function ashe_update_to_pro_dismiss_notice() { update_option( 'ashe_update_to_pro_dismiss_notice', true ); } public function ashe_update_to_pro_maybe_later() { update_option('ashe_update_to_pro_maybe_later_time', true); delete_option('ashe_activation_time_update_to_pro'); } public function render_update_to_pro_notice() { global $pagenow; if ( is_admin() ) { echo '

Important Information!

Dear Ashe Theme users, our website wp-royal-themes.com is currently not available, we are migrating our servers to much better and faster infrastructure and this might take a few days. During this period if you will need support you can post your questions here, or if you are a PRO user you can contact us via this email info.wproyal@gmail.com.

If you are interested to Upgrade to the Ashe PRO version just follow the button below. After purchasing you will get the Ashe PRO theme and License key via your email.
Thanks for Understanding.

Upgrade to Pro Remind Me In 2 Days

'; } } public function enqueue_scripts() { echo " "; } } if ( 'Ashe' === wp_get_theme()->get('Name')) { new asheUpdateToProNotice(); }