Make WordPress Core


Ignore:
Timestamp:
09/26/2022 10:41:11 PM (2 years ago)
Author:
davidbaumwald
Message:

Shortcodes: Revert recent apply_shortcodes and do_shortcode changes.

[54248] reversed the wrapping of do_shortcode and apply_shortcodes and updated all direct internal calls of do_shortcode to apply_shortcodes after [47004]. After further consideration, the long history of do_shortcodes should be favored over any subjective semantic improvements. This change reverts the remaining changes from #55883 not already reverted in [54278].

Follow-up to [47004], [54248], and [54278].

Props azaozz, jorbin.
See #55883.

File:
1 edited

Legend:

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

    r54248 r54319  
    5353     * Since the [embed] shortcode needs to be run earlier than other shortcodes,
    5454     * this function removes all existing shortcodes, registers the [embed] shortcode,
    55      * calls apply_shortcodes(), and then re-registers the old shortcodes.
     55     * calls do_shortcode(), and then re-registers the old shortcodes.
    5656     *
    5757     * @global array $shortcode_tags
     
    7070
    7171        // Do the shortcode (only the [embed] one is registered).
    72         $content = apply_shortcodes( $content, true );
     72        $content = do_shortcode( $content, true );
    7373
    7474        // Put the original shortcodes back.
     
    178178
    179179    /**
    180      * The apply_shortcodes() callback function.
     180     * The do_shortcode() callback function.
    181181     *
    182182     * Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of
Note: See TracChangeset for help on using the changeset viewer.