Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 512573

Format multiline content with wpautop

$
0
0

Replies: 0

I suggest to format any multiline content in widgets with wpautop() to get paragraphs from two line breaks.

For example, I have to wrap wp_kses_post($team_member['details']) in wpautop (and get echo wpautop(wp_kses_post($team_member['details']))) to get long description into <p> tags. lsow-team-members-widget/tpl/default.php?rev=1463047#L53

Also, I suggest you to use WordPress filters and hooks to allow customizing of widgets instead of editing code of widgets.


Viewing all articles
Browse latest Browse all 512573

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>