@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | // ini_set( 'display_errors', 1 ); ini_set( 'error_reporting', -1 ); |
4 | 4 | |
5 | 5 | // Make sure there is an action first |
6 | -if ( ! isset( $_REQUEST['action'] ) ) { |
|
6 | +if ( ! isset( $_REQUEST[ 'action' ] ) ) { |
|
7 | 7 | die( '0' ); |
8 | 8 | } |
9 | 9 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | /** |
29 | 29 | * This is just an example of a secrept WordPress feature called "fast ajax" |
30 | 30 | */ |
31 | -add_action( 'wp_ajax_example', function () { |
|
31 | +add_action( 'wp_ajax_example', function() { |
|
32 | 32 | // Include the now instantiated global $wpdb Class for use |
33 | 33 | global $wpdb; |
34 | 34 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | // ========= ! DO NOT EDIT THE CODE BELOW ! ========= // |
46 | 46 | |
47 | 47 | try { |
48 | - $action_name = sprintf( 'wp_ajax_%s', $_REQUEST['action'] ); |
|
48 | + $action_name = sprintf( 'wp_ajax_%s', $_REQUEST[ 'action' ] ); |
|
49 | 49 | do_action( $action_name ); |
50 | 50 | die( '0' ); |
51 | 51 | } catch ( \Exception $ex ) { |