[wp-trac] [WordPress Trac] #25435: Intoduce function for use instead of do_shortcode( '[shortcode]' )

WordPress Trac noreply at wordpress.org
Sat Sep 28 21:55:59 UTC 2013


#25435: Intoduce function for use instead of do_shortcode( '[shortcode]' )
-----------------------------+-----------------------
 Reporter:  jdgrimes         |       Owner:
     Type:  feature request  |      Status:  reopened
 Priority:  normal           |   Milestone:
Component:  Shortcodes       |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |
-----------------------------+-----------------------
Changes (by jdgrimes):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 Replying to [comment:1 DrewAPicture]:
 > You can just call the shortcode's callback function directly.
 >
 > So for instance, the `[gallery]` shortcode callback is
 `gallery_shortcode()`, and you can do:
 > {{{
 > echo gallery_shortcode( $attr );
 > }}}

 Yes, I know that and mentioned it above, but it becomes a bigger issue
 when dealing with plugins, which may change the function name without
 notice. I guess maybe that's an edge case though?

 My thinking was that if we make people search through the source looking
 for the right function to call, they'll just call `do_shortcode(
 '[shortcode]' )` instead. If we can point them to an easy to use core
 function, they'll probably use it.

 I think this is the best solution to the problem, but if you don't think
 it's a real problem, or isn't big enough to require this solution, I'll
 respect that.

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


More information about the wp-trac mailing list