Add a Feature to core CP add_shortcode to deal with unwanted wpautop

It’s important for any change to wpautop to have the minimal effects possible on other code and other places in the site, because there are a lot of interactions of this behavior with other plugins, often in surprising places, for example: Add Option To Turn Off wpautop - #5 by raygulick

One way this petition could work that would have the minimal effect in other places would be to add a new “group” of shortcodes that run at a different priority. For example, if wpautop runs today at filter priority 9, and then shortcodes run at filter priority 10, then we could add a new hook to run only the shortcodes with this new $do_wpautop = false parameter set, to run at priority 8 to avoid this issue. (Details to be ironed out and tested but hopefully that makes sense conceptually.)

3 Likes