Support » Plugin: YouTube » Conflict with jQuery Updater (and others)

  • Hello,
    We’ve been using your plugin for a while and after updating all our plugins we found that the responsive video feature stopped working.

    In our case, it was jQuery Updater that caused the break.

    This YouTube plugin uses wp_localize_script against jquery to add a configuration variable _EPYT_ to the page which includes what selectors EPfitVids targets. It seems that if a theme or plugin deregisters jquery – e.g. to replace it – your localization is removed so _EPYT_ isn’t set.

    Locally, we changed wp_localize_script('jquery', '_EPYT_', $my_script_vars); to wp_localize_script('__ytprefs__', '_EPYT_', $my_script_vars); in youtube.php so we could continue to use the responsive video feature.

Viewing 1 replies (of 1 total)
  • Plugin Author embedplus

    (@embedplus)

    Hi,

    Our next update has better compatibility with jQuery Updater, although ultimately it really should be up to the jQuery Updater author (and others who replace jQuery) to deregister-reregister jquery in such a way that it does not erase localized scripts.

    We’ve discovered the issue and one of our users has relayed our suggested fix to the author here: https://wordpress.org/support/topic/conflict-with-youtube-plugin/

    -EmbedPlus Team

Viewing 1 replies (of 1 total)
  • The topic ‘Conflict with jQuery Updater (and others)’ is closed to new replies.