Changeset 13635 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support-2024/functions.php
- Timestamp:
- 05/01/2024 12:38:08 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support-2024/functions.php
r13608 r13635 1201 1201 */ 1202 1202 function wporg_support_wrap_standalone_li_tags_in_ul( $content ) { 1203 remove_filter( current_filter(), 'wporg_support_wrap_standalone_li_tags_in_ul', 50 ); 1204 1203 1205 // No lists? No worries. 1204 1206 if ( false === stripos( $content, '<li>' ) ) { … … 1251 1253 return $content; 1252 1254 } 1253 add_filter( 'bbp_get_topic_content', 'wporg_support_wrap_standalone_li_tags_in_ul', 50 ); 1254 add_filter( 'bbp_get_reply_content', 'wporg_support_wrap_standalone_li_tags_in_ul', 50 ); 1255 1256 /** 1257 * Maybe wrap standalone <li> tags in <ul> tags. 1258 * This only wraps non-block-posts. 1259 * 1260 * @see https://meta.trac.wordpress.org/ticket/7618 1261 */ 1262 function wporg_support_maybe_wrap_standalone_li_tags_in_ul( $content ) { 1263 // If it's not a block post, we'll need to filter it after all transforms. 1264 if ( ! has_blocks( $content ) ) { 1265 add_filter( current_filter(), 'wporg_support_wrap_standalone_li_tags_in_ul', 50 ); 1266 } 1267 1268 return $content; 1269 } 1270 add_filter( 'bbp_get_topic_content', 'wporg_support_maybe_wrap_standalone_li_tags_in_ul', 1 ); 1271 add_filter( 'bbp_get_reply_content', 'wporg_support_maybe_wrap_standalone_li_tags_in_ul', 1 ); 1255 1272 1256 1273 /**
Note: See TracChangeset
for help on using the changeset viewer.