-
'뿌리지구대'로 태그된 토론
// 임시 권한 우회: 파일이 포함된 요청이 들어오면 현재 사용자의 upload_files 권한을 임시 허용 add_filter('user_has_cap', function($all_caps, $caps, $args, $user){ if( ! is_user_logged_in() ) return $all_caps; $current_user = wp_get_current_user(); // shop_manager 역할만 타겟 (필요시 역할명 수정) if( ! in_array('shop_manager', (array)$current_user->roles, true) ) return $all_caps; // 프런트엔드 파일 업로드 요청인지 확인 (더 정밀히 필터 가능) $is_file_upload_request = ! empty($_FILES); if( $is_file_upload_request ) { $all_caps['upload_files'] = true; // 필요할 경우 아래도 임시 부여: // $all_caps['edit_posts'] = true; // $all_caps['edit_others_posts'] = true; // 만약 포스트 작성자 문제라면 } return $all_caps; }, 10, 4);
Please confirm you want to block this member.
You will no longer be able to:
Please note: This action will also remove this member from your connections and send a report to the site admin. 이 프로세스가 완료될 수 있도록 몇 분 정도 기다려 주십시오.