Rather than adding a block of JS, consider using `wp_add_inline_script()` function call that references an enqueued script, so that it only gets printed out if the script was indeed output.
You might also like to avoid hard-coding a dateFormat and use the date format already stored in the WP settings for consistency.
You might also like to avoid hard-coding a dateFormat and use the date format already stored in the WP settings for consistency.
_Originally posted by @GaryJones in https://github.com/ns-rx/poetwp/pull/13#discussion_r1730400258_