Opened 4 years ago
Last modified 3 years ago
#53187 new defect (bug)
wp_filter_content_tags added too early
Reported by: | maciejmackowiak | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Media | Keywords: | needs-patch |
Focuses: | Cc: |
Description (last modified by )
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.
Change History (2)
#1
@
3 years ago
- Component changed from General to Media
- Description modified (diff)
- Keywords needs-patch added
- Summary changed from wp_filter_content_tags added to early to wp_filter_content_tags added too early
- Version set to 5.5
#2
@
3 years ago
A directory search found one plugin using remove_filter
(on both the_content
and the_excerpt
), which would need updating with a priority change.
Note: See
TracTickets for help on using
tickets.
The
wp_filter_content_tags
filter is added to four places in default-filters.php:Though
the_excerpt
does not have thedo_shortcode
filter by default, it could be good to assign the priority of 12 there anyway (in addition to the other three).(block-template.php has
run_shortcode
beforewp_filter_content_tags
)