Plugin Directory

Changeset 2465306


Ignore:
Timestamp:
01/29/2021 11:37:01 PM (5 years ago)
Author:
richaber
Message:

Tagging 1.7.0

Location:
wp-search-with-algolia
Files:
12 added
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-search-with-algolia/tags/1.7.0/README.txt

    r2418143 r2465306  
    66Tested up to: 5.5
    77Requires PHP: 7.2
    8 Stable tag: 1.6.0
     8Stable tag: 1.7.0
    99License: GNU General Public License v2.0, MIT License
    1010
     
    110110Follow along with the changelog on [Github](https://github.com/WebDevStudios/wp-search-with-algolia/releases).
    111111
     112= 1.7.0 =
     113* Remove 'screen' media attribute from enqueued CSS
     114* Update Algolia PHP Search Client to version 2.7.3.
     115* Add "exclude" methods and filters
     116* Deprecate "blacklist" methods and filters
     117* Fix replica RequestOptions error
     118* Fix PHP 8 usort deprecation warning
     119* Fix JQMIGRATE event shorthand is deprecated warnings in instantsearch.php and autocomplete.php templates
     120* Add "@version" to template file headers
     121
    112122= 1.6.0 =
    113123* Fix deletion of post records created before indexing was enabled
  • wp-search-with-algolia/tags/1.7.0/algolia.php

    r2418143 r2465306  
    44 * Plugin URI:        https://github.com/WebDevStudios/wp-search-with-algolia
    55 * Description:       Integrate the powerful Algolia search service with WordPress
    6  * Version:           1.6.0
     6 * Version:           1.7.0
    77 * Requires at least: 5.0
    88 * Requires PHP:      7.2
     
    2727
    2828// The Algolia Search plugin version.
    29 define( 'ALGOLIA_VERSION', '1.6.0' );
     29define( 'ALGOLIA_VERSION', '1.7.0' );
    3030
    3131// The minmum required PHP version.
  • wp-search-with-algolia/tags/1.7.0/includes/class-algolia-autocomplete-config.php

    r2350155 r2465306  
    7575
    7676        usort(
    77             $config, function( $a, $b ) {
    78                 return $a['position'] > $b['position'];
     77            $config, function( $a, $b ):int {
     78                return $a['position'] <=> $b['position'];
    7979            }
    8080        );
     
    183183        // Sort the indices.
    184184        usort(
    185             $config, function( $a, $b ) {
    186                 return $a['position'] > $b['position'];
     185            $config, function( $a, $b ):int {
     186                return $a['position'] <=> $b['position'];
    187187            }
    188188        );
  • wp-search-with-algolia/tags/1.7.0/includes/class-algolia-plugin.php

    r2418143 r2465306  
    271271        $post_types = get_post_types();
    272272
    273         $post_types_blacklist = $this->settings->get_post_types_blacklist();
     273        $excluded_post_types = $this->settings->get_excluded_post_types();
    274274        foreach ( $post_types as $post_type ) {
    275             // Skip blacklisted post types.
    276             if ( in_array( $post_type, $post_types_blacklist, true ) ) {
     275            // Skip excluded post types.
     276            if ( in_array( $post_type, $excluded_post_types, true ) ) {
    277277                continue;
    278278            }
     
    282282
    283283        // Add one terms index per taxonomy.
    284         $taxonomies           = get_taxonomies();
    285         $taxonomies_blacklist = $this->settings->get_taxonomies_blacklist();
     284        $taxonomies          = get_taxonomies();
     285        $excluded_taxonomies = $this->settings->get_excluded_taxonomies();
    286286        foreach ( $taxonomies as $taxonomy ) {
    287             // Skip blacklisted post types.
    288             if ( in_array( $taxonomy, $taxonomies_blacklist, true ) ) {
     287            // Skip excluded taxonomies.
     288            if ( in_array( $taxonomy, $excluded_taxonomies, true ) ) {
    289289                continue;
    290290            }
  • wp-search-with-algolia/tags/1.7.0/includes/class-algolia-settings.php

    r2350155 r2465306  
    9393
    9494    /**
    95      * Get the post types blacklist.
    96      *
    97      * @author  WebDevStudios <[email protected]>
    98      * @since   1.0.0
     95     * Get the excluded post types.
     96     *
     97     * @author     WebDevStudios <[email protected]>
     98     * @since      1.0.0
     99     * @deprecated 1.7.0 Use Algolia_Settings::get_excluded_post_types()
     100     * @see        Algolia_Settings::get_excluded_post_types()
    99101     *
    100102     * @return array
    101103     */
    102104    public function get_post_types_blacklist() {
    103         $blacklist = (array) apply_filters( 'algolia_post_types_blacklist', array( 'nav_menu_item' ) );
     105        _deprecated_function(
     106            __METHOD__,
     107            '1.7.0',
     108            'Algolia_Settings::get_excluded_post_types();'
     109        );
     110
     111        return $this->get_excluded_post_types();
     112    }
     113
     114    /**
     115     * Get the excluded post types.
     116     *
     117     * @author  WebDevStudios <[email protected]>
     118     * @since   1.7.0
     119     *
     120     * @return array
     121     */
     122    public function get_excluded_post_types() {
     123
     124        // Default array of excluded post types.
     125        $excluded = [ 'nav_menu_item' ];
     126
     127        /**
     128         * Filters excluded post types.
     129         *
     130         * @since      1.0.0
     131         * @deprecated 1.7.0 Use {@see 'algolia_excluded_post_types'} instead.
     132         *
     133         * @param array $excluded The excluded post types.
     134         */
     135        $excluded = (array) apply_filters_deprecated(
     136            'algolia_post_types_blacklist',
     137            [ $excluded ],
     138            '1.7.0',
     139            'algolia_excluded_post_types'
     140        );
     141
     142        /**
     143         * Filters excluded post types.
     144         *
     145         * @since 1.7.0
     146         *
     147         * @param array $excluded The excluded post types.
     148         */
     149        $excluded = (array) apply_filters( 'algolia_excluded_post_types', $excluded );
    104150
    105151        // Native WordPress.
    106         $blacklist[] = 'revision';
     152        $excluded[] = 'revision';
    107153
    108154        // Native to Algolia Search plugin.
    109         $blacklist[] = 'algolia_task';
    110         $blacklist[] = 'algolia_log';
     155        $excluded[] = 'algolia_task';
     156        $excluded[] = 'algolia_log';
    111157
    112158        // Native to WordPress VIP platform.
    113         $blacklist[] = 'kr_request_token';
    114         $blacklist[] = 'kr_access_token';
    115         $blacklist[] = 'deprecated_log';
    116         $blacklist[] = 'async-scan-result';
    117         $blacklist[] = 'scanresult';
    118 
    119         return array_unique( $blacklist );
     159        $excluded[] = 'kr_request_token';
     160        $excluded[] = 'kr_access_token';
     161        $excluded[] = 'deprecated_log';
     162        $excluded[] = 'async-scan-result';
     163        $excluded[] = 'scanresult';
     164
     165        return array_unique( $excluded );
    120166    }
    121167
     
    149195
    150196    /**
    151      * Get taxonomies blacklist.
    152      *
    153      * @author  WebDevStudios <[email protected]>
    154      * @since   1.0.0
     197     * Get excluded taxonomies.
     198     *
     199     * @author     WebDevStudios <[email protected]>
     200     * @since      1.0.0
     201     * @deprecated 1.7.0 Use Algolia_Settings::get_excluded_taxonomies()
     202     * @see        Algolia_Settings::get_excluded_taxonomies()
    155203     *
    156204     * @return array
    157205     */
    158206    public function get_taxonomies_blacklist() {
    159         return (array) apply_filters( 'algolia_taxonomies_blacklist', array( 'nav_menu', 'link_category', 'post_format' ) );
     207        _deprecated_function(
     208            __METHOD__,
     209            '1.7.0',
     210            'Algolia_Settings::get_excluded_taxonomies();'
     211        );
     212
     213        return $this->get_excluded_taxonomies();
     214    }
     215
     216    /**
     217     * Get excluded taxonomies.
     218     *
     219     * @author WebDevStudios <[email protected]>
     220     * @since  1.7.0
     221     *
     222     * @return array
     223     */
     224    public function get_excluded_taxonomies() {
     225
     226        // Default array of excluded taxonomies.
     227        $excluded = [
     228            'nav_menu',
     229            'link_category',
     230            'post_format',
     231        ];
     232
     233        /**
     234         * Filters excluded taxonomies.
     235         *
     236         * @since      1.0.0
     237         * @deprecated 1.7.0 Use {@see 'algolia_excluded_taxonomies'} instead.
     238         *
     239         * @param array $excluded The excluded taxonomies.
     240         */
     241        $excluded = (array) apply_filters_deprecated(
     242            'algolia_taxonomies_blacklist',
     243            [ $excluded ],
     244            '1.7.0',
     245            'algolia_excluded_taxonomies'
     246        );
     247
     248        $excluded = (array) apply_filters( 'algolia_excluded_taxonomies', $excluded );
     249
     250        return $excluded;
    160251    }
    161252
  • wp-search-with-algolia/tags/1.7.0/includes/class-algolia-styles.php

    r2395495 r2465306  
    3838            ALGOLIA_PLUGIN_URL . 'css/algolia-autocomplete.css',
    3939            [],
    40             ALGOLIA_VERSION,
    41             'screen'
     40            ALGOLIA_VERSION
    4241        );
    4342
     
    4645            ALGOLIA_PLUGIN_URL . 'css/algolia-instantsearch.css',
    4746            [],
    48             ALGOLIA_VERSION,
    49             'screen'
     47            ALGOLIA_VERSION
    5048        );
    5149    }
  • wp-search-with-algolia/tags/1.7.0/includes/indices/class-algolia-index.php

    r2418143 r2465306  
    732732            array(
    733733                'replicas' => $replica_index_names,
    734             ), false
     734            )
    735735        );
    736736
  • wp-search-with-algolia/tags/1.7.0/includes/libraries/algoliasearch-client-php/src/Algolia.php

    r2418143 r2465306  
    1111final class Algolia
    1212{
    13     const VERSION = '2.7.1';
     13    const VERSION = '2.7.3';
    1414
    1515    /**
  • wp-search-with-algolia/tags/1.7.0/templates/autocomplete.php

    r2350155 r2465306  
    66 * @since   1.0.0
    77 *
     8 * @version 1.7.0
    89 * @package WebDevStudios\WPSWA
    910 */
     
    175176
    176177            /* Force the dropdown to be re-drawn on scroll to handle fixed containers. */
    177             jQuery( window ).scroll( function () {
     178            jQuery( window ).on( 'scroll', function() {
    178179                if ( autocomplete.autocomplete.getWrapper().style.display === "block" ) {
    179180                    autocomplete.autocomplete.close();
  • wp-search-with-algolia/tags/1.7.0/templates/instantsearch.php

    r2418143 r2465306  
    66 * @since   1.0.0
    77 *
     8 * @version 1.7.0
    89 * @package WebDevStudios\WPSWA
    910 */
     
    7475                    searchParameters: {
    7576                        facetingAfterDistinct: true,
    76             highlightPreTag: '__ais-highlight__',
    77             highlightPostTag: '__/ais-highlight__'
     77                        highlightPreTag: '__ais-highlight__',
     78                        highlightPostTag: '__/ais-highlight__'
    7879                    }
    7980                });
     
    192193                search.start();
    193194
    194                 jQuery('#algolia-search-box input').attr('type', 'search').select();
     195                jQuery( '#algolia-search-box input' ).attr( 'type', 'search' ).trigger( 'select' );
    195196            }
    196197        });
  • wp-search-with-algolia/trunk/README.txt

    r2418143 r2465306  
    66Tested up to: 5.5
    77Requires PHP: 7.2
    8 Stable tag: 1.6.0
     8Stable tag: 1.7.0
    99License: GNU General Public License v2.0, MIT License
    1010
     
    110110Follow along with the changelog on [Github](https://github.com/WebDevStudios/wp-search-with-algolia/releases).
    111111
     112= 1.7.0 =
     113* Remove 'screen' media attribute from enqueued CSS
     114* Update Algolia PHP Search Client to version 2.7.3.
     115* Add "exclude" methods and filters
     116* Deprecate "blacklist" methods and filters
     117* Fix replica RequestOptions error
     118* Fix PHP 8 usort deprecation warning
     119* Fix JQMIGRATE event shorthand is deprecated warnings in instantsearch.php and autocomplete.php templates
     120* Add "@version" to template file headers
     121
    112122= 1.6.0 =
    113123* Fix deletion of post records created before indexing was enabled
  • wp-search-with-algolia/trunk/algolia.php

    r2418143 r2465306  
    44 * Plugin URI:        https://github.com/WebDevStudios/wp-search-with-algolia
    55 * Description:       Integrate the powerful Algolia search service with WordPress
    6  * Version:           1.6.0
     6 * Version:           1.7.0
    77 * Requires at least: 5.0
    88 * Requires PHP:      7.2
     
    2727
    2828// The Algolia Search plugin version.
    29 define( 'ALGOLIA_VERSION', '1.6.0' );
     29define( 'ALGOLIA_VERSION', '1.7.0' );
    3030
    3131// The minmum required PHP version.
  • wp-search-with-algolia/trunk/includes/class-algolia-autocomplete-config.php

    r2350155 r2465306  
    7575
    7676        usort(
    77             $config, function( $a, $b ) {
    78                 return $a['position'] > $b['position'];
     77            $config, function( $a, $b ):int {
     78                return $a['position'] <=> $b['position'];
    7979            }
    8080        );
     
    183183        // Sort the indices.
    184184        usort(
    185             $config, function( $a, $b ) {
    186                 return $a['position'] > $b['position'];
     185            $config, function( $a, $b ):int {
     186                return $a['position'] <=> $b['position'];
    187187            }
    188188        );
  • wp-search-with-algolia/trunk/includes/class-algolia-plugin.php

    r2418143 r2465306  
    271271        $post_types = get_post_types();
    272272
    273         $post_types_blacklist = $this->settings->get_post_types_blacklist();
     273        $excluded_post_types = $this->settings->get_excluded_post_types();
    274274        foreach ( $post_types as $post_type ) {
    275             // Skip blacklisted post types.
    276             if ( in_array( $post_type, $post_types_blacklist, true ) ) {
     275            // Skip excluded post types.
     276            if ( in_array( $post_type, $excluded_post_types, true ) ) {
    277277                continue;
    278278            }
     
    282282
    283283        // Add one terms index per taxonomy.
    284         $taxonomies           = get_taxonomies();
    285         $taxonomies_blacklist = $this->settings->get_taxonomies_blacklist();
     284        $taxonomies          = get_taxonomies();
     285        $excluded_taxonomies = $this->settings->get_excluded_taxonomies();
    286286        foreach ( $taxonomies as $taxonomy ) {
    287             // Skip blacklisted post types.
    288             if ( in_array( $taxonomy, $taxonomies_blacklist, true ) ) {
     287            // Skip excluded taxonomies.
     288            if ( in_array( $taxonomy, $excluded_taxonomies, true ) ) {
    289289                continue;
    290290            }
  • wp-search-with-algolia/trunk/includes/class-algolia-settings.php

    r2350155 r2465306  
    9393
    9494    /**
    95      * Get the post types blacklist.
    96      *
    97      * @author  WebDevStudios <[email protected]>
    98      * @since   1.0.0
     95     * Get the excluded post types.
     96     *
     97     * @author     WebDevStudios <[email protected]>
     98     * @since      1.0.0
     99     * @deprecated 1.7.0 Use Algolia_Settings::get_excluded_post_types()
     100     * @see        Algolia_Settings::get_excluded_post_types()
    99101     *
    100102     * @return array
    101103     */
    102104    public function get_post_types_blacklist() {
    103         $blacklist = (array) apply_filters( 'algolia_post_types_blacklist', array( 'nav_menu_item' ) );
     105        _deprecated_function(
     106            __METHOD__,
     107            '1.7.0',
     108            'Algolia_Settings::get_excluded_post_types();'
     109        );
     110
     111        return $this->get_excluded_post_types();
     112    }
     113
     114    /**
     115     * Get the excluded post types.
     116     *
     117     * @author  WebDevStudios <[email protected]>
     118     * @since   1.7.0
     119     *
     120     * @return array
     121     */
     122    public function get_excluded_post_types() {
     123
     124        // Default array of excluded post types.
     125        $excluded = [ 'nav_menu_item' ];
     126
     127        /**
     128         * Filters excluded post types.
     129         *
     130         * @since      1.0.0
     131         * @deprecated 1.7.0 Use {@see 'algolia_excluded_post_types'} instead.
     132         *
     133         * @param array $excluded The excluded post types.
     134         */
     135        $excluded = (array) apply_filters_deprecated(
     136            'algolia_post_types_blacklist',
     137            [ $excluded ],
     138            '1.7.0',
     139            'algolia_excluded_post_types'
     140        );
     141
     142        /**
     143         * Filters excluded post types.
     144         *
     145         * @since 1.7.0
     146         *
     147         * @param array $excluded The excluded post types.
     148         */
     149        $excluded = (array) apply_filters( 'algolia_excluded_post_types', $excluded );
    104150
    105151        // Native WordPress.
    106         $blacklist[] = 'revision';
     152        $excluded[] = 'revision';
    107153
    108154        // Native to Algolia Search plugin.
    109         $blacklist[] = 'algolia_task';
    110         $blacklist[] = 'algolia_log';
     155        $excluded[] = 'algolia_task';
     156        $excluded[] = 'algolia_log';
    111157
    112158        // Native to WordPress VIP platform.
    113         $blacklist[] = 'kr_request_token';
    114         $blacklist[] = 'kr_access_token';
    115         $blacklist[] = 'deprecated_log';
    116         $blacklist[] = 'async-scan-result';
    117         $blacklist[] = 'scanresult';
    118 
    119         return array_unique( $blacklist );
     159        $excluded[] = 'kr_request_token';
     160        $excluded[] = 'kr_access_token';
     161        $excluded[] = 'deprecated_log';
     162        $excluded[] = 'async-scan-result';
     163        $excluded[] = 'scanresult';
     164
     165        return array_unique( $excluded );
    120166    }
    121167
     
    149195
    150196    /**
    151      * Get taxonomies blacklist.
    152      *
    153      * @author  WebDevStudios <[email protected]>
    154      * @since   1.0.0
     197     * Get excluded taxonomies.
     198     *
     199     * @author     WebDevStudios <[email protected]>
     200     * @since      1.0.0
     201     * @deprecated 1.7.0 Use Algolia_Settings::get_excluded_taxonomies()
     202     * @see        Algolia_Settings::get_excluded_taxonomies()
    155203     *
    156204     * @return array
    157205     */
    158206    public function get_taxonomies_blacklist() {
    159         return (array) apply_filters( 'algolia_taxonomies_blacklist', array( 'nav_menu', 'link_category', 'post_format' ) );
     207        _deprecated_function(
     208            __METHOD__,
     209            '1.7.0',
     210            'Algolia_Settings::get_excluded_taxonomies();'
     211        );
     212
     213        return $this->get_excluded_taxonomies();
     214    }
     215
     216    /**
     217     * Get excluded taxonomies.
     218     *
     219     * @author WebDevStudios <[email protected]>
     220     * @since  1.7.0
     221     *
     222     * @return array
     223     */
     224    public function get_excluded_taxonomies() {
     225
     226        // Default array of excluded taxonomies.
     227        $excluded = [
     228            'nav_menu',
     229            'link_category',
     230            'post_format',
     231        ];
     232
     233        /**
     234         * Filters excluded taxonomies.
     235         *
     236         * @since      1.0.0
     237         * @deprecated 1.7.0 Use {@see 'algolia_excluded_taxonomies'} instead.
     238         *
     239         * @param array $excluded The excluded taxonomies.
     240         */
     241        $excluded = (array) apply_filters_deprecated(
     242            'algolia_taxonomies_blacklist',
     243            [ $excluded ],
     244            '1.7.0',
     245            'algolia_excluded_taxonomies'
     246        );
     247
     248        $excluded = (array) apply_filters( 'algolia_excluded_taxonomies', $excluded );
     249
     250        return $excluded;
    160251    }
    161252
  • wp-search-with-algolia/trunk/includes/class-algolia-styles.php

    r2395495 r2465306  
    3838            ALGOLIA_PLUGIN_URL . 'css/algolia-autocomplete.css',
    3939            [],
    40             ALGOLIA_VERSION,
    41             'screen'
     40            ALGOLIA_VERSION
    4241        );
    4342
     
    4645            ALGOLIA_PLUGIN_URL . 'css/algolia-instantsearch.css',
    4746            [],
    48             ALGOLIA_VERSION,
    49             'screen'
     47            ALGOLIA_VERSION
    5048        );
    5149    }
  • wp-search-with-algolia/trunk/includes/indices/class-algolia-index.php

    r2418143 r2465306  
    732732            array(
    733733                'replicas' => $replica_index_names,
    734             ), false
     734            )
    735735        );
    736736
  • wp-search-with-algolia/trunk/includes/libraries/algoliasearch-client-php/src/Algolia.php

    r2418143 r2465306  
    1111final class Algolia
    1212{
    13     const VERSION = '2.7.1';
     13    const VERSION = '2.7.3';
    1414
    1515    /**
  • wp-search-with-algolia/trunk/templates/autocomplete.php

    r2350155 r2465306  
    66 * @since   1.0.0
    77 *
     8 * @version 1.7.0
    89 * @package WebDevStudios\WPSWA
    910 */
     
    175176
    176177            /* Force the dropdown to be re-drawn on scroll to handle fixed containers. */
    177             jQuery( window ).scroll( function () {
     178            jQuery( window ).on( 'scroll', function() {
    178179                if ( autocomplete.autocomplete.getWrapper().style.display === "block" ) {
    179180                    autocomplete.autocomplete.close();
  • wp-search-with-algolia/trunk/templates/instantsearch.php

    r2418143 r2465306  
    66 * @since   1.0.0
    77 *
     8 * @version 1.7.0
    89 * @package WebDevStudios\WPSWA
    910 */
     
    7475                    searchParameters: {
    7576                        facetingAfterDistinct: true,
    76             highlightPreTag: '__ais-highlight__',
    77             highlightPostTag: '__/ais-highlight__'
     77                        highlightPreTag: '__ais-highlight__',
     78                        highlightPostTag: '__/ais-highlight__'
    7879                    }
    7980                });
     
    192193                search.start();
    193194
    194                 jQuery('#algolia-search-box input').attr('type', 'search').select();
     195                jQuery( '#algolia-search-box input' ).attr( 'type', 'search' ).trigger( 'select' );
    195196            }
    196197        });
Note: See TracChangeset for help on using the changeset viewer.