[wp-trac] [WordPress Trac] #12061: Treatment of shortcodes by wpautop is incomplete
WordPress Trac
noreply at wordpress.org
Fri Sep 5 22:27:22 UTC 2014
#12061: Treatment of shortcodes by wpautop is incomplete
---------------------------------+-----------------------------
Reporter: gcorne | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Shortcodes | Version:
Severity: normal | Resolution:
Keywords: needs-patch wpautop | Focuses:
---------------------------------+-----------------------------
Comment (by mdawaffe):
Some shortcodes may output markup that could be either inline or block.
Imagine a shortcode that outputs an image tag. The post author would
expect that shortcode to be `wpautop()`ed the same way manually entering
the image tag would be:
* no additional markup if entered inline
* `<br />` or `<p>` tags as appropriate if entered on its own line.
Perhaps, just like our `no_texturize_shortcodes` filter, we should also
have a `no_unautop_shortcodes` filter.
That way, shortcode authors could opt out of being unautoped (that is, opt
in to being `wpautop()`ed).
Example patch attachment:12061.diff.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12061#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list