From f78e4becbafaad424ce1ce87571549e14e703f40 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Thu, 23 Jun 2016 05:23:47 +0000 Subject: [PATCH] Docs: Improve the formatting and usefulness of information in the DocBlock for `sanitize_text_field()`. Also adds missing parameter and return descriptions. See #32246. git-svn-id: https://develop.svn.wordpress.org/trunk@37852 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/formatting.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 153b9dba44..70f5ef1123 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -4624,18 +4624,21 @@ function wp_strip_all_tags($string, $remove_breaks = false) { } /** - * Sanitize a string from user input or from the db + * Sanitizes a string from user input or from the database. * - * check for invalid UTF-8, - * Convert single < characters to entity, - * strip all tags, - * remove line breaks, tabs and extra white space, - * strip octets. + * - Checks for invalid UTF-8, + * - Converts single `<` characters to entities + * - Strips all tags + * - Removes line breaks, tabs, and extra whitespace + * - Strips octets * * @since 2.9.0 * - * @param string $str - * @return string + * @see wp_check_invalid_utf8() + * @see wp_strip_all_tags() + * + * @param string $str String to sanitize. + * @return string Sanitized string. */ function sanitize_text_field( $str ) { $filtered = wp_check_invalid_utf8( $str );