PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 1.3.2
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v1.3.2
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
← All changes | src/Admin/Framework/functions/actions.php +2 -2 1.5.11.3.2 View file →
@@ -94,9 +94,9 @@
94 94 if(!current_user_can('manage_options')){
95 95 return;
96 96 }
97 97 if(isset($_POST['_ajax_nonce']) && !wp_verify_nonce(sanitize_text_field( wp_unslash ( $_POST['_ajax_nonce'] ) ), 'save_options')){
98 - wp_die();
98 + return wp_send_json(['error' => 'Nonce is invalid']);
99 99 }
100 100
101 101 $nonce = ( ! empty( $_POST['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
102 102 $unique = ( ! empty( $_POST['unique'] ) ) ? sanitize_text_field( wp_unslash( $_POST['unique'] ) ) : '';
@@ -161,9 +161,9 @@
161 161 return;
162 162 }
163 163
164 164 if(isset($_POST['_ajax_nonce']) && !wp_verify_nonce(sanitize_text_field( wp_unslash ( $_POST['_ajax_nonce'] ) ), 'save_options')){
165 - wp_die();
165 + return wp_send_json(['error' => 'Nonce is invalid']);
166 166 }
167 167
168 168 $nonce = ( ! empty( $_POST['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
169 169 $type = ( ! empty( $_POST['type'] ) ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : '';