I am using a <a href="http://wordpress.org/extend/plugins/youtube-favorite-video-posts/" rel="nofollow">plugin</a> that imports the favourites from a youtube channel as posts in wordpress.
It works great and creates posts with the content:
However, there are no options to add embed parameters such as:
to the embed parameter.
Thus I am considering loading the content into a variable and running a regular expression on it to add the parameter &showinfo=0 after videoid.
I have always struggled with regular expressions, I'm sure the above is not really the right expression. Any help or even another suggestion would be greatly appreciated!
It works great and creates posts with the content:
Code:
<iframe width="670" height="380" src="http://www.youtube.com/embed/videoid" frameborder="0" allowfullscreen></iframe>
However, there are no options to add embed parameters such as:
Code:
&showinfo=0
to the embed parameter.
Thus I am considering loading the content into a variable and running a regular expression on it to add the parameter &showinfo=0 after videoid.
Code:
$video = get_the_content();
echo preg_replace('embed/(?:(?!").)*', "$1&showinfo=0", $video);
I have always struggled with regular expressions, I'm sure the above is not really the right expression. Any help or even another suggestion would be greatly appreciated!