Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Commit

Permalink
Merge pull request #580 from algolia/develop
Browse files Browse the repository at this point in the history
release 2.2.1
  • Loading branch information
rayrutjes authored May 12, 2017
2 parents 43aa048 + a029ab6 commit b806e3f
Show file tree
Hide file tree
Showing 25 changed files with 34 additions and 43 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2.2.1

- Rename 'page' variable to 'p' for ajax calls to avoid certain conflicts
- Move CSS and JS files out of assets/ directory to prepare for publishing all tags
- Avoid conflict with Polylang plugin

# 2.2.0

- Ensure frontend dependencies are loaded (especially 'wp-util': wp.template())
Expand Down
6 changes: 6 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ Automatic updates should work like a charm; as always though, ensure you backup

== Changelog ==

= 2.2.1 =

- Rename 'page' variable to 'p' for ajax calls to avoid certain conflicts
- Move CSS and JS files out of assets/ directory to prepare for publishing all tags
- Avoid conflict with Polylang plugin

= 2.2.0 =

- Ensure frontend dependencies are loaded (especially 'wp-util': wp.template())
Expand Down
4 changes: 2 additions & 2 deletions algolia.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Plugin Name: Search by Algolia – Instant & Relevant results
* Plugin URI: https://community.algolia.com/wordpress
* Description: Search by Algolia is the smartest way to improve search on your site. Autocomplete is included, along with full control over look, feel and relevance.
* Version: 2.2.0
* Version: 2.2.1
* Author: Algolia
* Author URI: https://www.algolia.com/
* License: MIT License, GNU General Public License v2.0
Expand All @@ -30,7 +30,7 @@
}

// The Algolia Search plugin version.
define( 'ALGOLIA_VERSION', '2.2.0' );
define( 'ALGOLIA_VERSION', '2.2.1' );
define( 'ALGOLIA_PLUGIN_BASENAME', plugin_basename(__FILE__) );

if ( ! defined( 'ALGOLIA_PATH' ) ) {
Expand Down
Binary file removed assets/img/algolia-logo.png
Binary file not shown.
1 change: 0 additions & 1 deletion assets/img/index.php

This file was deleted.

1 change: 0 additions & 1 deletion assets/index.php

This file was deleted.

12 changes: 6 additions & 6 deletions bin/update-js-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ set -e
# Update JS dependencies.
yarn install && yarn upgrade

cp node_modules/algoliasearch/dist/algoliasearch.jquery.js assets/js/algoliasearch/
cp node_modules/algoliasearch/dist/algoliasearch.jquery.min.js assets/js/algoliasearch/
cp node_modules/algoliasearch/dist/algoliasearch.jquery.js js/algoliasearch/
cp node_modules/algoliasearch/dist/algoliasearch.jquery.min.js js/algoliasearch/

cp node_modules/autocomplete.js/dist/autocomplete.js assets/js/autocomplete.js/
cp node_modules/autocomplete.js/dist/autocomplete.min.js assets/js/autocomplete.js/
cp node_modules/autocomplete.js/dist/autocomplete.js js/autocomplete.js/
cp node_modules/autocomplete.js/dist/autocomplete.min.js js/autocomplete.js/

cp node_modules/instantsearch.js/dist/instantsearch-preact.js assets/js/instantsearch.js/
cp node_modules/instantsearch.js/dist/instantsearch-preact.min.js assets/js/instantsearch.js/
cp node_modules/instantsearch.js/dist/instantsearch-preact.js js/instantsearch.js/
cp node_modules/instantsearch.js/dist/instantsearch-preact.min.js js/instantsearch.js/

rm -rf node_modules
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var siteBuild = Metalsmith(__dirname)
.metadata({
title: 'Algolia Search Plugin for WordPress',
url: 'https://github.com/algolia/algoliasearch-wordpress',
version: '2.2.0',
version: '2.2.1',
time: new Date().getTime(),
tweets:['666409672006606848','675635141713248256','684325213329305600','669552193419259904','672084577805012992','714625225359425536','669555344725696512','688027404741308417','783838738791227392','782584336323227648','787040561215582208','698839453469544448','687060441881796608','705467858961223680','665028633048821760','654785137272459265','661567388983279617','708574926962294784','707863195025858560'],
header: algoliaComponents.communityHeader(communityHeaderData)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/customize-autocomplete.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ You can read more about multi sources/categories autocomplete.js implementation

## Look & feel

We provide with some default CSS rules that are located in the `algolia/assets/css/algolia-autocomplete.css`. You can very easily add your own CSS rules to your theme's stylesheet.
We provide with some default CSS rules that are located in the `algolia/css/algolia-autocomplete.css`. You can very easily add your own CSS rules to your theme's stylesheet.

If for any reason you don't want the default stylesheet to be included, you can remove it like this:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/customize-search-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ search.start();

## Look & feel

We provide with some default CSS rules that are located in the `algolia/assets/css/algolia-instantsearch.css`. You can very easily add your own CSS rules to your theme's stylesheet.
We provide with some default CSS rules that are located in the `algolia/css/algolia-instantsearch.css`. You can very easily add your own CSS rules to your theme's stylesheet.

If for any reason you don't want the default stylesheet to be included, you can remove it like this:

Expand Down
4 changes: 2 additions & 2 deletions includes/admin/class-algolia-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ public function re_index() {
try {
$index_id = (string) $_POST['index_id'];

if ( ! isset( $_POST['page'] ) ) {
if ( ! isset( $_POST['p'] ) ) {
throw new RuntimeException('Page should be provided.');
}
$page = (int) $_POST['page'];
$page = (int) $_POST['p'];

$index = $this->plugin->get_index($index_id);
if (null === $index) {
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/js/reindex-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
var data = {
'action': 'algolia_re_index',
'index_id': index,
'page': currentPage
'p': currentPage
};

$.post(ajaxurl, data, function(response) {
Expand Down
3 changes: 2 additions & 1 deletion includes/class-algolia-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function wpml_switch_back_language( $post ) {
*/
private function is_wpml_enabled()
{
return function_exists( 'icl_object_id' );
// See https://github.com/algolia/algoliasearch-wordpress/issues/567
return function_exists( 'icl_object_id' ) && ! class_exists( 'Polylang' );
}
}
12 changes: 6 additions & 6 deletions includes/class-algolia-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ public function register_assets()
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';

// CSS.
wp_register_style( 'algolia-autocomplete', plugin_dir_url( __FILE__ ) . '../assets/css/algolia-autocomplete.css', array(), ALGOLIA_VERSION, 'screen' );
wp_register_style( 'algolia-instantsearch', plugin_dir_url( __FILE__ ) . '../assets/css/algolia-instantsearch.css', array(), ALGOLIA_VERSION, 'screen' );
wp_register_style( 'algolia-autocomplete', plugin_dir_url( __FILE__ ) . '../css/algolia-autocomplete.css', array(), ALGOLIA_VERSION, 'screen' );
wp_register_style( 'algolia-instantsearch', plugin_dir_url( __FILE__ ) . '../css/algolia-instantsearch.css', array(), ALGOLIA_VERSION, 'screen' );

// JS.
wp_register_script( 'algolia-search', plugin_dir_url( __FILE__ ) . '../assets/js/algoliasearch/algoliasearch.jquery'.$suffix.'.js', array( 'jquery', 'underscore', 'wp-util' ), ALGOLIA_VERSION );
wp_register_script( 'algolia-autocomplete', plugin_dir_url( __FILE__ ) . '../assets/js/autocomplete.js/autocomplete'.$suffix.'.js', array( 'jquery', 'underscore', 'wp-util' ), ALGOLIA_VERSION );
wp_register_script( 'algolia-autocomplete-noconflict', plugin_dir_url( __FILE__ ) . '../assets/js/autocomplete-noconflict.js', array( 'algolia-autocomplete' ), ALGOLIA_VERSION );
wp_register_script( 'algolia-search', plugin_dir_url( __FILE__ ) . '../js/algoliasearch/algoliasearch.jquery'.$suffix.'.js', array( 'jquery', 'underscore', 'wp-util' ), ALGOLIA_VERSION );
wp_register_script( 'algolia-autocomplete', plugin_dir_url( __FILE__ ) . '../js/autocomplete.js/autocomplete'.$suffix.'.js', array( 'jquery', 'underscore', 'wp-util' ), ALGOLIA_VERSION );
wp_register_script( 'algolia-autocomplete-noconflict', plugin_dir_url( __FILE__ ) . '../js/autocomplete-noconflict.js', array( 'algolia-autocomplete' ), ALGOLIA_VERSION );

wp_register_script( 'algolia-instantsearch', plugin_dir_url( __FILE__ ) . '../assets/js/instantsearch.js/instantsearch-preact'.$suffix.'.js', array( 'jquery', 'underscore', 'wp-util' ), ALGOLIA_VERSION );
wp_register_script( 'algolia-instantsearch', plugin_dir_url( __FILE__ ) . '../js/instantsearch.js/instantsearch-preact'.$suffix.'.js', array( 'jquery', 'underscore', 'wp-util' ), ALGOLIA_VERSION );
}

/**
Expand Down
File renamed without changes.
20 changes: 0 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
{
"name": "algoliasearch-wordpress",
"version": "2.2.0",
"description": "Algolia Search plugin for WordPress is a drop in replacement for WordPress search. It also provides an optional \"as you type\" auto-complete experience.",
"main": "index.js",
"directories": {
"doc": "docs"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/algolia/algoliasearch-wordpress.git"
},
"author": "",
"license": "(MIT OR Apache-2.0)",
"bugs": {
"url": "https://github.com/algolia/algoliasearch-wordpress/issues"
},
"homepage": "https://community.algolia.com/wordpress",
"dependencies": {
"algoliasearch": "^3.22.1",
"autocomplete.js": "^0.28.1",
Expand Down

0 comments on commit b806e3f

Please sign in to comment.