[wp-trac] [WordPress Trac] #56295: filter wp_content_img_tag runs multiple times

WordPress Trac noreply at wordpress.org
Wed Jul 27 23:25:04 UTC 2022


#56295: filter wp_content_img_tag runs multiple times
------------------------------+-----------------------------
 Reporter:  gigito78          |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:  6.0
 Severity:  normal            |   Keywords:
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 Filter wp_content_img_tag seem (in a block theme) seem to run 3 times on
 content images and 2 times on custom logo image. Simple code to expose the
 problem:

 add_filter( $hook_name='wp_content_img_tag', function( $filtered_image,
 $context, $attachment_id ){ return 'a:'.$filtered_image; },$priority=21,
 $accepted_args=3 );

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56295>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list