/** * Format the script in a way that will be compatible with WordPress. * * @return void (echoes the script) */ public function enqueue_script() { if (!self::$script_added && '' != self::$postmessage_script) { self::$script_added = true; echo '<script>jQuery(document).ready(function($) { "use strict"; ' . self::$postmessage_script . '});</script>'; } }