Changeset 2599341
- Timestamp:
- 09/15/2021 01:13:44 PM (5 years ago)
- Location:
- swiftype-search/trunk
- Files:
-
- 1 added
- 5 edited
-
Config/Config.php (modified) (1 diff)
-
Document/Indexer.php (modified) (3 diffs)
-
README.md (modified) (1 diff)
-
README.txt (modified) (2 diffs)
-
stack.yml (added)
-
swiftype.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
swiftype-search/trunk/Config/Config.php
r2176803 r2599341 145 145 } 146 146 147 return $allowedPostTypes;147 return \apply_filters('swiftype_allowed_post_types', $allowedPostTypes); 148 148 } 149 149 } -
swiftype-search/trunk/Document/Indexer.php
r2176803 r2599341 18 18 19 19 /** 20 * @var string[] 21 */ 22 private static $FORBIDDEN_POST_TYPES = ['attachment']; 23 24 /** 20 25 * Constructor. 21 26 */ … … 24 29 parent::__construct(); 25 30 $this->documentMapper = new Mapper(); 31 \add_filter('swiftype_allowed_post_types', [$this, 'filterAllowedPostType']); 26 32 \add_action('swiftype_engine_loaded', [$this, 'installHooks']); 33 } 34 35 /** 36 * Filter out forbiden post types fron indexing. 37 * 38 * @param string[] $allowedPostTypes 39 * 40 * @return string[] 41 */ 42 public function filterAllowedPostType($allowedPostTypes) 43 { 44 return \array_diff($allowedPostTypes, self::$FORBIDDEN_POST_TYPES); 27 45 } 28 46 … … 45 63 46 64 47 add_action('swiftype_batch_post_index', [$this, 'handlePostBatchIndex']);48 add_action('swiftype_batch_post_delete', [$this, 'handlePostBatchDelete']);65 \add_action('swiftype_batch_post_index', [$this, 'handlePostBatchIndex']); 66 \add_action('swiftype_batch_post_delete', [$this, 'handlePostBatchDelete']); 49 67 } 50 68 } -
swiftype-search/trunk/README.md
r2176803 r2599341 47 47 You can contact our support by sending an email to support@swiftype.com. 48 48 49 ### How to start the development environment 50 51 #### Create the Docker stack 52 53 You can create a docker stack using: 54 55 ```bash 56 docker stack deploy -c stack.yml wordpress-dev 57 ``` 58 59 Alternatively, you can use docker-compose instead of stack: 60 61 ```bash 62 docker-compose -f stack.yml up 63 ``` 64 65 Your wordpress dev instance will boot up and be available at http://localhost:8080. 66 67 To enter the wordpress container, you can use the followin command: 68 69 ```bash 70 docker exec -it $(docker ps -a -f label=com.docker.stack.namespace=wordpress-dev -f expose=80/tcp --format "{{.ID}}") /bin/bash 71 ``` 72 73 49 74 ## Contribute 🚀 50 75 -
swiftype-search/trunk/README.txt
r2408209 r2599341 4 4 Tags: search, better search, custom search, relevant search, search by category, autocomplete, suggest, typeahead 5 5 Requires at least: 3.3 6 Tested up to: 5. 5.17 Stable tag: 2.0. 46 Tested up to: 5.8.1 7 Stable tag: 2.0.5 8 8 License: Apache 2.0 9 9 License URI: https://github.com/swiftype/swiftype-wordpress/blob/master/LICENSE … … 66 66 67 67 == Changelog == 68 69 = 2.0.5 = 70 * Do not index posts with type attachment anymore by default 71 * Added a new filter to allow to customize indexed post types swiftype_allowed_post_types 68 72 69 73 = 2.0.4 = -
swiftype-search/trunk/swiftype.php
r2408209 r2599341 6 6 Description: The Swiftype Search plugin replaces the standard WordPress search with a better search engine that is fully customizable via the Swiftype dashboard. The Swiftype dashboard lets you customize the results for any search keyword via a drag-and-drop interface. 7 7 Author: Swiftype, Inc. 8 Version: 2.0. 48 Version: 2.0.5 9 9 Author URI: http://swiftype.com 10 10 */ 11 11 12 define('SWIFTYPE_VERSION', '2.0. 4');12 define('SWIFTYPE_VERSION', '2.0.5'); 13 13 14 require_once ('vendor/autoload.php');14 require_once __DIR__ . '/vendor/autoload.php'; 15 15 16 require_once 'swiftype-theme-functions.php';16 require_once __DIR__ . '/swiftype-theme-functions.php'; 17 17 18 18 if (defined('WP_CLI') && WP_CLI) {
Note: See TracChangeset
for help on using the changeset viewer.