Few remarks about your code:
1) First you should use something like:
https://www.youtube.com/v/EhWopzlRwZ8
instead of the YouTube page:
https://www.youtube.com/watch?v=EhWopzlRwZ8
in your embed code.
2) You can always use the </code> shortcode if you need to embed YouTube videos:</p>
<pre><code>https://www.youtube.com/watch?v=EhWopzlRwZ8
3) You should consider adding a prefix to your shortcode callback, for example macko_tarana_
to avoid function name collision with other plugins.
4) Try to avoid extract(...
, use $atts = shortcode_atts(...
instead.
5) Consider atting the third parameter to shortcode_atts
, i.e. the shortcode name so you can use the shortcode_atts_{$shortcode}
filter. More about it here in the Codex.
6) Always escape the input attributes, for example with esc_attr()
or esc_url()
.
Hope this helps.