Changeset 2100698
- Timestamp:
- 06/04/2019 10:26:52 PM (7 years ago)
- Location:
- wp-algolia
- Files:
-
- 12 edited
- 1 copied
-
tags/3.0.1 (copied) (copied from wp-algolia/trunk)
-
tags/3.0.1/src/indices/class-algolia-posts-index-abstract.php (modified) (1 diff)
-
tags/3.0.1/src/indices/class-algolia-searchable-posts-index.php (modified) (4 diffs)
-
tags/3.0.1/vendor/autoload.php (modified) (1 diff)
-
tags/3.0.1/vendor/composer/autoload_real.php (modified) (5 diffs)
-
tags/3.0.1/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/3.0.1/wp-algolia.php (modified) (1 diff)
-
trunk/src/indices/class-algolia-posts-index-abstract.php (modified) (1 diff)
-
trunk/src/indices/class-algolia-searchable-posts-index.php (modified) (4 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (5 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/wp-algolia.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-algolia/tags/3.0.1/src/indices/class-algolia-posts-index-abstract.php
r2100083 r2100698 95 95 $shared_attributes['post_id'] = $post->ID; 96 96 $shared_attributes['post_type'] = $post->post_type; 97 $shared_attributes['post_type_label'] = $this->get_post_label_attributes( );97 $shared_attributes['post_type_label'] = $this->get_post_label_attributes($post); 98 98 $shared_attributes['post_title'] = $post->post_title; 99 99 $shared_attributes['post_excerpt'] = apply_filters('the_excerpt', $post->post_excerpt); -
wp-algolia/tags/3.0.1/src/indices/class-algolia-searchable-posts-index.php
r2100083 r2100698 75 75 protected function get_settings() 76 76 { 77 $settings = array(78 'attributesToIndex' => array(77 $settings = [ 78 'attributesToIndex' => [ 79 79 'unordered(post_title)', 80 80 'unordered(taxonomies)', 81 81 'unordered(content)', 82 ),83 'customRanking' => array(82 ], 83 'customRanking' => [ 84 84 'desc(is_sticky)', 85 85 'desc(post_date)', 86 86 'asc(record_index)', 87 ),87 ], 88 88 'attributeForDistinct' => 'post_id', 89 89 'distinct' => true, 90 'attributesForFaceting' => array(90 'attributesForFaceting' => [ 91 91 'taxonomies', 92 92 'taxonomies_hierarchical', 93 93 'post_author.display_name', 94 94 'post_type_label', 95 ),96 'attributesToSnippet' => array(95 ], 96 'attributesToSnippet' => [ 97 97 'post_title:30', 98 98 'content:30', 99 ),99 ], 100 100 'snippetEllipsisText' => '…', 101 );101 ]; 102 102 103 103 $settings = (array) apply_filters('algolia_searchable_posts_index_settings', $settings); … … 111 111 protected function get_synonyms() 112 112 { 113 $synonyms = (array) apply_filters('algolia_searchable_posts_index_synonyms', array());113 $synonyms = (array) apply_filters('algolia_searchable_posts_index_synonyms', []); 114 114 115 115 return $synonyms; … … 151 151 protected function get_re_index_items_count() 152 152 { 153 $query = new WP_Query( 154 array( 155 'post_type' => $this->post_types, 156 'post_status' => 'any', // Let the `should_index` take care of the filtering. 157 'suppress_filters' => true, 158 'cache_results' => false, 159 'lazy_load_term_meta' => false, 160 'update_post_term_cache' => false, 161 ) 162 ); 153 $query = new WP_Query([ 154 'post_type' => $this->post_types, 155 'post_status' => 'any', // Let the `should_index` take care of the filtering. 156 'suppress_filters' => true, 157 'cache_results' => false, 158 'lazy_load_term_meta' => false, 159 'update_post_term_cache' => false, 160 ]); 163 161 164 162 return (int) $query->found_posts; … … 173 171 protected function get_items($page, $batch_size) 174 172 { 175 $query = new WP_Query( 176 array( 177 'post_type' => $this->post_types, 178 'posts_per_page' => $batch_size, 179 'post_status' => 'any', 180 'order' => 'ASC', 181 'orderby' => 'ID', 182 'paged' => $page, 183 'suppress_filters' => true, 184 'cache_results' => false, 185 'lazy_load_term_meta' => false, 186 'update_post_term_cache' => false, 187 ) 188 ); 173 $query = new WP_Query([ 174 'post_type' => $this->post_types, 175 'posts_per_page' => $batch_size, 176 'post_status' => 'any', 177 'order' => 'ASC', 178 'orderby' => 'ID', 179 'paged' => $page, 180 'suppress_filters' => true, 181 'cache_results' => false, 182 'lazy_load_term_meta' => false, 183 'update_post_term_cache' => false, 184 ]); 189 185 190 186 return $query->posts; -
wp-algolia/tags/3.0.1/vendor/autoload.php
r2100083 r2100698 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit ed94fe102ede5518d50e6b8e4a1bc19f::getLoader();7 return ComposerAutoloaderInit18009676d0bcc7296499ee1203467cc0::getLoader(); -
wp-algolia/tags/3.0.1/vendor/composer/autoload_real.php
r2100083 r2100698 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit ed94fe102ede5518d50e6b8e4a1bc19f5 class ComposerAutoloaderInit18009676d0bcc7296499ee1203467cc0 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit ed94fe102ede5518d50e6b8e4a1bc19f', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInit18009676d0bcc7296499ee1203467cc0', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit ed94fe102ede5518d50e6b8e4a1bc19f', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInit18009676d0bcc7296499ee1203467cc0', 'loadClassLoader')); 25 25 26 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 28 28 require_once __DIR__ . '/autoload_static.php'; 29 29 30 call_user_func(\Composer\Autoload\ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit18009676d0bcc7296499ee1203467cc0::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; … … 49 49 50 50 if ($useStaticLoader) { 51 $includeFiles = Composer\Autoload\ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f::$files;51 $includeFiles = Composer\Autoload\ComposerStaticInit18009676d0bcc7296499ee1203467cc0::$files; 52 52 } else { 53 53 $includeFiles = require __DIR__ . '/autoload_files.php'; 54 54 } 55 55 foreach ($includeFiles as $fileIdentifier => $file) { 56 composerRequire ed94fe102ede5518d50e6b8e4a1bc19f($fileIdentifier, $file);56 composerRequire18009676d0bcc7296499ee1203467cc0($fileIdentifier, $file); 57 57 } 58 58 … … 61 61 } 62 62 63 function composerRequire ed94fe102ede5518d50e6b8e4a1bc19f($fileIdentifier, $file)63 function composerRequire18009676d0bcc7296499ee1203467cc0($fileIdentifier, $file) 64 64 { 65 65 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
wp-algolia/tags/3.0.1/vendor/composer/autoload_static.php
r2100083 r2100698 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f7 class ComposerStaticInit18009676d0bcc7296499ee1203467cc0 8 8 { 9 9 public static $files = array ( … … 338 338 { 339 339 return \Closure::bind(function () use ($loader) { 340 $loader->prefixLengthsPsr4 = ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f::$prefixLengthsPsr4;341 $loader->prefixDirsPsr4 = ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f::$prefixDirsPsr4;342 $loader->classMap = ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f::$classMap;340 $loader->prefixLengthsPsr4 = ComposerStaticInit18009676d0bcc7296499ee1203467cc0::$prefixLengthsPsr4; 341 $loader->prefixDirsPsr4 = ComposerStaticInit18009676d0bcc7296499ee1203467cc0::$prefixDirsPsr4; 342 $loader->classMap = ComposerStaticInit18009676d0bcc7296499ee1203467cc0::$classMap; 343 343 344 344 }, null, ClassLoader::class); -
wp-algolia/tags/3.0.1/wp-algolia.php
r2100083 r2100698 5 5 Plugin URI: https://www.algolia.com/ 6 6 Description: WordPress plugin to use Algolia as a search engine. 7 Version: 3.0. 07 Version: 3.0.1 8 8 Author: Léo Colombaro 9 9 Author URI: https://colombaro.fr/ -
wp-algolia/trunk/src/indices/class-algolia-posts-index-abstract.php
r2100083 r2100698 95 95 $shared_attributes['post_id'] = $post->ID; 96 96 $shared_attributes['post_type'] = $post->post_type; 97 $shared_attributes['post_type_label'] = $this->get_post_label_attributes( );97 $shared_attributes['post_type_label'] = $this->get_post_label_attributes($post); 98 98 $shared_attributes['post_title'] = $post->post_title; 99 99 $shared_attributes['post_excerpt'] = apply_filters('the_excerpt', $post->post_excerpt); -
wp-algolia/trunk/src/indices/class-algolia-searchable-posts-index.php
r2100083 r2100698 75 75 protected function get_settings() 76 76 { 77 $settings = array(78 'attributesToIndex' => array(77 $settings = [ 78 'attributesToIndex' => [ 79 79 'unordered(post_title)', 80 80 'unordered(taxonomies)', 81 81 'unordered(content)', 82 ),83 'customRanking' => array(82 ], 83 'customRanking' => [ 84 84 'desc(is_sticky)', 85 85 'desc(post_date)', 86 86 'asc(record_index)', 87 ),87 ], 88 88 'attributeForDistinct' => 'post_id', 89 89 'distinct' => true, 90 'attributesForFaceting' => array(90 'attributesForFaceting' => [ 91 91 'taxonomies', 92 92 'taxonomies_hierarchical', 93 93 'post_author.display_name', 94 94 'post_type_label', 95 ),96 'attributesToSnippet' => array(95 ], 96 'attributesToSnippet' => [ 97 97 'post_title:30', 98 98 'content:30', 99 ),99 ], 100 100 'snippetEllipsisText' => '…', 101 );101 ]; 102 102 103 103 $settings = (array) apply_filters('algolia_searchable_posts_index_settings', $settings); … … 111 111 protected function get_synonyms() 112 112 { 113 $synonyms = (array) apply_filters('algolia_searchable_posts_index_synonyms', array());113 $synonyms = (array) apply_filters('algolia_searchable_posts_index_synonyms', []); 114 114 115 115 return $synonyms; … … 151 151 protected function get_re_index_items_count() 152 152 { 153 $query = new WP_Query( 154 array( 155 'post_type' => $this->post_types, 156 'post_status' => 'any', // Let the `should_index` take care of the filtering. 157 'suppress_filters' => true, 158 'cache_results' => false, 159 'lazy_load_term_meta' => false, 160 'update_post_term_cache' => false, 161 ) 162 ); 153 $query = new WP_Query([ 154 'post_type' => $this->post_types, 155 'post_status' => 'any', // Let the `should_index` take care of the filtering. 156 'suppress_filters' => true, 157 'cache_results' => false, 158 'lazy_load_term_meta' => false, 159 'update_post_term_cache' => false, 160 ]); 163 161 164 162 return (int) $query->found_posts; … … 173 171 protected function get_items($page, $batch_size) 174 172 { 175 $query = new WP_Query( 176 array( 177 'post_type' => $this->post_types, 178 'posts_per_page' => $batch_size, 179 'post_status' => 'any', 180 'order' => 'ASC', 181 'orderby' => 'ID', 182 'paged' => $page, 183 'suppress_filters' => true, 184 'cache_results' => false, 185 'lazy_load_term_meta' => false, 186 'update_post_term_cache' => false, 187 ) 188 ); 173 $query = new WP_Query([ 174 'post_type' => $this->post_types, 175 'posts_per_page' => $batch_size, 176 'post_status' => 'any', 177 'order' => 'ASC', 178 'orderby' => 'ID', 179 'paged' => $page, 180 'suppress_filters' => true, 181 'cache_results' => false, 182 'lazy_load_term_meta' => false, 183 'update_post_term_cache' => false, 184 ]); 189 185 190 186 return $query->posts; -
wp-algolia/trunk/vendor/autoload.php
r2100083 r2100698 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit ed94fe102ede5518d50e6b8e4a1bc19f::getLoader();7 return ComposerAutoloaderInit18009676d0bcc7296499ee1203467cc0::getLoader(); -
wp-algolia/trunk/vendor/composer/autoload_real.php
r2100083 r2100698 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit ed94fe102ede5518d50e6b8e4a1bc19f5 class ComposerAutoloaderInit18009676d0bcc7296499ee1203467cc0 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit ed94fe102ede5518d50e6b8e4a1bc19f', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInit18009676d0bcc7296499ee1203467cc0', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit ed94fe102ede5518d50e6b8e4a1bc19f', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInit18009676d0bcc7296499ee1203467cc0', 'loadClassLoader')); 25 25 26 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 28 28 require_once __DIR__ . '/autoload_static.php'; 29 29 30 call_user_func(\Composer\Autoload\ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit18009676d0bcc7296499ee1203467cc0::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; … … 49 49 50 50 if ($useStaticLoader) { 51 $includeFiles = Composer\Autoload\ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f::$files;51 $includeFiles = Composer\Autoload\ComposerStaticInit18009676d0bcc7296499ee1203467cc0::$files; 52 52 } else { 53 53 $includeFiles = require __DIR__ . '/autoload_files.php'; 54 54 } 55 55 foreach ($includeFiles as $fileIdentifier => $file) { 56 composerRequire ed94fe102ede5518d50e6b8e4a1bc19f($fileIdentifier, $file);56 composerRequire18009676d0bcc7296499ee1203467cc0($fileIdentifier, $file); 57 57 } 58 58 … … 61 61 } 62 62 63 function composerRequire ed94fe102ede5518d50e6b8e4a1bc19f($fileIdentifier, $file)63 function composerRequire18009676d0bcc7296499ee1203467cc0($fileIdentifier, $file) 64 64 { 65 65 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
wp-algolia/trunk/vendor/composer/autoload_static.php
r2100083 r2100698 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f7 class ComposerStaticInit18009676d0bcc7296499ee1203467cc0 8 8 { 9 9 public static $files = array ( … … 338 338 { 339 339 return \Closure::bind(function () use ($loader) { 340 $loader->prefixLengthsPsr4 = ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f::$prefixLengthsPsr4;341 $loader->prefixDirsPsr4 = ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f::$prefixDirsPsr4;342 $loader->classMap = ComposerStaticInit ed94fe102ede5518d50e6b8e4a1bc19f::$classMap;340 $loader->prefixLengthsPsr4 = ComposerStaticInit18009676d0bcc7296499ee1203467cc0::$prefixLengthsPsr4; 341 $loader->prefixDirsPsr4 = ComposerStaticInit18009676d0bcc7296499ee1203467cc0::$prefixDirsPsr4; 342 $loader->classMap = ComposerStaticInit18009676d0bcc7296499ee1203467cc0::$classMap; 343 343 344 344 }, null, ClassLoader::class); -
wp-algolia/trunk/wp-algolia.php
r2100083 r2100698 5 5 Plugin URI: https://www.algolia.com/ 6 6 Description: WordPress plugin to use Algolia as a search engine. 7 Version: 3.0. 07 Version: 3.0.1 8 8 Author: Léo Colombaro 9 9 Author URI: https://colombaro.fr/
Note: See TracChangeset
for help on using the changeset viewer.