Shortcodes: Revert default filter callback changes from apply_shortcodes to do_shortcode.

[54248] reversed the wrapping of `do_shortcode` and `apply_shortcodes` and updated all direct internal calls of `do_shortcode` to `apply_shortcodes` after [47004].  Default filter callbacks that used `do_shortcode` were also updated to use `apply_shortcodes`.  However, this introduced a backward-compatibility break because any attempt to unhook a filter using the previous `do_shortcode` callback would be futile.

This change reverts only the filter callback changes in [54248] to resolve the backward-compatibility break.

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

Props ocean90, SergeyBiryukov.
See #55883.

git-svn-id: https://develop.svn.wordpress.org/trunk@54278 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
David Baumwald
2022-09-21 15:04:16 +00:00
parent 257a83b2e5
commit 2653c8e510

View File

@@ -228,7 +228,7 @@ add_filter( 'widget_text_content', 'do_shortcode', 11 ); // Runs after wpautop()
add_filter( 'widget_block_content', 'do_blocks', 9 );
add_filter( 'widget_block_content', 'wp_filter_content_tags' );
add_filter( 'widget_block_content', 'apply_shortcodes', 11 );
add_filter( 'widget_block_content', 'do_shortcode', 11 );
add_filter( 'block_type_metadata', 'wp_migrate_old_typography_shape' );
@@ -605,7 +605,7 @@ add_action( 'template_redirect', 'redirect_canonical' );
add_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
// Shortcodes.
add_filter( 'the_content', 'apply_shortcodes', 11 ); // AFTER wpautop().
add_filter( 'the_content', 'do_shortcode', 11 ); // AFTER wpautop().
// Media.
add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' );