Format multiline content with wpautop
-
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'])inwpautop(and getecho wpautop(wp_kses_post($team_member['details']))) to get long description into<p>tags. lsow-team-members-widget/tpl/default.php?rev=1463047#L53Also, I suggest you to use WordPress filters and hooks to allow customizing of widgets instead of editing code of widgets.
The topic ‘Format multiline content with wpautop’ is closed to new replies.