[wp-trac] [WordPress Trac] #50695: Make media_sideload_image extension list filterable

WordPress Trac noreply at wordpress.org
Thu Oct 1 19:25:23 UTC 2020


#50695: Make media_sideload_image extension list filterable
-------------------------------------------------+-------------------------
 Reporter:  paulschreiber                        |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  5.6
Component:  Media                                |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-dev-note needs-      |     Focuses:
  unit-tests                                     |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch => has-patch needs-dev-note needs-unit-tests


Comment:

 New filter added. This one `needs-dev-note` on the Misc Dev Note.

 The extensions are passed through a filter with an expected array of
 extensions returned from it. Adding `needs-unit-tests` to add test data to
 valid the expected and unexpected filtered extensions.

 A guard clause might be handy here too to handle the unexpected filtered
 content, such as a string of extensions or nothing being returned.

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


More information about the wp-trac mailing list