Created
December 27, 2014 07:34
-
-
Save palpalani/360e4a6dadc9ba0f1a9d to your computer and use it in GitHub Desktop.
WordPress customize upload foleder
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
<?php | |
/* | |
WordPress customize upload foleder path | |
Create a Directory within Uploads folder | |
*/ | |
function mw_activate() { | |
$upload = wp_upload_dir(); | |
$upload_dir = $upload['basedir']; | |
$upload_dir = $upload_dir . '/my_plugin_files'; | |
if (! is_dir($upload_dir)) { | |
mkdir( $upload_dir, 0700 ); | |
} | |
} | |
register_activation_hook( __FILE__, 'mw_activate' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment