[wp-trac] [WordPress Trac] #31093: Make $tag argument optional for has_shortcode()

WordPress Trac noreply at wordpress.org
Thu Jan 22 10:37:24 UTC 2015


#31093: Make $tag argument optional for has_shortcode()
------------------------------------------------+--------------------------
 Reporter:  danielbachhuber                     |       Owner:
     Type:  enhancement                         |      Status:  new
 Priority:  normal                              |   Milestone:  Future
Component:  Shortcodes                          |  Release
 Severity:  normal                              |     Version:
 Keywords:  has-patch dev-feedback 2nd-opinion  |  Resolution:
                                                |     Focuses:
------------------------------------------------+--------------------------

Comment (by ashfame):

 IMO, `has_shortcode()` should be able to check whether string has a
 shortcode in it or not. Checking for a specific one is more of an add-on
 to it. Adding my patch - `trac_31093_modified_has_shortocde.diff`

 Not sure if that function should support an array along with a relation to
 compare, because one can do that with multiple calls to it, but I believe
 the concern would be not to do a regex search multiple times. Thoughts?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31093#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list