Created
October 6, 2020 23:50
-
-
Save sean-gilmore/5b5c5c98aeef8b6dff4a492870e2a4b6 to your computer and use it in GitHub Desktop.
Create new directory in wp-content/uploads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// will result in a path of `wp-content/uploads/new_folder_in_uploads/` | |
$directory = $uploads['basedir'] . '/new_folder_in_uploads/'; | |
if (!file_exists($directory)) { | |
wp_mkdir_p($directory); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment