Last active
June 3, 2016 21:22
-
-
Save butlerblog/1dfbf19ee322dc43977370be91cfff87 to your computer and use it in GitHub Desktop.
List of default values for the wpmem_user_upload_dir filter
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 // Ignore this line. | |
add_filter( 'wpmem_user_upload_dir', 'my_user_upload_dir' ); | |
function my_user_upload_dir( $args ) { | |
// Change default directory if user ID is "10" | |
if ( 10 == $args['user_id'] ) { | |
$args['wpmem_dir'] = 'special_dir/', | |
$args['user_dir'] = 'special_sub' | |
} | |
// Make sure to return $args. | |
return $args; | |
} |
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 | |
$args = array( | |
'user_id' => $user_id, | |
'wpmem_dir' => 'wpmembers/', | |
'user_dir' => 'user_files/' . $user_id, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment