Skip to content

Commit de20e12

Browse files
Added inline comment for filter priority
1 parent 198f2cd commit de20e12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/auto-sizes/hooks.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ function auto_sizes_prime_attachment_caches( $content ): string {
182182

183183
return $content;
184184
}
185+
186+
/*
187+
* The priority 6 is used to ensure the new filter runs right after the "wp-image-$attachment_id" class
188+
* is added to the img tag at priority 5, allowing modifications that rely on this class being in place.
189+
*/
185190
add_filter( 'the_content', 'auto_sizes_prime_attachment_caches', 6 );
186191

187192
/**

0 commit comments

Comments
 (0)