Opened 9 years ago
Closed 9 years ago
#37458 closed enhancement (wontfix)
Resource Hints: improve filtering
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6 |
Component: | Script Loader | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
By looking at name and description of wp_resource_hints
filter, one would assume that it filters all resource hints, while it is in foreach loop filtering only one relation type at the time. This means that unless you want to always pass an empty array, you need to arguments and then conditional.
I suggest that we change this before RC. There are a few ways to do, attached is with moving filter with wp_resource_hints
name before loop and filtering all resource hints there, while making current filter name dynamic, based on relation type currently used,
Attachments (2)
Change History (8)
#3
@
9 years ago
- Component changed from General to Script Loader
- Focuses docs added
- Keywords needs-refresh added
Needs refresh following @ocean90's comment re 4.6.
There is a reluctance to add further dynamic filter names to WP core as it makes searching more difficult, passing parameters is preferred.
#4
@
9 years ago
- Keywords needs-refresh removed
@peterwilsoncc What do you think about 37458.3.diff?
For 4.6 we should only improve the docs of the existing filter.