Opened 10 years ago
Last modified 5 years ago
#30531 assigned enhancement
Make wptexturize the last filter before output
Reported by: | azaozz | Owned by: | azaozz |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | |
Focuses: | Cc: |
Description
This will allow it to be simplified/refactored and run faster.
Advantages:
- Not looking at shortcodes as it will run after do_shortcode(). That will make it less complex and faster. This also avoids all edge cases with shortcodes.
- Better detection/handling of quotes around
<p>
tags as it will run after wpautop(). Also, preg_split() will split the text in more chunks which will be easier to process.
Disadvantage: the no_texturize_shortcodes
filter will stop working.
Change History (6)
Note: See
TracTickets for help on using
tickets.
We've discussed this with @miqrogroove some time ago and it seems the best way forward.
A simple workaround for the
no_texturize_shortcodes
filter would be to insert markers around these shortcodes, and remove them after wptexturize() (as discussed in https://core.trac.wordpress.org/ticket/29608#comment:13).Alternatively that filter can be deprecated, depending on how many plugins are using it. Certain HTML tags are excluded from texturizing, and more can be added by plugins. For example the
[code]
shortcode would be replaced by<pre>
or<code>
tag, both of which are excluded.