Changeset 3190433
- Timestamp:
- 11/17/2024 02:57:55 AM (17 months ago)
- Location:
- ajax-load-more-for-searchwp
- Files:
-
- 4 edited
- 1 copied
-
tags/1.0.4 (copied) (copied from ajax-load-more-for-searchwp/trunk)
-
tags/1.0.4/README.txt (modified) (2 diffs)
-
tags/1.0.4/ajax-load-more-for-searchwp.php (modified) (3 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/ajax-load-more-for-searchwp.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ajax-load-more-for-searchwp/tags/1.0.4/README.txt
r3186100 r3190433 6 6 Requires at least: 5.0 7 7 Tested up to: 6.7 8 Stable tag: 1.0. 38 Stable tag: 1.0.4 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 70 70 == Changelog == 71 71 72 = 1.0.4 - November 16, 2024 = 73 * FIX: Replace SWP_Query with SearchWP\Query 74 72 75 = 1.0.3 - November 11, 2024 = 73 76 * UPDATE: Readme, contributors, WordPress tested version. -
ajax-load-more-for-searchwp/tags/1.0.4/ajax-load-more-for-searchwp.php
r3186100 r3190433 7 7 * Author: Erick Danzer 8 8 * Author URI: https://connekthq.com 9 * Version: 1.0. 39 * Version: 1.0.4 10 10 * License: GPL 11 11 * Copyright: Erick Danzer … … 78 78 public function alm_searchwp_get_posts( $args, $engine ) { 79 79 80 if ( class_exists( ' SWP_Query' ) ) {80 if ( class_exists( '\SearchWP\Query' ) ) { 81 81 82 82 if ( empty( $engine ) || ! isset( $engine ) ) { … … 86 86 $term = sanitize_text_field( $args['s'] ); 87 87 88 $swp_query = new SWP_Query( 89 [ 90 'engine' => $engine, 91 's' => $term, 92 'fields' => 'ids', 93 'posts_per_page' => -1, 94 ] 95 ); 88 $swp_query = new \SearchWP\Query( $term, [ 89 'engine' => $engine, 90 'per_page' => -1, 91 'fields' => 'ids', 92 ] ); 96 93 97 if ( ! empty( $swp_query-> posts ) ) {98 $args['post__in'] = $swp_query-> posts;94 if ( ! empty( $swp_query->results ) ) { 95 $args['post__in'] = $swp_query->results; 99 96 $args['orderby'] = 'post__in'; // override orderby to relevance. 100 97 $args['search'] = $term; // Reset 's' term value. -
ajax-load-more-for-searchwp/trunk/README.txt
r3186100 r3190433 6 6 Requires at least: 5.0 7 7 Tested up to: 6.7 8 Stable tag: 1.0. 38 Stable tag: 1.0.4 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 70 70 == Changelog == 71 71 72 = 1.0.4 - November 16, 2024 = 73 * FIX: Replace SWP_Query with SearchWP\Query 74 72 75 = 1.0.3 - November 11, 2024 = 73 76 * UPDATE: Readme, contributors, WordPress tested version. -
ajax-load-more-for-searchwp/trunk/ajax-load-more-for-searchwp.php
r3186100 r3190433 7 7 * Author: Erick Danzer 8 8 * Author URI: https://connekthq.com 9 * Version: 1.0. 39 * Version: 1.0.4 10 10 * License: GPL 11 11 * Copyright: Erick Danzer … … 78 78 public function alm_searchwp_get_posts( $args, $engine ) { 79 79 80 if ( class_exists( ' SWP_Query' ) ) {80 if ( class_exists( '\SearchWP\Query' ) ) { 81 81 82 82 if ( empty( $engine ) || ! isset( $engine ) ) { … … 86 86 $term = sanitize_text_field( $args['s'] ); 87 87 88 $swp_query = new SWP_Query( 89 [ 90 'engine' => $engine, 91 's' => $term, 92 'fields' => 'ids', 93 'posts_per_page' => -1, 94 ] 95 ); 88 $swp_query = new \SearchWP\Query( $term, [ 89 'engine' => $engine, 90 'per_page' => -1, 91 'fields' => 'ids', 92 ] ); 96 93 97 if ( ! empty( $swp_query-> posts ) ) {98 $args['post__in'] = $swp_query-> posts;94 if ( ! empty( $swp_query->results ) ) { 95 $args['post__in'] = $swp_query->results; 99 96 $args['orderby'] = 'post__in'; // override orderby to relevance. 100 97 $args['search'] = $term; // Reset 's' term value.
Note: See TracChangeset
for help on using the changeset viewer.