$data){ if(!empty($data['settings'])){ $js_settings[$slug] = $data['settings']; } } wp_localize_script('formlayer-pro-admin', 'formlayer_pro', [ 'nonce' => wp_create_nonce('formlayer_pro_admin_nonce'), 'ajax_url' => admin_url('admin-ajax.php'), 'admin_page_url' => admin_url('admin.php?page=formlayer'), 'settings' => $js_settings, 'html_templates' => \FormLayerPro\Templates::js_templates() ]); } static function formlayer_pro_free_version_nag(){ if(!defined('FORMLAYER_VERSION')){ return; } $dismissed_free = (int) get_option('formlayer_version_free_nag'); $dismissed_pro = (int) get_option('formlayer_version_pro_nag'); // Checking if time has passed since the dismiss. if(!empty($dismissed_free) && time() < $dismissed_pro && !empty($dismissed_pro) && time() < $dismissed_pro){ return; } $showing_error = false; if(version_compare(FORMLAYER_VERSION, FORMLAYER_PRO_VERSION) > 0 && (empty($dismissed_pro) || time() > $dismissed_pro)){ $showing_error = true; echo '
'.esc_html__('You are using an older version of FormLayer Pro. We recommend updating to the latest version to ensure seamless and uninterrupted use of the application.', 'formlayer-pro').'
'.esc_html__('You are using an older version of FormLayer. We recommend updating to the latest free version to ensure smooth and uninterrupted use of the application.', 'formlayer-pro').'