Make WordPress Core

Changeset 54278


Ignore:
Timestamp:
09/21/2022 03:04:16 PM (2 years ago)
Author:
davidbaumwald
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r54248 r54278  
    229229add_filter( 'widget_block_content', 'do_blocks', 9 );
    230230add_filter( 'widget_block_content', 'wp_filter_content_tags' );
    231 add_filter( 'widget_block_content', 'apply_shortcodes', 11 );
     231add_filter( 'widget_block_content', 'do_shortcode', 11 );
    232232
    233233add_filter( 'block_type_metadata', 'wp_migrate_old_typography_shape' );
     
    606606
    607607// Shortcodes.
    608 add_filter( 'the_content', 'apply_shortcodes', 11 ); // AFTER wpautop().
     608add_filter( 'the_content', 'do_shortcode', 11 ); // AFTER wpautop().
    609609
    610610// Media.
Note: See TracChangeset for help on using the changeset viewer.