Opened 5 years ago
Last modified 5 years ago
#53187 new defect (bug)
wp_filter_content_tags added too early
| Reported by: | maciejmackowiak | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Media | Version: | 5.5 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | Focuses: |
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
@
5 years ago
- Component General → Media
- Description modified (diff)
- Keywords needs-patch added
- Summary wp_filter_content_tags added to early → wp_filter_content_tags added too early
- Version → 5.5
#2
@
5 years ago
A directory search found one plugin using remove_filter (on the_content and the_excerpt), which would need updating with a priority change.
Version 0, edited 5 years ago by
(next)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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)