Make WordPress Core


Ignore:
Timestamp:
06/02/2021 01:17:37 AM (2 years ago)
Author:
noisysocks
Message:

Widget block: Add widget_block_content filter

Adds a new 'widget_block_content' filter to the widget block and hooks
run_shortcode, autoembed, do_blocks, and do_shortcode into it by
default. This is simlar to widget_text_content.

Fixes #51566.
Props talldanwp.

File:
1 edited

Legend:

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

    r51021 r51058  
    214214add_filter( 'widget_text_content', 'wp_replace_insecure_home_url' );
    215215add_filter( 'widget_text_content', 'do_shortcode', 11 ); // Runs after wpautop(); note that $post global will be null when shortcodes run.
     216
     217add_filter( 'widget_block_content', 'do_blocks', 9 );
     218add_filter( 'widget_block_content', 'do_shortcode', 11 );
    216219
    217220add_filter( 'wp_get_custom_css', 'wp_replace_insecure_home_url' );
Note: See TracChangeset for help on using the changeset viewer.