pass datetime using wp_localize_script to frontend from settings page
Is possible to use the
wp_localize_script fom the front-end? I’vecreated a JS countdown timer that will take an input data from a settings page fom backend. The script that will display the countdown is enqueued only on fornt-end and will be visible only if a checkbox is checked. If I use the
get_option() function and then pass the result to the wp_localize script, will it work as expected? What’s the best way to proceed?