WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #44083


Ignore:
Timestamp:
05/15/2018 12:14:25 AM (2 years ago)
Author:
johnjamesjacoby
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #44083 – Description

    initial v1  
    11It would be nice if the `wp_mkdir_p()` function contained a hook for plugins to interact with when a directory gets created.
    22
    3 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.
     3The use-case I have currently is that Easy Digital Downloads (for example) creates `.htaccess` files and empty `index.php` files in its own `uploads/edd` directory, and each directory inside it, as one way of protecting those empty directories from being publicly browsable.
    44
    55Because there is no action hook here, EDD uses a daily transient, which leaves new directories potentially open until the transient expires.
     6
     7An action hook on directory creation would allow for EDD to create those files immediately.