Make WordPress Core

Changeset 45586


Ignore:
Timestamp:
07/02/2019 01:44:06 AM (5 years ago)
Author:
pento
Message:

Docs: Update some function docs and signatures.

  • Update the _wp_specialchars() docs to match the function signature.
  • Update the human_time_diff() function signature to match the docs.

Props subrataemfluence.
Fixes #46845.

File:
1 edited

Legend:

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

    r45585 r45586  
    944944 * @staticvar string $_charset
    945945 *
    946  * @param string     $string         The text which is to be encoded.
    947  * @param int|string $quote_style    Optional. Converts double quotes if set to ENT_COMPAT,
    948  *                                   both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES.
    949  *                                   Also compatible with old values; converting single quotes if set to 'single',
    950  *                                   double if set to 'double' or both if otherwise set.
    951  *                                   Default is ENT_NOQUOTES.
    952  * @param string     $charset        Optional. The character encoding of the string. Default is false.
    953  * @param bool       $double_encode Optional. Whether to encode existing html entities. Default is false.
     946 * @param string       $string        The text which is to be encoded.
     947 * @param int|string   $quote_style   Optional. Converts double quotes if set to ENT_COMPAT,
     948 *                                    both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES.
     949 *                                    Also compatible with old values; converting single quotes if set to 'single',
     950 *                                    double if set to 'double' or both if otherwise set.
     951 *                                    Default is ENT_NOQUOTES.
     952 * @param false|string $charset       Optional. The character encoding of the string. Default is false.
     953 * @param bool         $double_encode Optional. Whether to encode existing html entities. Default is false.
    954954 * @return string The encoded text with HTML entities.
    955955 */
     
    36253625 * @return string Human readable time difference.
    36263626 */
    3627 function human_time_diff( $from, $to = '' ) {
     3627function human_time_diff( $from, $to = 0 ) {
    36283628    if ( empty( $to ) ) {
    36293629        $to = time();
Note: See TracChangeset for help on using the changeset viewer.