Skip to content

Commit 3d36f58

Browse files
Formatting: Add documentation for strip_html_newlines() function
1 parent 3263257 commit 3d36f58

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/wp-includes/formatting.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,14 @@ function shortcode_unautop( $text ) {
868868
return preg_replace( $pattern, '$1', $text );
869869
}
870870

871+
/**
872+
* Strips unnecessary newlines from HTML content.
873+
*
874+
* @since 7.1.0
875+
*
876+
* @param string $text The HTML content to strip newlines from.
877+
* @return string The HTML content with unnecessary newlines removed.
878+
*/
871879
function strip_html_newlines( $text ) {
872880
if ( ! str_contains( $text, "\n" ) && ! str_contains( $text, "\r" ) ) {
873881
return $text;

0 commit comments

Comments
 (0)