change wordpress uploads dir

Wpbeginner tells you how to change your uploads directory but what about the base url?

You can find it your DB.

Go to

wp_options

and look for

upload_url_path

Thank you Jaybe

Advertisements

allow s2members to upload files

/**
 * Give s2members upload_files capability
 * All s2members have read capability
 * @param s2member_level6
 */
if ( current_user_can('read') && !current_user_can('upload_files') ) {
    add_action('admin_init', 'allow_s2member_uploads');
}

function allow_s2member_uploads() {
    // global $current_user;
    // $user_roles = $current_user->roles;
    // $user_role = array_shift($user_roles);
    // print $user_role;

    //$contributor = get_role('s2member_level6');
    //$contributor->add_cap('upload_files');
    $current_user -> add_cap('upload_files');
}

Thank you Lawrence and soulsizzle

#wordpress