options['njt_fs_file_manager_settings']['list_user_alow_access']) ? $this->options['njt_fs_file_manager_settings']['list_user_alow_access'] : array(); if (isset($_POST) && !empty($_POST) && !empty($_POST['njt-form-user-role-restrictionst'])) { if (!wp_verify_nonce($_POST['njt-fs-user-restrictions-security-token'], 'njt-fs-user-restrictions-security-token')) { wp_die(); } if(!empty($_POST['njt-fs-list-user-restrictions'])) { $userRoleRestrictedSubmited = !empty($_POST['njt-fs-list-user-restrictions']) ? sanitize_text_field($_POST['njt-fs-list-user-restrictions']) : ''; if (empty($this->options['njt_fs_file_manager_settings']['list_user_role_restrictions'])) { $this->options['njt_fs_file_manager_settings']['list_user_role_restrictions'] = array(); } //Save data list User Restrictions alow access $this->options['njt_fs_file_manager_settings']['list_user_role_restrictions'][$_POST['njt-fs-list-user-restrictions']]['list_user_restrictions_alow_access'] = !empty($_POST['list_user_restrictions_alow_access']) ? explode(',', sanitize_text_field($_POST['list_user_restrictions_alow_access'])) : array(); //Seperate or private folder access $this->options['njt_fs_file_manager_settings']['list_user_role_restrictions'][$_POST['njt-fs-list-user-restrictions']]['private_folder_access'] = !empty($_POST['private_folder_access']) ? str_replace("\\\\", "/", trim(sanitize_text_field($_POST['private_folder_access']))) : ''; //Save data Enter Folder or File Paths That You want to Hide $this->options['njt_fs_file_manager_settings']['list_user_role_restrictions'][$_POST['njt-fs-list-user-restrictions']]['hide_paths'] = !empty($_POST['hide_paths']) ? explode('|', preg_replace('/\s+/', '', sanitize_text_field($_POST['hide_paths']))) : array(); //Save data Enter file extensions which you want to Lock $this->options['njt_fs_file_manager_settings']['list_user_role_restrictions'][$_POST['njt-fs-list-user-restrictions']]['lock_files'] = !empty($_POST['lock_files']) ? explode('|', preg_replace('/\s+/', '', sanitize_text_field($_POST['lock_files']))) : array(); //Enter file extensions which can be uploaded $this->options['njt_fs_file_manager_settings']['list_user_role_restrictions'][$_POST['njt-fs-list-user-restrictions']]['can_upload_mime'] = !empty($_POST['can_upload_mime']) ? explode(',', preg_replace('/\s+/', '', sanitize_text_field($_POST['can_upload_mime']))) : array(); } } $arrRestrictions = !empty($this->options['njt_fs_file_manager_settings']['list_user_role_restrictions']) ? $this->options['njt_fs_file_manager_settings']['list_user_role_restrictions'] : array(); if (count($arrRestrictions) > 0) { $firstKeyRestrictions = !empty($userRoleRestrictedSubmited) ? $userRoleRestrictedSubmited : $listUserApproved[0]; } else { $firstKeyRestrictions = ''; } ?>