Make WordPress Core

Opened 12 years ago

Last modified 7 years ago

#30531 assigned enhancement

Make wptexturize the last filter before output

Reported by: azaozz Owned by: azaozz
Priority: normal Milestone:
Component: Formatting Version:
Severity: normal Keywords:
Cc: Focuses:

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)

#1 @azaozz
12 years ago

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.

#2 @obenland
11 years ago

  • Owner set to azaozz
  • Status new → assigned

#3 @obenland
11 years ago

  • Keywords 4.2-early removed
  • Milestone Future Release → 4.3

#4 @obenland
11 years ago

  • Milestone 4.3 → Future Release

#5 @miqrogroove
11 years ago

#29810 was marked as a duplicate.

#6 @miqrogroove
11 years ago

This goes hand-in-hand with #6984 and I've tried to close all other related tickets as duplicates.

Note: See TracTickets for help on using tickets.