Make WordPress Core

Changeset 37515


Ignore:
Timestamp:
05/22/2016 06:44:38 PM (10 years ago)
Author:
DrewAPicture
Message:

Docs: Standardize filter docs in wp-includes/formatting.php to use third-person singular verbs per the inline documentation standards for PHP.

See #36913.

File:
1 edited

Legend:

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

    r37487 r37515  
    6767        if ( $reset || ! isset( $static_characters ) ) {
    6868                /**
    69                  * Filter whether to skip running wptexturize().
     69                 * Filters whether to skip running wptexturize().
    7070                 *
    7171                 * Passing false to the filter will effectively short-circuit wptexturize().
     
    196196        // Must do this every time in case plugins use these filters in a context sensitive manner
    197197        /**
    198          * Filter the list of HTML elements not to texturize.
     198         * Filters the list of HTML elements not to texturize.
    199199         *
    200200         * @since 2.8.0
     
    204204        $no_texturize_tags = apply_filters( 'no_texturize_tags', $default_no_texturize_tags );
    205205        /**
    206          * Filter the list of shortcodes not to texturize.
     206         * Filters the list of shortcodes not to texturize.
    207207         *
    208208         * @since 2.8.0
     
    13761376        $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", "%", "+", chr(0));
    13771377        /**
    1378          * Filter the list of characters to remove from a filename.
     1378         * Filters the list of characters to remove from a filename.
    13791379         *
    13801380         * @since 2.8.0
     
    13961396        if ( count( $parts ) <= 2 ) {
    13971397                /**
    1398                  * Filter a sanitized filename string.
     1398                 * Filters a sanitized filename string.
    13991399                 *
    14001400                 * @since 2.8.0
     
    14671467
    14681468        /**
    1469          * Filter a sanitized username string.
     1469         * Filters a sanitized username string.
    14701470         *
    14711471         * @since 2.0.1
     
    14941494
    14951495        /**
    1496          * Filter a sanitized key string.
     1496         * Filters a sanitized key string.
    14971497         *
    14981498         * @since 3.0.0
     
    15251525
    15261526        /**
    1527          * Filter a sanitized title string.
     1527         * Filters a sanitized title string.
    15281528         *
    15291529         * @since 1.2.0
     
    16701670        }
    16711671        /**
    1672          * Filter a sanitized HTML class string.
     1672         * Filters a sanitized HTML class string.
    16731673         *
    16741674         * @since 2.8.0
     
    19191919function format_to_edit( $content, $rich_text = false ) {
    19201920        /**
    1921          * Filter the text to be formatted for editing.
     1921         * Filters the text to be formatted for editing.
    19221922         *
    19231923         * @since 1.2.0
     
    23962396
    23972397        /**
    2398          * Filter the Smiley image URL before it's used in the image element.
     2398         * Filters the Smiley image URL before it's used in the image element.
    23992399         *
    24002400         * @since 2.9.0
     
    24792479        if ( strlen( $email ) < 3 ) {
    24802480                /**
    2481                  * Filter whether an email address is valid.
     2481                 * Filters whether an email address is valid.
    24822482                 *
    24832483                 * This filter is evaluated under several different contexts, such as 'email_too_short',
     
    27162716        if ( strlen( $email ) < 3 ) {
    27172717                /**
    2718                  * Filter a sanitized email address.
     2718                 * Filters a sanitized email address.
    27192719                 *
    27202720                 * This filter is evaluated under several contexts, including 'email_too_short',
     
    28592859
    28602860        /**
    2861          * Filter the human readable difference between two timestamps.
     2861         * Filters the human readable difference between two timestamps.
    28622862         *
    28632863         * @since 4.0.0
     
    28982898
    28992899                /**
    2900                  * Filter the number of words in an excerpt.
     2900                 * Filters the number of words in an excerpt.
    29012901                 *
    29022902                 * @since 2.7.0
     
    29062906                $excerpt_length = apply_filters( 'excerpt_length', 55 );
    29072907                /**
    2908                  * Filter the string in the "more" link displayed after a trimmed excerpt.
     2908                 * Filters the string in the "more" link displayed after a trimmed excerpt.
    29092909                 *
    29102910                 * @since 2.9.0
     
    29162916        }
    29172917        /**
    2918          * Filter the trimmed excerpt string.
     2918         * Filters the trimmed excerpt string.
    29192919         *
    29202920         * @since 2.8.0
     
    29722972
    29732973        /**
    2974          * Filter the text content after words have been trimmed.
     2974         * Filters the text content after words have been trimmed.
    29752975         *
    29762976         * @since 3.3.0
     
    29952995
    29962996        /**
    2997          * Filter text before named entities are converted into numbered entities.
     2997         * Filters text before named entities are converted into numbered entities.
    29982998         *
    29992999         * A non-null string must be returned for the filter to be evaluated.
     
    32943294
    32953295        /**
    3296          * Filter the text after it is formatted for the editor.
     3296         * Filters the text after it is formatted for the editor.
    32973297         *
    32983298         * @since 4.3.0
     
    34473447
    34483448        /**
    3449          * Filter a string cleaned and escaped for output as a URL.
     3449         * Filters a string cleaned and escaped for output as a URL.
    34503450         *
    34513451         * @since 2.3.0
     
    35063506        $safe_text = str_replace( "\n", '\\n', addslashes( $safe_text ) );
    35073507        /**
    3508          * Filter a string cleaned and escaped for output in JavaScript.
     3508         * Filters a string cleaned and escaped for output in JavaScript.
    35093509         *
    35103510         * Text passed to esc_js() is stripped of invalid or special characters,
     
    35313531        $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );
    35323532        /**
    3533          * Filter a string cleaned and escaped for output in HTML.
     3533         * Filters a string cleaned and escaped for output in HTML.
    35343534         *
    35353535         * Text passed to esc_html() is stripped of invalid or special characters
     
    35563556        $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );
    35573557        /**
    3558          * Filter a string cleaned and escaped for output in an HTML attribute.
     3558         * Filters a string cleaned and escaped for output in an HTML attribute.
    35593559         *
    35603560         * Text passed to esc_attr() is stripped of invalid or special characters
     
    35803580        $safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) );
    35813581        /**
    3582          * Filter a string cleaned and escaped for output in a textarea element.
     3582         * Filters a string cleaned and escaped for output in a textarea element.
    35833583         *
    35843584         * @since 3.1.0
     
    36013601        $safe_tag = strtolower( preg_replace('/[^a-zA-Z0-9_:]/', '', $tag_name) );
    36023602        /**
    3603          * Filter a string cleaned and escaped for output as an HTML tag.
     3603         * Filters a string cleaned and escaped for output as an HTML tag.
    36043604         *
    36053605         * @since 2.8.0
     
    38733873
    38743874        /**
    3875          * Filter an option value following sanitization.
     3875         * Filters an option value following sanitization.
    38763876         *
    38773877         * @since 2.3.0
     
    39293929                $array = stripslashes_deep( $array );
    39303930        /**
    3931          * Filter the array of variables derived from a parsed string.
     3931         * Filters the array of variables derived from a parsed string.
    39323932         *
    39333933         * @since 2.3.0
     
    40144014
    40154015                        /**
    4016                          * Filter a fragment from the pattern passed to wp_sprintf().
     4016                         * Filters a fragment from the pattern passed to wp_sprintf().
    40174017                         *
    40184018                         * If the fragment is unchanged, then sprintf() will be run on the fragment.
     
    40604060
    40614061        /**
    4062          * Filter the translated delimiters used by wp_sprintf_l().
     4062         * Filters the translated delimiters used by wp_sprintf_l().
    40634063         * Placeholders (%s) are included to assist translators and then
    40644064         * removed before the array of strings reaches the filter.
     
    42834283
    42844284        /**
    4285          * Filter a sanitized text field string.
     4285         * Filters a sanitized text field string.
    42864286         *
    42874287         * @since 2.9.0
     
    43454345        $sani_mime_type = preg_replace( '/[^-+*.a-zA-Z0-9\/]/', '', $mime_type );
    43464346        /**
    4347          * Filter a mime type following sanitization.
     4347         * Filters a mime type following sanitization.
    43484348         *
    43494349         * @since 3.1.3
     
    43724372        $urls_to_ping = implode( "\n", $urls_to_ping );
    43734373        /**
    4374          * Filter a list of trackback URLs following sanitization.
     4374         * Filters a list of trackback URLs following sanitization.
    43754375         *
    43764376         * The string returned here consists of a space or carriage return-delimited list
     
    44654465        if ( empty( $spaces ) ) {
    44664466                /**
    4467                  * Filter the regexp for common whitespace characters.
     4467                 * Filters the regexp for common whitespace characters.
    44684468                 *
    44694469                 * This string is substituted for the \s sequence as needed in regular
     
    45474547        $settings = array(
    45484548                /**
    4549                  * Filter the URL where emoji png images are hosted.
     4549                 * Filters the URL where emoji png images are hosted.
    45504550                 *
    45514551                 * @since 4.2.0
     
    45564556
    45574557                /**
    4558                  * Filter the extension of the emoji png files.
     4558                 * Filters the extension of the emoji png files.
    45594559                 *
    45604560                 * @since 4.2.0
     
    45654565
    45664566                /**
    4567                  * Filter the URL where emoji SVG images are hosted.
     4567                 * Filters the URL where emoji SVG images are hosted.
    45684568                 *
    45694569                 * @since 4.6.0
     
    45744574
    45754575                /**
    4576                  * Filter the extension of the emoji SVG files.
     4576                 * Filters the extension of the emoji SVG files.
    45774577                 *
    45784578                 * @since 4.6.0
Note: See TracChangeset for help on using the changeset viewer.