Skip to content

Instantly share code, notes, and snippets.

@sean-gilmore
Created October 6, 2020 23:50
Show Gist options
  • Save sean-gilmore/5b5c5c98aeef8b6dff4a492870e2a4b6 to your computer and use it in GitHub Desktop.
Save sean-gilmore/5b5c5c98aeef8b6dff4a492870e2a4b6 to your computer and use it in GitHub Desktop.
Create new directory in wp-content/uploads
// 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