@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,10 +1,10 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | class wpshop_order_search { |
3 | 3 | |
4 | 4 | function __construct() { |
5 | - if ( is_admin() ) { |
|
5 | + if (is_admin()) { |
|
6 | 6 | //add_action('posts_where_request', array(&$this, 'wpshop_search_where_in_order')); |
7 | - add_filter( 'posts_where', array(&$this, 'wpshop_search_where_in_order'), 10, 2 ); |
|
7 | + add_filter('posts_where', array(&$this, 'wpshop_search_where_in_order'), 10, 2); |
|
8 | 8 | } |
9 | 9 | } |
10 | 10 | |
@@ -13,31 +13,31 @@ discard block |
||
13 | 13 | * @param string $join The current |
14 | 14 | * @return string The new search query table list |
15 | 15 | */ |
16 | - public function wpshop_search_join( $join ) { |
|
16 | + public function wpshop_search_join($join) { |
|
17 | 17 | global $wpdb; |
18 | 18 | |
19 | - $post_type = !empty( $_GET['post_type'] ) ? sanitize_text_field( $_GET['post_type'] ) : ''; |
|
19 | + $post_type = !empty($_GET['post_type']) ? sanitize_text_field($_GET['post_type']) : ''; |
|
20 | 20 | |
21 | - if( is_search() || (is_admin() && $post_type == WPSHOP_NEWTYPE_IDENTIFIER_ORDER) ) { |
|
21 | + if (is_search() || (is_admin() && $post_type == WPSHOP_NEWTYPE_IDENTIFIER_ORDER)) { |
|
22 | 22 | $join .= " LEFT JOIN $wpdb->postmeta ON " . $wpdb->posts . ".ID = $wpdb->postmeta.post_id "; |
23 | 23 | } |
24 | 24 | |
25 | 25 | return $join; |
26 | 26 | } |
27 | 27 | |
28 | - public function wpshop_search_where_in_order( $where ) { |
|
28 | + public function wpshop_search_where_in_order($where) { |
|
29 | 29 | global $wpdb; |
30 | 30 | |
31 | - $s = !empty( $_GET['s'] ) ? sanitize_text_field( $_GET['s'] ) : ''; |
|
32 | - $post_type = !empty( $_GET['post_type'] ) ? sanitize_text_field( $_GET['post_type'] ) : ''; |
|
31 | + $s = !empty($_GET['s']) ? sanitize_text_field($_GET['s']) : ''; |
|
32 | + $post_type = !empty($_GET['post_type']) ? sanitize_text_field($_GET['post_type']) : ''; |
|
33 | 33 | |
34 | - if ( !empty( $s ) && !empty( $post_type ) && $post_type == WPSHOP_NEWTYPE_IDENTIFIER_ORDER ) { |
|
34 | + if (!empty($s) && !empty($post_type) && $post_type == WPSHOP_NEWTYPE_IDENTIFIER_ORDER) { |
|
35 | 35 | |
36 | 36 | $where = " AND {$wpdb->posts}.post_type = '" . WPSHOP_NEWTYPE_IDENTIFIER_ORDER . "'"; |
37 | 37 | |
38 | - if( !empty( $s ) ) { |
|
39 | - $s_soundex = soundex( sanitize_text_field( $_GET['s'] ) ); |
|
40 | - $s = strtoupper( sanitize_text_field( $_GET['s'] ) ); |
|
38 | + if (!empty($s)) { |
|
39 | + $s_soundex = soundex(sanitize_text_field($_GET['s'])); |
|
40 | + $s = strtoupper(sanitize_text_field($_GET['s'])); |
|
41 | 41 | $where .= "AND ( |
42 | 42 | ( |
43 | 43 | {$wpdb->posts}.ID IN ( |
@@ -95,6 +95,6 @@ discard block |
||
95 | 95 | |
96 | 96 | } |
97 | 97 | |
98 | -if ( class_exists("wpshop_order_search") ) { |
|
98 | +if (class_exists("wpshop_order_search")) { |
|
99 | 99 | $wpshop_order_search = new wpshop_order_search(); |
100 | 100 | } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Plugin database options |
4 | 4 | * |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Plugin database options |
4 | 4 | * |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Plugin database options |
4 | 4 | * |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-filters" id="wpshop_filter_search_container"> |
4 | 4 | <!-- <div class="wps-gridwrapper" > |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | <div class="wps-filters-padder"> |
11 | 11 | <form method="post" action="<?php echo admin_url('admin-ajax.php'); ?>" name=" " id="filter_search_action"> |
12 | 12 | <input type="hidden" name="action" value="filter_search_action" /> |
13 | - <?php wp_nonce_field( 'wpshop_ajax_filter_search_action' ); ?> |
|
13 | + <?php wp_nonce_field('wpshop_ajax_filter_search_action'); ?> |
|
14 | 14 | <input type="hidden" name="wpshop_filter_search_category_id" value="<?php echo $category_id; ?>" /> |
15 | 15 | <input type="hidden" name="wpshop_filter_search_current_page_id" id="wpshop_filter_search_current_page_id" value="1" /> |
16 | 16 |
@@ -1,3 +1,3 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <p><?php echo $content; ?></p> |
4 | 4 | \ No newline at end of file |
@@ -1,3 +1,5 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <p><?php echo $content; ?></p> |
4 | 6 | \ No newline at end of file |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Plugin database options |
4 | 4 | * |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Plugin database options |
4 | 4 | * |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Plugin database options |
4 | 4 | * |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |