Skip to content

Commit a11571e

Browse files
Docs: Update comments in wp-includes/formatting.php per the documentation standards.
Follow-up to [1345], [8662], [8786], [33624], [34761]. Props kapasias, ankitkumarshah, swissspidy, peterwilsoncc. Fixes #62885. git-svn-id: https://develop.svn.wordpress.org/trunk@59765 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 7d10dd7 commit a11571e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/wp-includes/formatting.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ function wpautop( $text, $br = true ) {
574574
// Replace newlines that shouldn't be touched with a placeholder.
575575
$text = preg_replace_callback( '/<(script|style|svg|math).*?<\/\\1>/s', '_autop_newline_preservation_helper', $text );
576576

577-
// Normalize <br>
577+
// Normalize <br>.
578578
$text = str_replace( array( '<br>', '<br/>' ), '<br />', $text );
579579

580580
// Replace any new line characters that aren't preceded by a <br /> with a <br />.
@@ -621,7 +621,7 @@ function wp_html_split( $input ) {
621621
*
622622
* @since 4.4.0
623623
*
624-
* @return string The regular expression
624+
* @return string The regular expression.
625625
*/
626626
function get_html_split_regex() {
627627
static $regex;
@@ -681,7 +681,7 @@ function get_html_split_regex() {
681681
* @since 4.4.0
682682
*
683683
* @param string $shortcode_regex Optional. The result from _get_wptexturize_shortcode_regex().
684-
* @return string The regular expression
684+
* @return string The regular expression.
685685
*/
686686
function _get_wptexturize_split_regex( $shortcode_regex = '' ) {
687687
static $html_regex;
@@ -723,7 +723,7 @@ function _get_wptexturize_split_regex( $shortcode_regex = '' ) {
723723
* @since 4.4.0
724724
*
725725
* @param string[] $tagnames Array of shortcodes to find.
726-
* @return string The regular expression
726+
* @return string The regular expression.
727727
*/
728728
function _get_wptexturize_shortcode_regex( $tagnames ) {
729729
$tagregexp = implode( '|', array_map( 'preg_quote', $tagnames ) );
@@ -877,7 +877,7 @@ function shortcode_unautop( $text ) {
877877
* @author bmorel at ssi dot fr (modified)
878878
* @since 1.2.1
879879
*
880-
* @param string $str The string to be checked
880+
* @param string $str The string to be checked.
881881
* @return bool True if $str fits a UTF-8 model, false otherwise.
882882
*/
883883
function seems_utf8( $str ) {
@@ -904,7 +904,7 @@ function seems_utf8( $str ) {
904904
return false; // Does not match any model.
905905
}
906906

907-
for ( $j = 0; $j < $n; $j++ ) { // n bytes matching 10bbbbbb follow ?
907+
for ( $j = 0; $j < $n; $j++ ) { // n bytes matching 10bbbbbb follow?
908908
if ( ( ++$i === $length ) || ( ( ord( $str[ $i ] ) & 0xC0 ) !== 0x80 ) ) {
909909
return false;
910910
}
@@ -1139,7 +1139,7 @@ function wp_check_invalid_utf8( $text, $strip = false ) {
11391139
* @since 5.8.3 Added the `encode_ascii_characters` parameter.
11401140
*
11411141
* @param string $utf8_string String to encode.
1142-
* @param int $length Max length of the string
1142+
* @param int $length Max length of the string.
11431143
* @param bool $encode_ascii_characters Whether to encode ascii characters such as < " '
11441144
* @return string String with Unicode encoded for URI.
11451145
*/
@@ -2536,9 +2536,9 @@ function convert_invalid_entities( $content ) {
25362536
*
25372537
* @since 0.71
25382538
*
2539-
* @param string $text Text to be balanced
2539+
* @param string $text Text to be balanced.
25402540
* @param bool $force If true, forces balancing, ignoring the value of the option. Default false.
2541-
* @return string Balanced text
2541+
* @return string Balanced text.
25422542
*/
25432543
function balanceTags( $text, $force = false ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
25442544
if ( $force || (int) get_option( 'use_balanceTags' ) === 1 ) {

0 commit comments

Comments
 (0)