[wp-trac] [WordPress Trac] #50683: Parse content for shortcodes instead of using regex

WordPress Trac noreply at wordpress.org
Sat Jul 18 09:46:26 UTC 2020


#50683: Parse content for shortcodes instead of using regex
--------------------------------------+---------------------
 Reporter:  cfinke                    |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  5.6
Component:  Shortcodes                |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by johnbillion):

 Thinking out loud: the `parse()` method could return early when there's no
 `[` character in the content. Something like:

 {{{
 if ( false === strpos( $this->content, '[' ) ) {
     return $this->content;
 }
 }}}

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


More information about the wp-trac mailing list