Viewing 2 replies - 1 through 2 (of 2 total)
  • It’s understandable that it was done this way because of how annoying it was to conditionally enqueue on the existence of shortcode prior to 3.3. In 3.3, however, you can do use wp_enqueue_script in a shortcode.

    Sorry for not providing a patch, but I fixed it by just moving all of the non-admin enqueues over to wpss_getQuiz. So, unless I’m missing something, it should now be trivial to wrap the existing enqueues with something like this:

    if ( version_compare( get_bloginfo('version'), '3.3.0', '<' ) ) {
    // enqueue code that's already there
    }

    and then copy over the enqueues to the shortcode function with the opposite version compare wrapped around it.

    Nevermind, I was wrong about how simple it would be. I’m fixing this for a client, so I’ll try to provide a patch at some point.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WordPress Simple Survey] Please fix: please don't include styles and js on everypage i’ is closed to new replies.