[wp-trac] [WordPress Trac] #53187: wp_filter_content_tags added too early (was: wp_filter_content_tags added to early)
WordPress Trac
noreply at wordpress.org
Sun Jul 25 16:41:19 UTC 2021
#53187: wp_filter_content_tags added too early
-----------------------------+------------------------------
Reporter: maciejmackowiak | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.5
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-----------------------------+------------------------------
Changes (by sabernhardt):
* keywords: => needs-patch
* version: => 5.5
* component: General => Media
Old description:
> Currently wp_filter_content_tags filter is added to the_content filters
> with default priority, this mean that if the iframe is outputted by
> shortcode it will not get the lazy loading attribute.
> I think that it should be addded after do_shortcode has run with priority
> of 12.
New description:
Currently wp_filter_content_tags filter is added to the_content filters
with default priority, this means that if the iframe is outputted by
shortcode it will not get the lazy loading attribute.
I think that it should be added after do_shortcode has run with priority
of 12.
--
Comment:
The `wp_filter_content_tags` filter is added to four places in default-
filters.php:
- [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/default-
filters.php?rev=51388#L178 the_content]
- [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/default-
filters.php?rev=51388#L186 the_excerpt]
- [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/default-
filters.php?rev=51388#L213 widget_text_content]
- [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/default-
filters.php?rev=51388#L218 widget_block_content]
Though `the_excerpt` does not have the `do_shortcode` filter by default,
it could be good to assign the priority of 12 there anyway.
([https://core.trac.wordpress.org/browser/trunk/src/wp-includes/block-
template.php?rev=51321#L169 block-template.php] has `run_shortcode` before
`wp_filter_content_tags`)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53187#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list