WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Not working with 3.5

[Resolved] Not working with 3.5

Viewing 5 replies - 1 through 5 (of 5 total)
  • 3.5 isn’t the issue… the plugin simply doesn’t work, because Youtube changed their system.

    You need to replace the ampersands with question marks and remove “?feature=oembed” entirely. I’m not sure if there’s a downside to doing this… all I know is that it works.

    Here’s the bad code on line 33:
    return str_replace('&feature=oembed', '&feature=oembed&rel=0', $data);

    And here’s what it should be:
    return str_replace('?feature=oembed', '?rel=0', $data);

    However, if you’re like me and use other embeds, like Flickr, you’ll want to make this adjustment for Youtube embeds only. So here’s what I changed line 33 to:

    $data = preg_replace('/(youtube\.com.*)(\?feature=oembed)(.*)/', '$1?rel=0$3', $data);
    return $data;

    Hope that helps.

    Your code update works for me on WP 3.5.1
    Thanks!

    Plugin Author sparkweb

    @sparkweb

    @david, thanks so much for the fix on this. I’ve updated the plugin.

    I also cannot get the plugin to work. I activated the plugin, cleared the cache, yet there is no change to the YouTube video code. Here is what it looks like:
    <td>[lightbox type=”youtube” title=”Title” youtube_id=”OYaY2XOEcKs”]<img class=”alignnone size-medium wp-image-2942″ title=”United Way” src=”http://www.miceliproductions.com/wpsite/wp-content/uploads/United-Way-300×214.jpg” alt=”” width=”243″ height=”172″ />[/lightbox]</td>

    In you comment to mayhday, you reference changing the code – is that what I have to do? I am not used to working in the code.
    Thanks.

    Plugin Author sparkweb

    @sparkweb

    This plugin has no effect on this usage. It only works when you are using oembed. Read about oembed here: http://codex.wordpress.org/Embeds#oEmbed

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Not working with 3.5’ is closed to new replies.