From 0f97ff203badca75a3f4b1efb4def272aecd0207 Mon Sep 17 00:00:00 2001 From: davidbaumwald Date: Wed, 21 Sep 2022 15:06:12 +0000 Subject: [PATCH] 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 --- wp-includes/default-filters.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index f23872de30..126d276417 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -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' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 518476d2bf..6e904f0dba 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.