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.
Built from https://develop.svn.wordpress.org/trunk@54278


git-svn-id: http://core.svn.wordpress.org/trunk@53837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
davidbaumwald 2022-09-21 15:06:12 +00:00
parent b82e57f204
commit 0f97ff203b
2 changed files with 3 additions and 3 deletions

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' );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-54277';
$wp_version = '6.1-alpha-54278';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.