Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Give Access to Upload File if Subscriber Cannot Upload Files */
- if ( current_user_can('subscriber') && !current_user_can('upload_files') ) {
- add_action('init', 'allow_subscriber_uploads');
- function allow_subscriber_uploads() {
- $new_role = get_role('subscriber');
- $new_role->add_cap('upload_files', true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement