Changeset 3103729
- Timestamp:
- 06/17/2024 07:22:55 PM (22 months ago)
- Location:
- wp-extended-search/trunk
- Files:
-
- 2 added
- 3 edited
-
assets/css/select2.min.css (added)
-
assets/js/select2.min.js (added)
-
includes/admin/class-wpes-admin.php (modified) (1 diff)
-
includes/class-wpes-core.php (modified) (5 diffs)
-
languages/wp-extended-search.pot (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-extended-search/trunk/includes/admin/class-wpes-admin.php
r2843917 r3103729 149 149 if ( 'toplevel_page_wp-es' === $hook ) { 150 150 wp_enqueue_script( 'jquery-ui-datepicker' ); 151 wp_enqueue_script( 'wpes_select2_js', 'https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js' );151 wp_enqueue_script( 'wpes_select2_js', WPES_ASSETS_URL . 'js/select2.min.js' ); 152 152 wp_enqueue_script( 'wpes_admin_js', WPES_ASSETS_URL . 'js/wp-es-admin.js', array( 'jquery-ui-datepicker', 'wpes_select2_js' ) ); 153 153 wp_enqueue_style( 'wpes_jquery_ui', WPES_ASSETS_URL . 'css/jQueryUI/jquery-ui.min.css' ); 154 154 wp_enqueue_style( 'wpes_jquery_ui_theme', WPES_ASSETS_URL . 'css/jQueryUI/jquery-ui.theme.min.css' ); 155 wp_enqueue_style( 'wpes_select2_css', 'https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css' );155 wp_enqueue_style( 'wpes_select2_css', WPES_ASSETS_URL . 'css/select2.min.css' ); 156 156 wp_enqueue_style( 'wpes_admin_css', WPES_ASSETS_URL . 'css/wp-es-admin.css', array( 'wpes_jquery_ui', 'wpes_jquery_ui_theme', 'wpes_select2_css' ) ); 157 157 -
wp-extended-search/trunk/includes/class-wpes-core.php
r2843917 r3103729 267 267 add_action( 'pre_get_posts', array( $this, 'wp_es_pre_get_posts' ), 500 ); 268 268 269 // Add additional hooks for compatibility with core and plugins/themes. 270 $this->add_additional_compatibility_hooks(); 271 269 272 // Call the init function so wpes_enabled filter can work. 270 273 if ( ! empty( $this->wpes_wc ) ) { … … 464 467 465 468 // Request distinct results. 466 add_filter( 'posts_distinct_request', array( $this, 'wp_es_distinct' ) ); 469 add_filter( 470 'posts_distinct_request', 471 function() { 472 return 'DISTINCT'; 473 } 474 ); 467 475 468 476 /** … … 499 507 } 500 508 501 // Join tthe users table.509 // Join the users table. 502 510 if ( ! empty( $this->wpes_settings['authors'] ) ) { 503 511 $join .= " LEFT JOIN $wpdb->users esusers ON ($wpdb->posts.post_author = esusers.ID) "; … … 505 513 506 514 return $join; 507 }508 509 /**510 * Request distinct results.511 *512 * @since 1.0513 * @param string $distinct DISTINCT Keyword.514 * @return string $distinct515 */516 public function wp_es_distinct( $distinct ) {517 $distinct = 'DISTINCT';518 return $distinct;519 515 } 520 516 … … 604 600 return false; 605 601 } 602 603 /** 604 * Add additional hooks for compatibility with core and plugins/themes. 605 * 606 * @since dev 607 * @return void 608 */ 609 public function add_additional_compatibility_hooks() { 610 // Disable WPES for Query Loop block when "Inherit query from template" is disabled. 611 add_action( 612 'query_loop_block_query_vars', 613 function( $query, $block ) { 614 if ( empty( $block->context['query']['inherit'] ) ) { 615 $query['disable_wpes'] = true; 616 } 617 618 return $query; 619 }, 620 10, 621 2 622 ); 623 } 606 624 } -
wp-extended-search/trunk/languages/wp-extended-search.pot
r3069790 r3103729 6 6 "Report-Msgid-Bugs-To: " 7 7 "https://wordpress.org/support/plugin/wp-extended-search\n" 8 "POT-Creation-Date: 2024-0 4-12 21:24:52+00:00\n"8 "POT-Creation-Date: 2024-06-17 19:16:43+00:00\n" 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Type: text/plain; charset=utf-8\n"
Note: See TracChangeset
for help on using the changeset viewer.