Plugin Directory

Changeset 2599341


Ignore:
Timestamp:
09/15/2021 01:13:44 PM (5 years ago)
Author:
afoucret
Message:

bump code version to v2.0.5

Location:
swiftype-search/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • swiftype-search/trunk/Config/Config.php

    r2176803 r2599341  
    145145        }
    146146
    147         return $allowedPostTypes;
     147        return \apply_filters('swiftype_allowed_post_types', $allowedPostTypes);
    148148    }
    149149}
  • swiftype-search/trunk/Document/Indexer.php

    r2176803 r2599341  
    1818
    1919    /**
     20     * @var string[]
     21     */
     22    private static $FORBIDDEN_POST_TYPES = ['attachment'];
     23
     24    /**
    2025     * Constructor.
    2126     */
     
    2429        parent::__construct();
    2530        $this->documentMapper = new Mapper();
     31        \add_filter('swiftype_allowed_post_types', [$this, 'filterAllowedPostType']);
    2632        \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);
    2745    }
    2846
     
    4563
    4664
    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']);
    4967        }
    5068    }
  • swiftype-search/trunk/README.md

    r2176803 r2599341  
    4747You can contact our support by sending an email to support@swiftype.com.
    4848
     49### How to start the development environment
     50
     51#### Create the Docker stack
     52
     53You can create a docker stack using:
     54
     55```bash
     56docker stack deploy -c stack.yml wordpress-dev
     57```
     58
     59Alternatively, you can use docker-compose instead of stack:
     60
     61```bash
     62docker-compose -f stack.yml up
     63```
     64
     65Your wordpress dev instance will boot up and be available at http://localhost:8080.
     66
     67To enter the wordpress container, you can use the followin command:
     68
     69```bash
     70docker exec -it $(docker ps -a -f label=com.docker.stack.namespace=wordpress-dev -f expose=80/tcp --format "{{.ID}}") /bin/bash
     71```
     72
     73
    4974## Contribute 🚀
    5075
  • swiftype-search/trunk/README.txt

    r2408209 r2599341  
    44Tags: search, better search, custom search, relevant search, search by category, autocomplete, suggest, typeahead
    55Requires at least: 3.3
    6 Tested up to: 5.5.1
    7 Stable tag: 2.0.4
     6Tested up to: 5.8.1
     7Stable tag: 2.0.5
    88License: Apache 2.0
    99License URI: https://github.com/swiftype/swiftype-wordpress/blob/master/LICENSE
     
    6666
    6767== 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
    6872
    6973= 2.0.4 =
  • swiftype-search/trunk/swiftype.php

    r2408209 r2599341  
    66Description: 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.
    77Author: Swiftype, Inc.
    8 Version: 2.0.4
     8Version: 2.0.5
    99Author URI: http://swiftype.com
    1010*/
    1111
    12 define('SWIFTYPE_VERSION', '2.0.4');
     12define('SWIFTYPE_VERSION', '2.0.5');
    1313
    14 require_once('vendor/autoload.php');
     14require_once __DIR__ . '/vendor/autoload.php';
    1515
    16 require_once 'swiftype-theme-functions.php';
     16require_once __DIR__ . '/swiftype-theme-functions.php';
    1717
    1818if (defined('WP_CLI') && WP_CLI) {
Note: See TracChangeset for help on using the changeset viewer.