Changeset 3071960
- Timestamp:
- 04/16/2024 08:56:21 PM (2 years ago)
- Location:
- searchwp-live-ajax-search
- Files:
-
- 15 edited
- 2 copied
-
tags/1.8.1 (copied) (copied from searchwp-live-ajax-search/trunk)
-
tags/1.8.1/includes/class-template.php (modified) (4 diffs)
-
tags/1.8.1/package.json (modified) (1 diff)
-
tags/1.8.1/readme.txt (copied) (copied from searchwp-live-ajax-search/trunk/readme.txt) (2 diffs)
-
tags/1.8.1/screenshot-1.png (modified) (previous)
-
tags/1.8.1/screenshot-2.png (modified) (previous)
-
tags/1.8.1/screenshot-3.png (modified) (previous)
-
tags/1.8.1/screenshot-4.png (modified) (previous)
-
tags/1.8.1/searchwp-live-ajax-search.php (modified) (2 diffs)
-
trunk/includes/class-template.php (modified) (4 diffs)
-
trunk/package.json (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/screenshot-1.png (modified) (previous)
-
trunk/screenshot-2.png (modified) (previous)
-
trunk/screenshot-3.png (modified) (previous)
-
trunk/screenshot-4.png (modified) (previous)
-
trunk/searchwp-live-ajax-search.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
searchwp-live-ajax-search/tags/1.8.1/includes/class-template.php
r3067168 r3071960 1 1 <?php 2 3 use SearchWP\Utils as SearchWP_Utils; 2 4 3 5 // Exit if accessed directly. … … 141 143 $results = $data['query']->posts; 142 144 143 $data['query_args']['post s__in'] = ! empty( $results ) ? wp_list_pluck( $results, 'ID' ) : [ 0 ];145 $data['query_args']['post__in'] = ! empty( $results ) ? wp_list_pluck( $results, 'ID' ) : [ 0 ]; 144 146 145 147 query_posts( $data['query_args'] ); // phpcs:ignore WordPress.WP.DiscouragedFunctions.query_posts_query_posts … … 164 166 165 167 $args = [ 166 's' => $data['query_args']['s'], 167 'post_status' => 'publish', 168 'post_type' => get_post_types( 169 [ 170 'public' => true, 171 'exclude_from_search' => false, 172 ] 173 ), 174 'posts_per_page' => $data['query_args']['per_page'], 168 'post_status' => 'any', 169 'post_type' => $this->get_engine_post_types(), 170 'posts_per_page' => $data['query_args']['per_page'], 171 'orderby' => 'post__in', 172 'suppress_filters' => true, 175 173 ]; 176 174 177 175 $results = $data['query']->get_results(); 178 176 179 $args['post s__in'] = ! empty( $results ) ? wp_list_pluck( $results, 'ID' ) : [ 0 ];177 $args['post__in'] = ! empty( $results ) ? wp_list_pluck( $results, 'ID' ) : [ 0 ]; 180 178 181 179 query_posts( $args ); // phpcs:ignore WordPress.WP.DiscouragedFunctions.query_posts_query_posts … … 184 182 185 183 load_template( $data['template'], true, false ); 184 } 185 186 /** 187 * Get the post types to query. 188 * 189 * @since 1.8.1 190 * 191 * @return array 192 */ 193 private function get_engine_post_types() { 194 195 $global_engine_sources = SearchWP_Utils::get_global_engine_source_names(); 196 197 $post_types = []; 198 199 foreach ( $global_engine_sources as $global_engine_source ) { 200 $indicator = 'post' . SEARCHWP_SEPARATOR; 201 if ( $indicator === substr( $global_engine_source, 0, strlen( $indicator ) ) ) { 202 $post_types[] = substr( $global_engine_source, strlen( $indicator ) ); 203 } 204 } 205 206 return $post_types; 186 207 } 187 208 -
searchwp-live-ajax-search/tags/1.8.1/package.json
r3067168 r3071960 1 1 { 2 2 "name": "searchwp-live-ajax-search", 3 "version": " 2.0.0",4 "description": " ",3 "version": "1.8.1", 4 "description": "Enhance your search forms with live search, powered by SearchWP (if installed)", 5 5 "main": "assets/javascript/src/searchwp-live-ajax-search.js", 6 6 "scripts": { -
searchwp-live-ajax-search/tags/1.8.1/readme.txt
r3067175 r3071960 4 4 Requires at least: 4.8 5 5 Tested up to: 6.5 6 Stable tag: 1.8. 06 Stable tag: 1.8.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 68 68 == Screenshots == 69 69 70 1. SearchWP Live Ajax Search automatically working in Twenty Fourteen instantly after activating71 2. Search results with default 'theme' (can be completely (completely) customized)72 3. SearchWP Live Ajax Search Widget73 4. SearchWP Live Ajax Search Widget Advanced70 1. SearchWP Live Ajax Search Results dropdown 71 2. SearchWP Live Ajax Search Settings page 72 3. SearchWP Live Ajax Search Forms settings page 73 4. SearchWP Live Ajax Search Forms embed options 74 74 75 75 == Changelog == 76 77 = 1.8.1 = 78 * Fixes incorrect results when using a Live Search custom template in some cases. 76 79 77 80 = 1.8.0 = -
searchwp-live-ajax-search/tags/1.8.1/searchwp-live-ajax-search.php
r3067168 r3071960 4 4 Plugin URI: https://searchwp.com/ 5 5 Description: Enhance your search forms with live search, powered by SearchWP (if installed) 6 Version: 1.8. 06 Version: 1.8.1 7 7 Requires PHP: 5.6 8 8 Author: SearchWP, LLC … … 37 37 * @since 1.7.0 38 38 */ 39 define( 'SEARCHWP_LIVE_SEARCH_VERSION', '1.8. 0' );39 define( 'SEARCHWP_LIVE_SEARCH_VERSION', '1.8.1' ); 40 40 } 41 41 -
searchwp-live-ajax-search/trunk/includes/class-template.php
r3067168 r3071960 1 1 <?php 2 3 use SearchWP\Utils as SearchWP_Utils; 2 4 3 5 // Exit if accessed directly. … … 141 143 $results = $data['query']->posts; 142 144 143 $data['query_args']['post s__in'] = ! empty( $results ) ? wp_list_pluck( $results, 'ID' ) : [ 0 ];145 $data['query_args']['post__in'] = ! empty( $results ) ? wp_list_pluck( $results, 'ID' ) : [ 0 ]; 144 146 145 147 query_posts( $data['query_args'] ); // phpcs:ignore WordPress.WP.DiscouragedFunctions.query_posts_query_posts … … 164 166 165 167 $args = [ 166 's' => $data['query_args']['s'], 167 'post_status' => 'publish', 168 'post_type' => get_post_types( 169 [ 170 'public' => true, 171 'exclude_from_search' => false, 172 ] 173 ), 174 'posts_per_page' => $data['query_args']['per_page'], 168 'post_status' => 'any', 169 'post_type' => $this->get_engine_post_types(), 170 'posts_per_page' => $data['query_args']['per_page'], 171 'orderby' => 'post__in', 172 'suppress_filters' => true, 175 173 ]; 176 174 177 175 $results = $data['query']->get_results(); 178 176 179 $args['post s__in'] = ! empty( $results ) ? wp_list_pluck( $results, 'ID' ) : [ 0 ];177 $args['post__in'] = ! empty( $results ) ? wp_list_pluck( $results, 'ID' ) : [ 0 ]; 180 178 181 179 query_posts( $args ); // phpcs:ignore WordPress.WP.DiscouragedFunctions.query_posts_query_posts … … 184 182 185 183 load_template( $data['template'], true, false ); 184 } 185 186 /** 187 * Get the post types to query. 188 * 189 * @since 1.8.1 190 * 191 * @return array 192 */ 193 private function get_engine_post_types() { 194 195 $global_engine_sources = SearchWP_Utils::get_global_engine_source_names(); 196 197 $post_types = []; 198 199 foreach ( $global_engine_sources as $global_engine_source ) { 200 $indicator = 'post' . SEARCHWP_SEPARATOR; 201 if ( $indicator === substr( $global_engine_source, 0, strlen( $indicator ) ) ) { 202 $post_types[] = substr( $global_engine_source, strlen( $indicator ) ); 203 } 204 } 205 206 return $post_types; 186 207 } 187 208 -
searchwp-live-ajax-search/trunk/package.json
r3067168 r3071960 1 1 { 2 2 "name": "searchwp-live-ajax-search", 3 "version": " 2.0.0",4 "description": " ",3 "version": "1.8.1", 4 "description": "Enhance your search forms with live search, powered by SearchWP (if installed)", 5 5 "main": "assets/javascript/src/searchwp-live-ajax-search.js", 6 6 "scripts": { -
searchwp-live-ajax-search/trunk/readme.txt
r3067175 r3071960 4 4 Requires at least: 4.8 5 5 Tested up to: 6.5 6 Stable tag: 1.8. 06 Stable tag: 1.8.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 68 68 == Screenshots == 69 69 70 1. SearchWP Live Ajax Search automatically working in Twenty Fourteen instantly after activating71 2. Search results with default 'theme' (can be completely (completely) customized)72 3. SearchWP Live Ajax Search Widget73 4. SearchWP Live Ajax Search Widget Advanced70 1. SearchWP Live Ajax Search Results dropdown 71 2. SearchWP Live Ajax Search Settings page 72 3. SearchWP Live Ajax Search Forms settings page 73 4. SearchWP Live Ajax Search Forms embed options 74 74 75 75 == Changelog == 76 77 = 1.8.1 = 78 * Fixes incorrect results when using a Live Search custom template in some cases. 76 79 77 80 = 1.8.0 = -
searchwp-live-ajax-search/trunk/searchwp-live-ajax-search.php
r3067168 r3071960 4 4 Plugin URI: https://searchwp.com/ 5 5 Description: Enhance your search forms with live search, powered by SearchWP (if installed) 6 Version: 1.8. 06 Version: 1.8.1 7 7 Requires PHP: 5.6 8 8 Author: SearchWP, LLC … … 37 37 * @since 1.7.0 38 38 */ 39 define( 'SEARCHWP_LIVE_SEARCH_VERSION', '1.8. 0' );39 define( 'SEARCHWP_LIVE_SEARCH_VERSION', '1.8.1' ); 40 40 } 41 41
Note: See TracChangeset
for help on using the changeset viewer.