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/media.php

    r54248 r54319  
    22972297            $style,
    22982298            esc_attr( $class ),
    2299             apply_shortcodes( $content ),
     2299            do_shortcode( $content ),
    23002300            sprintf(
    23012301                '<figcaption %sclass="wp-caption-text">%s</figcaption>',
     
    23102310            $style,
    23112311            esc_attr( $class ),
    2312             str_replace( '<img ', '<img ' . $describedby, apply_shortcodes( $content ) ),
     2312            str_replace( '<img ', '<img ' . $describedby, do_shortcode( $content ) ),
    23132313            sprintf(
    23142314                '<p %sclass="wp-caption-text">%s</p>',
Note: See TracChangeset for help on using the changeset viewer.