• Resolved gidomanders

    (@gidomanders)


    First of all, I see woof_current_values is JSON encoded and put into a string, then on document load it is parsed using jQuery. JSON is short for “JavaScript Object Notation”, so it already is a JavaScript object, you don’t have to put it in a string and parse it using jQuery.

    Second of all, I’d like to defer scripts (I am and SEO expert), though your plugin doesn’t allow me to and gives me errors on jQuery not being loaded. You could just enqueue a script that loads PHP, or even better, only load the settings with PHP into a variable that you use in a separate, enqueued script. This way I can also decide to only load the script on certain pages, without having to modify your plugin.

    If you have any questions, I’m happy to help.

The topic ‘Please, learn how to use JavaScript’ is closed to new replies.