esc_url(get_option('agelocator_exit_url', 'https://www.google.com')) )); // Output modal HTML ?>

'string', 'sanitize_callback' => 'esc_url_raw', 'default' => 'https://www.google.com' )); register_setting('agelocator_settings', 'agelocator_show_credits', array( 'type' => 'boolean', 'sanitize_callback' => 'rest_sanitize_boolean', 'default' => false )); register_setting('agelocator_settings', 'agelocator_show_upgrade', array( 'type' => 'boolean', 'sanitize_callback' => 'rest_sanitize_boolean', 'default' => false )); } // Enqueue admin script for notice dismissal add_action('admin_enqueue_scripts', 'agelocator_admin_scripts'); function agelocator_admin_scripts($hook) { if ($hook !== 'settings_page_agelocator-settings') { return; } wp_enqueue_script('agelocator-admin', AGELOCATOR_PLUGIN_URL . 'assets/js/admin.js', array('jquery'), AGELOCATOR_VERSION, true); wp_localize_script('agelocator-admin', 'agelocator_admin_params', array( 'ajax_url' => admin_url('admin-ajax.php'), 'dismiss_nonce' => wp_create_nonce('agelocator_dismiss') )); } // Add admin notice for premium upgrade add_action('admin_notices', 'agelocator_admin_notice'); function agelocator_admin_notice() { $screen = get_current_screen(); if ($screen->id !== 'settings_page_agelocator-settings') { return; } if (get_user_meta(get_current_user_id(), 'agelocator_notice_dismissed', true)) { return; } ?>

/>

/>