Changeset 3425687
- Timestamp:
- 12/22/2025 10:37:45 PM (3 months ago)
- Location:
- bookingor/trunk
- Files:
-
- 8 edited
-
admin/include/category/category-control.php (modified) (2 diffs)
-
admin/include/customer/customer-control.php (modified) (1 diff)
-
admin/include/location/location-control.php (modified) (2 diffs)
-
admin/include/notification/notification-control.php (modified) (1 diff)
-
admin/include/services/service-control.php (modified) (3 diffs)
-
admin/include/staff/staff-control.php (modified) (2 diffs)
-
admin/include/templates/templates-control.php (modified) (3 diffs)
-
includes/class-bookingor-activator.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bookingor/trunk/admin/include/category/category-control.php
r3425670 r3425687 48 48 } 49 49 $id = stripslashes(filter_var($_REQUEST["id"], FILTER_SANITIZE_NUMBER_INT)); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput. 50 51 52 if (!current_user_can('manage_options')) { 53 $response = [ 54 'status' => htmlspecialchars('error'), 55 'message' => htmlspecialchars('You do not have permission.') 56 ]; 57 echo wp_json_encode($response); 58 die(); 59 } 50 60 51 61 $get_category_in_booking = $wpdb->get_results( … … 131 141 ]; 132 142 } 143 } 144 if (!current_user_can('manage_options')) { 145 $response = [ 146 'status' => htmlspecialchars('error'), 147 'message' => htmlspecialchars('You do not have permission.') 148 ]; 149 echo wp_json_encode($response); 150 die(); 133 151 } 134 152 $category_name = sanitize_text_field(wp_unslash($_POST['tcn_category_name'] ?? "")); -
bookingor/trunk/admin/include/customer/customer-control.php
r3425670 r3425687 65 65 } 66 66 } 67 if (!current_user_can('manage_options')) { 68 $response = [ 69 'status' => htmlspecialchars('error'), 70 'message' => htmlspecialchars('You do not have permission.') 71 ]; 72 echo wp_json_encode($response); 73 die(); 74 } 67 75 $get_customer_in_booking = $wpdb->get_results( 68 76 $wpdb->prepare( -
bookingor/trunk/admin/include/location/location-control.php
r3425670 r3425687 69 69 } 70 70 } 71 if (!current_user_can('manage_options')) { 72 $response = [ 73 'status' => htmlspecialchars('error'), 74 'message' => htmlspecialchars('You do not have permission.') 75 ]; 76 echo wp_json_encode($response); 77 die(); 78 } 71 79 $location_title = sanitize_text_field(wp_unslash($_POST['bookingor_location_title'] ?? '')); 72 80 $location_icon = sanitize_text_field(wp_unslash($_POST['location_icon_id'] ?? '')); … … 154 162 } 155 163 } 164 if (!current_user_can('manage_options')) { 165 $response = [ 166 'status' => htmlspecialchars('error'), 167 'message' => htmlspecialchars('You do not have permission.') 168 ]; 169 echo wp_json_encode($response); 170 die(); 171 } 156 172 $location_title = sanitize_text_field(wp_unslash($_POST['bookingor_location_title'] ?? "")); 157 173 $location_id = sanitize_text_field(wp_unslash($_POST['location_id'] ?? "")); -
bookingor/trunk/admin/include/notification/notification-control.php
r3425670 r3425687 57 57 } 58 58 } 59 if (!current_user_can('manage_options')) { 60 $response = [ 61 'status' => htmlspecialchars('error'), 62 'message' => htmlspecialchars('You do not have permission.') 63 ]; 64 echo wp_json_encode($response); 65 die(); 66 } 59 67 $email_get_id = sanitize_text_field(wp_unslash($_POST['email_id'] ?? "")); 60 68 $email_subject = sanitize_text_field(wp_unslash($_POST['subject'] ?? "")); -
bookingor/trunk/admin/include/services/service-control.php
r3425670 r3425687 147 147 } 148 148 } 149 if (!current_user_can('manage_options')) { 150 $response = [ 151 'status' => htmlspecialchars('error'), 152 'message' => htmlspecialchars('You do not have permission.') 153 ]; 154 echo wp_json_encode($response); 155 die(); 156 } 149 157 // phpcs:disable WordPress.Security.NonceVerification.Missing -- Verified elsewhere. 150 158 $service_name = sanitize_text_field(wp_unslash($_POST['service_name'] ?? "")); … … 312 320 } 313 321 } 322 if (!current_user_can('manage_options')) { 323 $response = [ 324 'status' => htmlspecialchars('error'), 325 'message' => htmlspecialchars('You do not have permission.') 326 ]; 327 echo wp_json_encode($response); 328 die(); 329 } 314 330 //tab basic 315 331 $service_name = sanitize_text_field(wp_unslash($_POST['service_name'] ?? "")); … … 459 475 } 460 476 } 477 if (!current_user_can('manage_options')) { 478 $response = [ 479 'status' => htmlspecialchars('error'), 480 'message' => htmlspecialchars('You do not have permission.') 481 ]; 482 echo wp_json_encode($response); 483 die(); 484 } 461 485 462 486 $wpdb->delete($delete_service, array( -
bookingor/trunk/admin/include/staff/staff-control.php
r3425670 r3425687 128 128 } 129 129 } 130 if (!current_user_can('manage_options')) { 131 $response = [ 132 'status' => htmlspecialchars('error'), 133 'message' => htmlspecialchars('You do not have permission.') 134 ]; 135 echo wp_json_encode($response); 136 die(); 137 } 130 138 $staff_first_name = sanitize_text_field(isset($_POST['staff_first_name']) ? $_POST['staff_first_name'] : ''); 131 139 $staff_last_name = sanitize_text_field(isset($_POST['staff_last_name']) ? $_POST['staff_last_name'] : ''); … … 268 276 } 269 277 } 278 if (!current_user_can('manage_options')) { 279 $response = [ 280 'status' => htmlspecialchars('error'), 281 'message' => htmlspecialchars('You do not have permission.') 282 ]; 283 echo wp_json_encode($response); 284 die(); 285 } 270 286 $staff_first_name = sanitize_text_field($_POST['staff_first_name'] ?? ""); 271 287 $staff_last_name = sanitize_text_field($_POST['staff_last_name'] ?? ""); -
bookingor/trunk/admin/include/templates/templates-control.php
r3425670 r3425687 22 22 ]; 23 23 } 24 } 25 if (!current_user_can('manage_options')) { 26 $response = [ 27 'status' => htmlspecialchars('error'), 28 'message' => htmlspecialchars('You do not have permission.') 29 ]; 30 echo wp_json_encode($response); 31 die(); 24 32 } 25 33 if (isset($_REQUEST['editingId']) && sanitize_text_field($_REQUEST['editingId']) === '1') { … … 184 192 { 185 193 if (isset($_REQUEST['action'])) { 186 if (isset($_POST['nonce'])) {194 if (isset($_POST['nonce'])) { 187 195 if (!wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['nonce'])), 'bookingor_ajax_nonce')) { 188 196 $response = [ … … 191 199 ]; 192 200 } 201 } 202 if (!current_user_can('manage_options')) { 203 $response = [ 204 'status' => htmlspecialchars('error'), 205 'message' => htmlspecialchars('You do not have permission.') 206 ]; 207 echo wp_json_encode($response); 208 die(); 193 209 } 194 210 //stripe -
bookingor/trunk/includes/class-bookingor-activator.php
r3204898 r3425687 35 35 ob_start(); 36 36 37 37 // Add custom capabilities 38 $role = get_role('administrator'); 39 if ($role) { 40 $role->add_cap('bp_delete_category'); 41 $role->add_cap('bp_add_category'); 42 $role->add_cap('bp_update_category'); 43 $role->add_cap('bp_get_category'); 44 } 38 45 39 46 //category
Note: See TracChangeset
for help on using the changeset viewer.