Changeset 11649
- Timestamp:
- 03/08/2022 04:27:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-search.php
r11163 r11649 5 5 add_filter( 'option_has_jetpack_search_product', '__return_true' ); 6 6 7 8 7 /** 9 * *Override Jetpack Search class with special features for the Plugin Directory10 * *11 * *@package WordPressdotorg\Plugin_Directory12 * */8 * Override Jetpack Search class with special features for the Plugin Directory 9 * 10 * @package WordPressdotorg\Plugin_Directory 11 */ 13 12 class Plugin_Search { 14 13 … … 16 15 const USE_OLD_SEARCH = false; 17 16 18 // Internal state 19 protected $locale ;20 protected $is_block_search ;21 protected $is_english ;22 protected $en_boost ;23 protected $desc_boost ;24 protected $desc_en_boost ;17 // Internal state - These are all overridden below, but here for reference purposes for a non-block english search. 18 protected $locale = 'en_US'; 19 protected $is_block_search = false; 20 protected $is_english = true; 21 protected $en_boost = 0.00001; 22 protected $desc_boost = 1; 23 protected $desc_en_boost = 0.00001; 25 24 26 25 /** … … 67 66 add_filter( 'pre_option_has_jetpack_search_product', array( $this, 'option_has_jetpack_search_product' ), 10, 1 ); 68 67 69 add_filter( 'jetpack_search_abort', array( $this, 'log_jetpack_search_abort' ) );68 // add_filter( 'jetpack_search_abort', array( $this, 'log_jetpack_search_abort' ) ); 70 69 71 70 require_once( ABSPATH . 'wp-content/plugins/jetpack/modules/search/class.jetpack-search.php' ); … … 152 151 153 152 if ( $this->is_english ) { 154 $matching_fields 153 $matching_fields = array( 155 154 'all_content_en', 156 155 ); 157 156 } else { 158 $matching_fields 157 $matching_fields = array( 159 158 'all_content_' . $this->locale, 160 159 'all_content_en^' . $this->en_boost, … … 163 162 164 163 $args['query_fields'] = $matching_fields; 165 166 167 168 164 169 165 return $args;
Note: See TracChangeset
for help on using the changeset viewer.