[wp-trac] [WordPress Trac] #23431: [embed] shortcode doesn't work with do_shortcode()

WordPress Trac noreply at wordpress.org
Sat Feb 9 17:04:52 UTC 2013


#23431: [embed] shortcode doesn't work with do_shortcode()
-----------------------------+------------------------------
 Reporter:  jtsternberg      |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |
-----------------------------+------------------------------

Comment (by jtsternberg):

 No, that method doesn't work because it's not a proper static method and
 uses the {{{$this}}} variable which is unavailable. I CAN do
 {{{
         $embed = new WP_Embed();
         $video = $embed->run_shortcode( '[embed width="890"]'. esc_url(
 $video_url ) .'[/embed]' );
 }}}
 But that definitely seems like overkill to me.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23431#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list