WordPress.org

Make WordPress Core

Changeset 37852


Ignore:
Timestamp:
06/23/2016 05:23:47 AM (3 years ago)
Author:
DrewAPicture
Message:

Docs: Improve the formatting and usefulness of information in the DocBlock for sanitize_text_field().

Also adds missing parameter and return descriptions.

See #32246.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r37756 r37852  
    46254625
    46264626/**
    4627  * Sanitize a string from user input or from the db
    4628  *
    4629  * check for invalid UTF-8,
    4630  * Convert single < characters to entity,
    4631  * strip all tags,
    4632  * remove line breaks, tabs and extra white space,
    4633  * strip octets.
     4627 * Sanitizes a string from user input or from the database.
     4628 *
     4629 * - Checks for invalid UTF-8,
     4630 * - Converts single `<` characters to entities
     4631 * - Strips all tags
     4632 * - Removes line breaks, tabs, and extra whitespace
     4633 * - Strips octets
    46344634 *
    46354635 * @since 2.9.0
    46364636 *
    4637  * @param string $str
    4638  * @return string
     4637 * @see wp_check_invalid_utf8()
     4638 * @see wp_strip_all_tags()
     4639 *
     4640 * @param string $str String to sanitize.
     4641 * @return string Sanitized string.
    46394642 */
    46404643function sanitize_text_field( $str ) {
Note: See TracChangeset for help on using the changeset viewer.