diff --git a/src/class-mt-short-cart-widget.php b/src/class-mt-short-cart-widget.php index b7d87234..587c7128 100644 --- a/src/class-mt-short-cart-widget.php +++ b/src/class-mt-short-cart-widget.php @@ -53,7 +53,7 @@ function widget( $args, $instance ) { $the_title = apply_filters( 'widget_title', $instance['title'] ); $widget_title = empty( $the_title ) ? '' : $the_title; - $widget_title = ( '' != $widget_title ) ? $before_title . $widget_title . $after_title : ''; + $widget_title = ( '' !== $widget_title ) ? $before_title . $widget_title . $after_title : ''; $cart = my_tickets_short_cart(); echo $before_widget; echo $widget_title; diff --git a/src/mt-ajax.php b/src/mt-ajax.php index ea9ce2b2..1fc306d7 100644 --- a/src/mt-ajax.php +++ b/src/mt-ajax.php @@ -27,7 +27,7 @@ function mt_ajax_cart() { echo 0; die; } - if ( 'mt_ajax_cart' == $_REQUEST['action'] ) { + if ( 'mt_ajax_cart' === $_REQUEST['action'] ) { $post = $_REQUEST['data']; $post = array( $post['mt_event_id'] => array( @@ -81,7 +81,7 @@ function mt_ajax_handler() { ) ); } - if ( 'add_to_cart' == $_REQUEST['function'] ) { + if ( 'add_to_cart' === $_REQUEST['function'] ) { $post = $_REQUEST['data']; // reformat request data to multidimensional array. $data = explode( '&', $post ); @@ -131,7 +131,7 @@ function mt_ajax_handler() { ); wp_send_json( $return ); } - if ( 'save_address' == $_REQUEST['function'] ) { + if ( 'save_address' === $_REQUEST['function'] ) { $post = $_REQUEST['data']; $current_user = wp_get_current_user(); $saved = update_user_meta( $current_user->ID, '_mt_shipping_address', $post ); diff --git a/src/mt-common.php b/src/mt-common.php index f80d90df..051bdff9 100644 --- a/src/mt-common.php +++ b/src/mt-common.php @@ -39,8 +39,8 @@ function mt_check_license( $key = false, $product, $store ) { $response = wp_remote_post( $store, array( - 'timeout' => 15, - 'body' => $api_params, + 'timeout' => 15, + 'body' => $api_params, ) ); // make sure the response came back okay. diff --git a/src/mt-help.php b/src/mt-help.php index 80522bf9..3016b3cd 100644 --- a/src/mt-help.php +++ b/src/mt-help.php @@ -224,12 +224,12 @@ function mt_get_support_form() { die( 'Security check failed' ); } $request = ( ! empty( $_POST['support_request'] ) ) ? stripslashes( $_POST['support_request'] ) : false; - $has_read_faq = ( 'on' == $_POST['has_read_faq'] ) ? 'Read FAQ' : false; + $has_read_faq = ( 'on' === $_POST['has_read_faq'] ) ? 'Read FAQ' : false; $subject = 'My Tickets support request.'; $message = $request . "\n\n" . $data; // Get the site domain and get rid of www. from pluggable.php. $sitename = strtolower( $_SERVER['SERVER_NAME'] ); - if ( substr( $sitename, 0, 4 ) == 'www.' ) { + if ( substr( $sitename, 0, 4 ) === 'www.' ) { $sitename = substr( $sitename, 4 ); } $from_email = 'wordpress@' . $sitename; diff --git a/src/mt-receipt.php b/src/mt-receipt.php index bbe9bb16..6ae0a33b 100644 --- a/src/mt-receipt.php +++ b/src/mt-receipt.php @@ -15,7 +15,7 @@ */ function mt_receipt() { $options = array_merge( mt_default_settings(), get_option( 'mt_settings' ) ); - $id = ( '' != $options['mt_receipt_page'] ) ? $options['mt_receipt_page'] : false; + $id = ( '' !== $options['mt_receipt_page'] && is_numeric( $options['mt_receipt_page'] ) ) ? absint( $options['mt_receipt_page'] ) : false; if ( $id && ( is_single( $id ) || is_page( $id ) ) ) { if ( isset( $_GET['receipt_id'] ) ) { $template = locate_template( 'receipt.php' ); diff --git a/src/templates/bulk-tickets.php b/src/templates/bulk-tickets.php index 0cf8a952..f90ad679 100644 --- a/src/templates/bulk-tickets.php +++ b/src/templates/bulk-tickets.php @@ -30,7 +30,7 @@
@@ -63,7 +63,7 @@ class='time'>
QR Code Verification Link @@ -74,7 +74,7 @@ class='time'>
Print
@@ -57,7 +57,7 @@
QR Code Verification Link @@ -68,7 +68,7 @@
Print