Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #35022, comment 14


Ignore:
Timestamp:
03/17/2016 06:39:24 PM (8 years ago)
Author:
steevithak
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35022, comment 14

    initial v1  
    1 @chriscct7 @johnbillion  I've grabbed the trunk source and started working on this. Looking back at prior versions of WP, I'm a bit baffled by some of the current code in shortcodes.php. Just a few version back, say in 4.2.2, the code is very elegant and compact with a single regex that identifies shortcodes. That one regex in get_shortcode_regex() is loaded by other functions in shortcodes.php that need to identify or parse shortcodes. But in the latest shortcodes.php, there several different methods being used to parse short codes. Some functions still use get_shortcode_regex() but other functions now use their own, slightly different regexes. (one of the functions already handles unicode non-breaking spaces indirectly by replacing them with 0x20 spaces prior to running the regex.) Where can I get more information on the rational behind these changes? Is there a developer mailing list or forum thread someone can point me to that might clue me in to why these changes were made in recent versions? There must be some reason for using multiple different methods of parsing shortcodes in different places and without understanding why, I'm afraid I may break something else while fixing the non-breaking space issue. :(
     1@chriscct7 @johnbillion  I've grabbed the trunk source and started working on this. Looking back at prior versions of WP, I'm a bit baffled by some of the current code in shortcodes.php. Just a few versions back, say in 4.2.2, the code is very elegant and compact with a single regex that identifies shortcodes. That one regex in get_shortcode_regex() is loaded by other functions in shortcodes.php that need to identify or parse shortcodes. But in the latest shortcodes.php, there several different methods being used to parse short codes. Some functions still use get_shortcode_regex() but other functions now use their own, slightly different regexes. (one of the functions already handles unicode non-breaking spaces indirectly by replacing them with 0x20 spaces prior to running the regex.) Where can I get more information on the rational behind these changes? Is there a developer mailing list or forum thread someone can point me to that might clue me in to why these changes were made in recent versions? There must be some reason for using multiple different methods of parsing shortcodes in different places and without understanding why, I'm afraid I may break something else while fixing the non-breaking space issue. :(