[wp-trac] [WordPress Trac] #52640: The rest_prepare_attachment filter runs twice during REST request

WordPress Trac noreply at wordpress.org
Wed Feb 24 14:51:00 UTC 2021


#52640: The rest_prepare_attachment filter runs twice during REST request
--------------------------------------+------------------------------
 Reporter:  chrisl27                  |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  REST API                  |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by chrisl27):

 This patch is a simple solution to the attachment problem that doesn't
 help if you otherwise subclassed WP_REST_Posts_Controller for your own
 post type and wanted to include a filter. I think that's unlikely to
 happen outside of core though.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52640#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list