mirror of
git://develop.git.wordpress.org/
synced 2025-03-21 04:20:01 +01:00
Media: Add lazy-loading support to block-based widgets.
This changeset adds the `wp_filter_content_tags()` function as a filter to `widget_block_content`. Props spacedmonkey, walbo, daisyo. Fixes #53463, #53464. git-svn-id: https://develop.svn.wordpress.org/trunk@51207 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7311d4eb59
commit
41c6786952
@ -215,6 +215,7 @@ add_filter( 'widget_text_content', 'wp_replace_insecure_home_url' );
|
||||
add_filter( 'widget_text_content', 'do_shortcode', 11 ); // Runs after wpautop(); note that $post global will be null when shortcodes run.
|
||||
|
||||
add_filter( 'widget_block_content', 'do_blocks', 9 );
|
||||
add_filter( 'widget_block_content', 'wp_filter_content_tags' );
|
||||
add_filter( 'widget_block_content', 'do_shortcode', 11 );
|
||||
|
||||
add_filter( 'block_type_metadata', 'wp_migrate_old_typography_shape' );
|
||||
|
@ -3022,6 +3022,7 @@ EOF;
|
||||
|
||||
/**
|
||||
* @ticket 50425
|
||||
* @ticket 53463
|
||||
* @dataProvider data_wp_lazy_loading_enabled_context_defaults
|
||||
*
|
||||
* @param string $context Function context.
|
||||
@ -3041,6 +3042,7 @@ EOF;
|
||||
'the_content => true' => array( 'the_content', true ),
|
||||
'the_excerpt => true' => array( 'the_excerpt', true ),
|
||||
'widget_text_content => true' => array( 'widget_text_content', true ),
|
||||
'widget_block_content => true' => array( 'widget_block_content', true ),
|
||||
'get_avatar => true' => array( 'get_avatar', true ),
|
||||
'arbitrary context => true' => array( 'something_completely_arbitrary', true ),
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user