← All changes
|
jetpack_vendor/automattic/jetpack-search/src/wpes/class-query-parser.php
+18
-1
12.2.3
→
16.3
View file →
| @@ -34,8 +34,12 @@ | ||
| 34 | 34 | */ |
| 35 | 35 | |
| 36 | 36 | namespace Automattic\Jetpack\Search\WPES; |
| 37 | 37 | |
| 38 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 39 | + exit( 0 ); | |
| 40 | +} | |
| 41 | + | |
| 38 | 42 | /** |
| 39 | 43 | * Query parser class. |
| 40 | 44 | */ |
| 41 | 45 | class Query_Parser extends Query_Builder { |
| @@ -43,8 +47,22 @@ | ||
| 43 | 47 | protected $current_query = ''; |
| 44 | 48 | protected $langs; |
| 45 | 49 | protected $avail_langs = array( 'ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en', 'es', 'eu', 'fa', 'fi', 'fr', 'he', 'hi', 'hu', 'hy', 'id', 'it', 'ja', 'ko', 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh' ); |
| 46 | 50 | |
| 51 | + /** | |
| 52 | + * All fields. | |
| 53 | + * | |
| 54 | + * @var array | |
| 55 | + */ | |
| 56 | + public $all_fields; | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * Phrase fields. | |
| 60 | + * | |
| 61 | + * @var array | |
| 62 | + */ | |
| 63 | + public $phrase_fields; | |
| 64 | + | |
| 47 | 65 | public function __construct( $user_query, $langs ) { |
| 48 | 66 | $this->orig_query = $user_query; |
| 49 | 67 | $this->current_query = $this->orig_query; |
| 50 | 68 | $this->langs = $this->norm_langs( $langs ); |
| @@ -697,6 +715,5 @@ | ||
| 697 | 715 | $string = mb_strimwidth( $string, 0, $limit ); |
| 698 | 716 | } |
| 699 | 717 | return $string; |
| 700 | 718 | } |
| 701 | - | |
| 702 | 719 | } |