← All changes
|
includes/admin/agent-settings/class-wpsc-agent-settings.php
+6
-6
3.3.7
→
3.5.4
View file →
| @@ -100,10 +100,10 @@ | ||
| 100 | 100 | <td><?php echo esc_attr( $agent->name ); ?></td> |
| 101 | 101 | <td><?php echo esc_attr( $agent->customer->email ); ?></td> |
| 102 | 102 | <td><?php echo esc_attr( $roles[ $agent->role ]['label'] ); ?></td> |
| 103 | 103 | <td> |
| 104 | - <a href="javascript:wpsc_get_edit_agent(<?php echo esc_attr( $agent->id ); ?>, '<?php echo esc_attr( wp_create_nonce( 'wpsc_get_edit_agent' ) ); ?>')"><?php esc_attr_e( 'Edit', 'supportcandy' ); ?></a> | | |
| 105 | - <a href="javascript:wpsc_get_delete_agent(<?php echo esc_attr( $agent->id ); ?>, '<?php echo esc_attr( wp_create_nonce( 'wpsc_get_delete_agent' ) ); ?>' )"><?php esc_attr_e( 'Delete', 'supportcandy' ); ?></a> | |
| 104 | + <span class="wpsc-link" onclick="wpsc_get_edit_agent(<?php echo esc_attr( $agent->id ); ?>, '<?php echo esc_attr( wp_create_nonce( 'wpsc_get_edit_agent' ) ); ?>')"><?php esc_attr_e( 'Edit', 'supportcandy' ); ?></span> | | |
| 105 | + <span class="wpsc-link" onclick="wpsc_get_delete_agent(<?php echo esc_attr( $agent->id ); ?>, '<?php echo esc_attr( wp_create_nonce( 'wpsc_get_delete_agent' ) ); ?>' )"><?php esc_attr_e( 'Delete', 'supportcandy' ); ?></span> | |
| 106 | 106 | </td> |
| 107 | 107 | </tr> |
| 108 | 108 | <?php |
| 109 | 109 | } |
| @@ -257,9 +257,9 @@ | ||
| 257 | 257 | */ |
| 258 | 258 | public static function set_add_agent() { |
| 259 | 259 | |
| 260 | 260 | if ( check_ajax_referer( 'wpsc_set_add_agent', '_ajax_nonce', false ) != 1 ) { |
| 261 | - wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 261 | + wp_send_json_error( 'Unauthorized request!', 401 ); | |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | if ( ! WPSC_Functions::is_site_admin() ) { |
| 265 | 265 | wp_send_json_error( __( 'Unauthorized access!', 'supportcandy' ), 401 ); |
| @@ -322,9 +322,9 @@ | ||
| 322 | 322 | */ |
| 323 | 323 | public static function get_edit_agent() { |
| 324 | 324 | |
| 325 | 325 | if ( check_ajax_referer( 'wpsc_get_edit_agent', '_ajax_nonce', false ) != 1 ) { |
| 326 | - wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 326 | + wp_send_json_error( 'Unauthorized request!', 401 ); | |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | if ( ! WPSC_Functions::is_site_admin() ) { |
| 330 | 330 | wp_send_json_error( __( 'Unauthorized access!', 'supportcandy' ), 401 ); |
| @@ -392,9 +392,9 @@ | ||
| 392 | 392 | */ |
| 393 | 393 | public static function set_edit_agent() { |
| 394 | 394 | |
| 395 | 395 | if ( check_ajax_referer( 'wpsc_set_edit_agent', '_ajax_nonce', false ) != 1 ) { |
| 396 | - wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 396 | + wp_send_json_error( 'Unauthorized request!', 401 ); | |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | 399 | if ( ! WPSC_Functions::is_site_admin() ) { |
| 400 | 400 | wp_send_json_error( __( 'Unauthorized access!', 'supportcandy' ), 401 ); |
| @@ -438,9 +438,9 @@ | ||
| 438 | 438 | */ |
| 439 | 439 | public static function delete_agent() { |
| 440 | 440 | |
| 441 | 441 | if ( check_ajax_referer( 'wpsc_get_delete_agent', '_ajax_nonce', false ) != 1 ) { |
| 442 | - wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 442 | + wp_send_json_error( 'Unauthorized request!', 401 ); | |
| 443 | 443 | } |
| 444 | 444 | |
| 445 | 445 | if ( ! WPSC_Functions::is_site_admin() ) { |
| 446 | 446 | wp_send_json_error( 'Unauthorized!', 401 ); |