Make WordPress Core

Changeset 53585


Ignore:
Timestamp:
06/28/2022 08:35:45 PM (2 years ago)
Author:
audrasjb
Message:

Docs: Misc fixes in Shortcode API function and hook descriptions, as per documentation standards.

See #55646.

File:
1 edited

Legend:

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

    r51154 r53585  
    3232
    3333/**
    34  * Container for storing shortcode tags and their hook to call for the shortcode
     34 * Container for storing shortcode tags and their hook to call for the shortcode.
    3535 *
    3636 * @since 2.5.0
     
    106106
    107107/**
    108  * Clear all shortcodes.
    109  *
    110  * This function is simple, it clears all of the shortcode tags by replacing the
    111  * shortcodes global by a empty array. This is actually a very efficient method
    112  * for removing all shortcodes.
     108 * Clears all shortcodes.
     109 *
     110 * This function clears all of the shortcode tags by replacing the shortcodes global with
     111 * an empty array. This is actually an efficient method for removing all shortcodes.
    113112 *
    114113 * @since 2.5.0
     
    123122
    124123/**
    125  * Whether a registered shortcode exists named $tag
     124 * Determines whether a registered shortcode exists named $tag.
    126125 *
    127126 * @since 3.6.0
     
    138137
    139138/**
    140  * Whether the passed content contains the specified shortcode
     139 * Determines whether the passed content contains the specified shortcode.
    141140 *
    142141 * @since 3.6.0
     
    171170
    172171/**
    173  * Search content for shortcodes and filter shortcodes through their hooks.
     172 * Searches content for shortcodes and filter shortcodes through their hooks.
    174173 *
    175174 * This function is an alias for do_shortcode().
     
    189188
    190189/**
    191  * Search content for shortcodes and filter shortcodes through their hooks.
     190 * Searches content for shortcodes and filter shortcodes through their hooks.
    192191 *
    193192 * If there are no shortcode tags defined, then the content will be returned
     
    235234
    236235/**
    237  * Retrieve the shortcode regular expression for searching.
     236 * Retrieves the shortcode regular expression for searching.
    238237 *
    239238 * The regular expression combines the shortcode tags in the regular expression
     
    342341     * @since 4.7.0
    343342     *
    344      * @param false|string $return      Short-circuit return value. Either false or the value to replace the shortcode with.
    345      * @param string       $tag         Shortcode name.
    346      * @param array|string $attr        Shortcode attributes array or empty string.
    347      * @param array        $m           Regular expression match array.
     343     * @param false|string $return Short-circuit return value. Either false or the value to replace the shortcode with.
     344     * @param string       $tag    Shortcode name.
     345     * @param array|string $attr   Shortcode attributes array or empty string.
     346     * @param array        $m      Regular expression match array.
    348347     */
    349348    $return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
     
    370369
    371370/**
    372  * Search only inside HTML elements for shortcodes and process them.
     371 * Searches only inside HTML elements for shortcodes and process them.
    373372 *
    374373 * Any [ or ] characters remaining inside elements will be HTML encoded
     
    484483
    485484/**
    486  * Remove placeholders added by do_shortcodes_in_html_tags().
     485 * Removes placeholders added by do_shortcodes_in_html_tags().
    487486 *
    488487 * @since 4.2.3
     
    504503
    505504/**
    506  * Retrieve the shortcode attributes regex.
     505 * Retrieves the shortcode attributes regex.
    507506 *
    508507 * @since 4.4.0
    509508 *
    510  * @return string The shortcode attribute regular expression
     509 * @return string The shortcode attribute regular expression.
    511510 */
    512511function get_shortcode_atts_regex() {
     
    515514
    516515/**
    517  * Retrieve all attributes from the shortcodes tag.
     516 * Retrieves all attributes from the shortcodes tag.
    518517 *
    519518 * The attributes list has the attribute name as the key and the value of the
     
    566565
    567566/**
    568  * Combine user attributes with known attributes and fill in defaults when needed.
     567 * Combines user attributes with known attributes and fill in defaults when needed.
    569568 *
    570569 * The pairs should be considered to be all of the attributes which are
     
    615614
    616615/**
    617  * Remove all shortcode tags from the given content.
     616 * Removes all shortcode tags from the given content.
    618617 *
    619618 * @since 2.5.0
Note: See TracChangeset for help on using the changeset viewer.