WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #29557, comment 83


Ignore:
Timestamp:
10/01/2014 02:23:04 AM (7 years ago)
Author:
kitchin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29557, comment 83

    v1 v2  
    1818My code uses better tag logic in the second part of your suggestion to catch comments (all done with strpos()), but it's the same idea. The reverse idea, tags first then shortcodes, also fails tests.
    1919
    20 Miqro's patch is ideal for the current tests, with one caveat: the tag regex is executed twice for each match (once in the implicit `preg_split` loop and once in the `foreach` loop). To avoid running the regex twice I have some code that saves data on each part of the split match, but it's execution expensive.
     20Miqro's patch is ideal for the current tests, with one caveat: the ''shortcode'' regex is executed twice for each match (once in the implicit `preg_split` loop and once in the `foreach` loop). To avoid running the regex twice I have some code that saves data on each part of the split match, but it's execution expensive.