[wp-trac] [WordPress Trac] #50587: Provide short-circuit filter for scandir() in wp_unique_filename()

WordPress Trac noreply at wordpress.org
Tue Jul 7 10:18:41 UTC 2020


#50587: Provide short-circuit filter for scandir() in wp_unique_filename()
------------------------------------+-----------------------------
 Reporter:  joehoyle                |       Owner:  SergeyBiryukov
     Type:  enhancement             |      Status:  closed
 Priority:  normal                  |   Milestone:  5.5
Component:  Upload                  |     Version:  5.3
 Severity:  normal                  |  Resolution:  fixed
 Keywords:  has-patch dev-feedback  |     Focuses:  performance
------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"48369" 48369]:
 {{{
 #!CommitTicketReference repository="" revision="48369"
 Upload: Introduce `pre_wp_unique_filename_file_list` filter to allow for
 short-circuiting the `scandir()` call in `wp_unique_filename()`.

 This allows plugins to override the file fetching behavior to provide
 performance improvements for large directories.

 Props joehoyle.
 Fixes #50587.
 }}}

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


More information about the wp-trac mailing list