This is my plugin, this will replace the video shortcode format [video url="http://www.youtube.com/watch?v=sOnqjkJTMaA"][video]
(Requirement is to show the video when a user placed a shortcode like this, in the Add New of admin. So I created this plugin with standard format http://www.youtube.com/watch?v=sOnqjkJTMaA.
<?php
/*
Plugin Name: My Plugin
*/
function video_url_format()
{
$content = get_the_content();
$pieces = explode('"', $content);
return $pieces[1];
}
add_action('the_content','video_url_format');
?>
As you mention the WordPress will automatically show the videoplayer. But it will not show the player. If I paste a standard URL from YouTube like http://www.youtube.com/watch?v=sOnqjkJTMaA, it also doesn't show the video player. But if I commented out the line add_action('the_content','video_url_format');
in the plugin, then it will show the video player. So the problem may related to my plugin. Please make some point on it. Help please to complete it.