[wp-trac] [WordPress Trac] #44083: Add action to wp_mkdir_p() when directory is created successfully

WordPress Trac noreply at wordpress.org
Tue May 15 00:11:46 UTC 2018


#44083: Add action to wp_mkdir_p() when directory is created successfully
-----------------------------+----------------------------------------
 Reporter:  johnjamesjacoby  |      Owner:  (none)
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Filesystem API   |    Version:  2.0.1
 Severity:  normal           |   Keywords:  needs-patch good-first-bug
  Focuses:                   |
-----------------------------+----------------------------------------
 It would be nice if the `wp_mkdir_p()` function contained a hook for
 plugins to interact with when a directory gets created.

 The use-case I have currently is that some plugins (like Easy Digital
 Downloads, for example) create `.htaccess` files and empty `index.php`
 files in its own `uploads/edd` directory, as one way of protecting those
 empty directories from being publicly browsable.

 Because there is no action hook here, EDD uses a daily transient, which
 leaves new directories potentially open until the transient expires.

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


More information about the wp-trac mailing list