Make WordPress Core

Changeset 58197


Ignore:
Timestamp:
05/25/2024 03:02:48 AM (12 hours ago)
Author:
SergeyBiryukov
Message:

Docs: Update pre_do_shortcode_tag and do_shortcode_tag filter DocBlocks.

This reflects the return type change of shortcode_parse_atts() from array|string to array in WordPress 6.5.

Follow-up to [38506], [38713], [39665], [55711], [57597], [58168].

Props marherumr.
Fixes #61288.

File:
1 edited

Legend:

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

    r57695 r58197  
    418418     *
    419419     * @since 4.7.0
     420     * @since 6.5.0 The `$attr` parameter is always an array.
    420421     *
    421422     * @param false|string $output Short-circuit return value. Either false or the value to replace the shortcode with.
    422423     * @param string       $tag    Shortcode name.
    423      * @param array|string $attr   Shortcode attributes array or the original arguments string if it cannot be parsed.
     424     * @param array        $attr   Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
    424425     * @param array        $m      Regular expression match array.
    425426     */
     
    437438     *
    438439     * @since 4.7.0
     440     * @since 6.5.0 The `$attr` parameter is always an array.
    439441     *
    440      * @param string       $output Shortcode output.
    441      * @param string       $tag    Shortcode name.
    442      * @param array|string $attr   Shortcode attributes array or the original arguments string if it cannot be parsed.
    443      * @param array        $m      Regular expression match array.
     442     * @param string $output Shortcode output.
     443     * @param string $tag    Shortcode name.
     444     * @param array  $attr   Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
     445     * @param array  $m      Regular expression match array.
    444446     */
    445447    return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
     
    601603 *
    602604 * @since 2.5.0
    603  * @since 6.5.0 The function now always returns an empty array,
     605 * @since 6.5.0 The function now always returns an array,
    604606 *              even if the original arguments string cannot be parsed or is empty.
    605607 *
Note: See TracChangeset for help on using the changeset viewer.