[wp-trac] [WordPress Trac] #37767: Conditionally modify $tagnames in strip_shortcodes()

WordPress Trac noreply at wordpress.org
Sun Oct 2 08:43:31 UTC 2016


#37767: Conditionally modify $tagnames in strip_shortcodes()
-----------------------------------------------------+------------------
 Reporter:  danielbachhuber                          |       Owner:
     Type:  enhancement                              |      Status:  new
 Priority:  normal                                   |   Milestone:  4.7
Component:  Shortcodes                               |     Version:
 Severity:  normal                                   |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-tests  |     Focuses:
-----------------------------------------------------+------------------
Changes (by swissspidy):

 * keywords:  needs-unit-tests good-first-bug has-patch needs-testing =>
     good-first-bug has-patch has-unit-tests
 * milestone:  Future Release => 4.7


Comment:

 Thanks for your updated patch @orvils! It works really well and the tests
 look good too. Note that you can add the `has-unit-tests` keyword in such
 a case. I'm moving this to the 4.7 milestone for consideration :-)

 I think we can simplify the patch a bit though. There's no need for
 `$tag_array` to be a key => value array. Also, there are already a bunch
 of shortcodes registered in the test suite we can use instead of adding
 another one.

 In [attachment:37767.diff] I moved the tests to a data provider which
 makes it easier to add additional tests if needed. Plus I changed the new
 code slightly to follow the WordPress
 [https://make.wordpress.org/core/handbook/best-practices/coding-standards/
 coding and documentation standards].

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


More information about the wp-trac mailing list