Make WordPress Core


Ignore:
Timestamp:
12/19/2015 04:55:50 AM (9 years ago)
Author:
DrewAPicture
Message:

Docs: Add missing DocBlocks for mb_strlen() and _mb_strlen().

Both will be ignored from parsing as and serve as compat functions for PHP's mb_strlen(), which is not enabled by default.

Introduced in [32114].

See #32246.

File:
1 edited

Legend:

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

    r36018 r36019  
    4848     * @ignore
    4949     * @since 3.2.0
     50     *
     51     * @see _mb_substr()
    5052     *
    5153     * @param string      $str      The string to extract the substring from.
     
    131133
    132134if ( ! function_exists( 'mb_strlen' ) ) :
     135    /**
     136     * Compat function to mimic mb_strlen().
     137     *
     138     * @ignore
     139     * @since 4.2.0
     140     *
     141     * @see _mb_strlen()
     142     *
     143     * @param string      $str      The string to retrieve the character length from.
     144     * @param string|null $encoding Optional. Character encoding to use. Default null.
     145     * @return int String length of `$str`.
     146     */
    133147    function mb_strlen( $str, $encoding = null ) {
    134148        return _mb_strlen( $str, $encoding );
     
    136150endif;
    137151
    138 /*
     152/**
     153 * Internal compat function to mimic mb_strlen().
     154 *
    139155 * Only understands UTF-8 and 8bit.  All other character sets will be treated as 8bit.
    140  * For $encoding === UTF-8, the $str input is expected to be a valid UTF-8 byte sequence.
    141  * The behavior of this function for invalid inputs is undefined.
     156 * For $encoding === UTF-8, the `$str` input is expected to be a valid UTF-8 byte
     157 * sequence. The behavior of this function for invalid inputs is undefined.
     158 *
     159 * @ignore
     160 * @since 4.2.0
     161 *
     162 * @param string      $str      The string to retrieve the character length from.
     163 * @param string|null $encoding Optional. Character encoding to use. Default null.
     164 * @return int String length of `$str`.
    142165 */
    143166function _mb_strlen( $str, $encoding = null ) {
Note: See TracChangeset for help on using the changeset viewer.