admin管理员组文章数量:1318569
I have a shortcode which accepts basic HTML tags as shortcode attribute.
When this shortcode is used in the shortcode block i.e within <!-- wp:shortcode -->
then unbalanced <p>
tags are added to the shortcode attribute.
If it is used normally, then no <p>
tags are added.
Are there any workarounds which can be done to avoid this issue ?
function abcd_shortcode( $atts ){
print_r( $atts );
}
add_shortcode('abcd', 'abcd_shortcode');
Output (notice the </p>
and <p>
tags added for no reason in the second array)
Array
(
[html] => <h4>Hey</h4>Outside
)
Array
(
[html] => </p>
<h4>Hey</h4>
<p>Inside
)
本文标签: wp autopDisable wpautop on Shortcode attributes
版权声明:本文标题:wp autop - Disable wpautop on Shortcode attributes 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742047304a2417864.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论