Changeset 2775544
- Timestamp:
- 08/25/2022 12:51:39 PM (4 years ago)
- Location:
- wp-users-disable/trunk
- Files:
-
- 3 edited
-
admin-option.php (modified) (1 diff)
-
ajax.js (modified) (2 diffs)
-
custom-ajax.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-users-disable/trunk/admin-option.php
r2759205 r2775544 46 46 public function dwul_create_submit_buton( $value ) { 47 47 48 echo '<a class=" button-primary" id="' . esc_attr( $value['id'] ) . '" style="float: left; margin: 75px 0px 0px;" />Disableuser</a><br/>'; 48 $nonce = wp_create_nonce( 'disable_user_nonce' ); 49 echo '<a class=" button-primary" data-nonce="'.$nonce.'" id="' . esc_attr( $value['id'] ) . '" style="float: left; margin: 75px 0px 0px;" />Disableuser</a><br/>'; 49 50 50 51 } -
wp-users-disable/trunk/ajax.js
r1432868 r2775544 33 33 action: 'dwul_action_callback', 34 34 useremail: useremail, 35 nonce_data : jQuery( this ).data( 'nonce' ) 35 36 }, 36 37 beforeSend: function() { … … 41 42 success: function(response) { 42 43 43 44 if(response == 90){ 45 jQuery("#adminroleerror").html("Permission Denied").fadeIn().delay(2000).fadeOut('slow'); 46 jQuery("#processimage").hide(); 47 return false; 48 } 44 49 45 50 if(response == 11){ -
wp-users-disable/trunk/custom-ajax.php
r2759205 r2775544 32 32 global $wpdb; 33 33 global $disableemail; 34 if ( !wp_verify_nonce($_REQUEST['nonce_data'], 'disable_user_nonce') ){ 35 $successresponse = '90'; 36 echo esc_html( $successresponse ); 37 die(); 38 } 34 39 $exitingarray = array(); 35 40 $disableemail = isset( $_REQUEST['useremail'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['useremail'] ) ) : '';
Note: See TracChangeset
for help on using the changeset viewer.