Opened 5 years ago
Last modified 4 years ago
#53187 new defect (bug)
wp_filter_content_tags added too early
| Reported by: |
|
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
@
4 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
@
4 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_tagsfilter is added to four places in default-filters.php:Though
the_excerptdoes not have thedo_shortcodefilter 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_shortcodebeforewp_filter_content_tags)