-
Notifications
You must be signed in to change notification settings - Fork 144
Dependencies for tag visitors in Optimization Detective #1419
Copy link
Copy link
Closed as not planned
Closed as not planned
Enhancement
Copy link
Labels
[Plugin] Enhanced Responsive ImagesIssues for the Enhanced Responsive Images plugin (formerly Auto Sizes)Issues for the Enhanced Responsive Images plugin (formerly Auto Sizes)[Plugin] Image PrioritizerIssues for the Image Prioritizer plugin (dependent on Optimization Detective)Issues for the Image Prioritizer plugin (dependent on Optimization Detective)[Plugin] Optimization DetectiveIssues for the Optimization Detective pluginIssues for the Optimization Detective plugin[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing featureblocked
Metadata
Metadata
Assignees
Labels
[Plugin] Enhanced Responsive ImagesIssues for the Enhanced Responsive Images plugin (formerly Auto Sizes)Issues for the Enhanced Responsive Images plugin (formerly Auto Sizes)[Plugin] Image PrioritizerIssues for the Image Prioritizer plugin (dependent on Optimization Detective)Issues for the Image Prioritizer plugin (dependent on Optimization Detective)[Plugin] Optimization DetectiveIssues for the Optimization Detective pluginIssues for the Optimization Detective plugin[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing featureblocked
Type
Fields
Give feedbackNo fields configured for Enhancement.
Projects
Status
Done 😃
In at least one case, there is a need currently for a tag visitor to run after another tag visitor has run:
performance/plugins/auto-sizes/optimization-detective.php
Lines 54 to 66 in e34711d
The tag visitor in Enhanced Responsive Sizes needs to run after the IMG tag visitor be
The Image Prioritizer's tag visitor is currently registered with the name ID of
img-tagswhich is not ideal:performance/plugins/image-prioritizer/helper.php
Lines 33 to 35 in e34711d
It should rather be prefixed like
image-prioritizer-img. Theimage-prioritizer-imgstring could even be defined as a class constant likeImage_Prioritizer_Img_Tag_Visitor::ID. When Enhanced Responsive Sizes registers its tag visitor, it should be able to explicitly declare this dependency:Then there wouldn't be a need to rely on action priorities (and the current implementation of
OD_Tag_Visitor_Registry) to ensure that one tag visitor runs before another.