Changeset 2101126
- Timestamp:
- 06/05/2019 03:17:37 PM (7 years ago)
- Location:
- wp-algolia
- Files:
-
- 34 edited
- 1 copied
-
tags/3.0.2 (copied) (copied from wp-algolia/trunk)
-
tags/3.0.2/src/class-algolia-admin.php (modified) (1 diff)
-
tags/3.0.2/src/class-algolia-api.php (modified) (2 diffs)
-
tags/3.0.2/src/class-algolia-utils.php (modified) (9 diffs)
-
tags/3.0.2/src/indices/class-algolia-index-replica.php (modified) (1 diff)
-
tags/3.0.2/src/indices/class-algolia-index.php (modified) (7 diffs)
-
tags/3.0.2/src/indices/class-algolia-posts-index-abstract.php (modified) (5 diffs)
-
tags/3.0.2/src/indices/class-algolia-posts-index.php (modified) (5 diffs)
-
tags/3.0.2/src/indices/class-algolia-searchable-posts-index.php (modified) (1 diff)
-
tags/3.0.2/src/indices/class-algolia-terms-index.php (modified) (7 diffs)
-
tags/3.0.2/src/indices/class-algolia-users-index.php (modified) (7 diffs)
-
tags/3.0.2/src/watchers/class-algolia-post-changes-watcher.php (modified) (2 diffs)
-
tags/3.0.2/src/watchers/class-algolia-term-changes-watcher.php (modified) (1 diff)
-
tags/3.0.2/src/watchers/class-algolia-user-changes-watcher.php (modified) (1 diff)
-
tags/3.0.2/vendor/autoload.php (modified) (1 diff)
-
tags/3.0.2/vendor/composer/autoload_real.php (modified) (5 diffs)
-
tags/3.0.2/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/3.0.2/wp-algolia.php (modified) (1 diff)
-
trunk/src/class-algolia-admin.php (modified) (1 diff)
-
trunk/src/class-algolia-api.php (modified) (2 diffs)
-
trunk/src/class-algolia-utils.php (modified) (9 diffs)
-
trunk/src/indices/class-algolia-index-replica.php (modified) (1 diff)
-
trunk/src/indices/class-algolia-index.php (modified) (7 diffs)
-
trunk/src/indices/class-algolia-posts-index-abstract.php (modified) (5 diffs)
-
trunk/src/indices/class-algolia-posts-index.php (modified) (5 diffs)
-
trunk/src/indices/class-algolia-searchable-posts-index.php (modified) (1 diff)
-
trunk/src/indices/class-algolia-terms-index.php (modified) (7 diffs)
-
trunk/src/indices/class-algolia-users-index.php (modified) (7 diffs)
-
trunk/src/watchers/class-algolia-post-changes-watcher.php (modified) (2 diffs)
-
trunk/src/watchers/class-algolia-term-changes-watcher.php (modified) (1 diff)
-
trunk/src/watchers/class-algolia-user-changes-watcher.php (modified) (1 diff)
-
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.2/src/class-algolia-admin.php
r2100083 r2101126 129 129 ob_end_clean(); 130 130 131 $response = array(131 $response = [ 132 132 'totalPagesCount' => $total_pages, 133 133 'finished' => $page >= $total_pages, 134 );134 ]; 135 135 136 136 wp_send_json($response); -
wp-algolia/tags/3.0.2/src/class-algolia-api.php
r2100083 r2101126 94 94 $key = $client->getApiKey((string) $api_key); 95 95 96 $required_acls = array(96 $required_acls = [ 97 97 'addObject', 98 98 'deleteObject', … … 101 101 'settings', 102 102 'editSettings', 103 );103 ]; 104 104 105 $missing_acls = array();105 $missing_acls = []; 106 106 foreach ($required_acls as $required_acl) { 107 107 if (! in_array($required_acl, $key['acl'])) { -
wp-algolia/tags/3.0.2/src/class-algolia-utils.php
r2100083 r2101126 40 40 /** 41 41 * Returns an array like: 42 * array(42 * [ 43 43 * 'lvl0' => ['Sales', 'Marketing'], 44 44 * 'lvl1' => ['Sales > Strategies', 'Marketing > Tips & Tricks'] 45 45 * ... 46 * );.46 * ] 47 47 * 48 48 * This is useful when building hierarchical menus. … … 60 60 $term_ids = wp_list_pluck($terms, 'term_id'); 61 61 62 $parents = array();62 $parents = []; 63 63 foreach ($term_ids as $term_id) { 64 64 $path = self::get_term_parents($term_id, $taxonomy, $separator); … … 66 66 } 67 67 68 $terms = array();68 $terms = []; 69 69 foreach ($parents as $parent) { 70 70 $levels = explode($separator, $parent); … … 91 91 public static function get_post_images($post_id) 92 92 { 93 $images = array();93 $images = []; 94 94 95 95 if (get_post_type($post_id) === 'attachment') { … … 100 100 101 101 if ($post_thumbnail_id) { 102 $sizes = (array) apply_filters('algolia_post_images_sizes', array( 'thumbnail' ));102 $sizes = (array) apply_filters('algolia_post_images_sizes', ['thumbnail']); 103 103 foreach ($sizes as $size) { 104 104 $info = wp_get_attachment_image_src($post_thumbnail_id, $size); … … 107 107 } 108 108 109 $images[ $size ] = array(109 $images[$size] = [ 110 110 'url' => $info[0], 111 111 'width' => $info[1], 112 112 'height' => $info[2], 113 );113 ]; 114 114 } 115 115 } … … 127 127 public static function remove_content_noise($content) 128 128 { 129 $noise_patterns = array(129 $noise_patterns = [ 130 130 // strip out comments. 131 131 "'<!--(.*?)-->'is", … … 145 145 "'<\s*pre[^>]*[^/]>(.*?)<\s*/\s*pre\s*>'is", 146 146 "'<\s*pre\s*>(.*?)<\s*/\s*pre\s*>'is", 147 );147 ]; 148 148 149 149 // If there is ET builder (Divi), remove shortcodes. … … 173 173 } 174 174 175 $parts = array();175 $parts = []; 176 176 $prefix = ''; 177 177 while (true) { -
wp-algolia/tags/3.0.2/src/indices/class-algolia-index-replica.php
r2100083 r2101126 47 47 public function get_ranking() 48 48 { 49 return array( $this->order . '(' . $this->attribute_name . ')', 'typo', 'geo', 'words', 'filters', 'proximity', 'attribute', 'exact', 'custom' ); 49 return [ 50 "{$this->order}({$this->attribute_name})", 51 'typo', 52 'geo', 53 'words', 54 'filters', 55 'proximity', 56 'attribute', 57 'exact', 58 'custom' 59 ]; 50 60 } 51 61 -
wp-algolia/tags/3.0.2/src/indices/class-algolia-index.php
r2100083 r2101126 262 262 $items = $this->get_items($page, $batch_size); 263 263 264 $records = array();264 $records = []; 265 265 foreach ($items as $item) { 266 266 if (! $this->should_index($item)) { … … 421 421 public function get_default_autocomplete_config() 422 422 { 423 return array(423 return [ 424 424 'index_id' => $this->get_id(), 425 425 'index_name' => $this->get_name(), … … 429 429 'max_suggestions' => 5, 430 430 'tmpl_suggestion' => 'autocomplete-post-suggestion', 431 );431 ]; 432 432 } 433 433 … … 439 439 $replicas = $this->get_replicas(); 440 440 441 $items = array();441 $items = []; 442 442 foreach ($replicas as $replica) { 443 $items[] = array(443 $items[] = [ 444 444 'name' => $replica->get_replica_index_name($this), 445 );446 } 447 448 return array(445 ]; 446 } 447 448 return [ 449 449 'name' => $this->get_name(), 450 450 'id' => $this->get_id(), 451 451 'enabled' => $this->enabled, 452 452 'replicas' => $items, 453 );453 ]; 454 454 } 455 455 … … 459 459 public function get_replicas() 460 460 { 461 $replicas = (array) apply_filters('algolia_index_replicas', array(), $this);461 $replicas = (array) apply_filters('algolia_index_replicas', [], $this); 462 462 $replicas = (array) apply_filters('algolia_' . $this->get_id() . '_index_replicas', $replicas, $this); 463 463 464 $filtered = array();464 $filtered = []; 465 465 // Filter out invalid inputs. 466 466 foreach ($replicas as $replica) { … … 482 482 } 483 483 484 $replica_index_names = array();484 $replica_index_names = []; 485 485 foreach ($replicas as $replica) { 486 486 /** @var Algolia_Index_Replica $replica */ … … 489 489 490 490 $this->get_index()->setSettings( 491 array(491 [ 492 492 'replicas' => $replica_index_names, 493 ),493 ], 494 494 false 495 495 ); -
wp-algolia/tags/3.0.2/src/indices/class-algolia-posts-index-abstract.php
r2100698 r2101126 67 67 68 68 if (defined('ALGOLIA_SPLIT_POSTS') && false === ALGOLIA_SPLIT_POSTS) { 69 $parts = array( array_shift($parts) );70 } 71 72 $records = array();69 $parts = [array_shift($parts)]; 70 } 71 72 $records = []; 73 73 foreach ($parts as $i => $part) { 74 74 $record = $shared_attributes; … … 106 106 $author = get_userdata($post->post_author); 107 107 if ($author) { 108 $shared_attributes['post_author'] = array(108 $shared_attributes['post_author'] = [ 109 109 'user_id' => (int) $post->post_author, 110 110 'display_name' => $author->display_name, 111 111 'user_url' => $author->user_url, 112 112 'user_login' => $author->user_login, 113 );113 ]; 114 114 } 115 115 … … 122 122 $taxonomy_objects = get_object_taxonomies($post->post_type, 'objects'); 123 123 124 $shared_attributes['taxonomies'] = array();125 $shared_attributes['taxonomies_hierarchical'] = array();124 $shared_attributes['taxonomies'] = []; 125 $shared_attributes['taxonomies_hierarchical'] = []; 126 126 foreach ($taxonomy_objects as $taxonomy) { 127 127 $terms = wp_get_object_terms($post->ID, $taxonomy->name); 128 $terms = is_array($terms) ? $terms : array();128 $terms = is_array($terms) ? $terms : []; 129 129 130 130 if ($taxonomy->hierarchical) { … … 189 189 * @param array $records 190 190 */ 191 abstract protected function update_post_records(WP_Post $post, array $records); 191 protected function update_post_records(WP_Post $post, array $records) 192 { 193 // If there are no records, parent `update_records` will take care of the deletion. 194 // In case of posts, we ALWAYS need to delete existing records. 195 if (! empty($records)) { 196 $this->delete_item($post); 197 } 198 199 parent::update_records($post, $records); 200 201 // Keep track of the new record count for future updates relying on the objectID's naming convention . 202 $new_records_count = count($records); 203 $this->set_post_records_count($post, $new_records_count); 204 } 192 205 193 206 /** … … 199 212 200 213 $records_count = $this->get_post_records_count($item->ID); 201 $object_ids = array();214 $object_ids = []; 202 215 for ($i = 0; $i < $records_count; $i++) { 203 216 $object_ids[] = $this->get_post_object_id($item->ID, $i); -
wp-algolia/tags/3.0.2/src/indices/class-algolia-posts-index.php
r2100083 r2101126 79 79 protected function get_settings() 80 80 { 81 $settings = array(82 'attributesToIndex' => array(81 $settings = [ 82 'attributesToIndex' => [ 83 83 'unordered(post_title)', 84 84 'unordered(taxonomies)', 85 85 'unordered(content)', 86 ),87 'customRanking' => array(86 ], 87 'customRanking' => [ 88 88 'desc(is_sticky)', 89 89 'desc(post_date)', 90 90 'asc(record_index)', 91 ),91 ], 92 92 'attributeForDistinct' => 'post_id', 93 93 'distinct' => true, 94 'attributesForFaceting' => array(94 'attributesForFaceting' => [ 95 95 'taxonomies', 96 96 'taxonomies_hierarchical', 97 97 'post_author.display_name', 98 ),99 'attributesToSnippet' => array(98 ], 99 'attributesToSnippet' => [ 100 100 'post_title:30', 101 101 'content:30', 102 ),102 ], 103 103 'snippetEllipsisText' => '…', 104 );104 ]; 105 105 106 106 $settings = (array) apply_filters('algolia_posts_index_settings', $settings, $this->post_type); … … 115 115 protected function get_synonyms() 116 116 { 117 $synonyms = (array) apply_filters('algolia_posts_index_synonyms', array(), $this->post_type);117 $synonyms = (array) apply_filters('algolia_posts_index_synonyms', [], $this->post_type); 118 118 $synonyms = (array) apply_filters('algolia_posts_' . $this->post_type . '_index_synonyms', $synonyms); 119 119 … … 127 127 protected function update_post_records(WP_Post $post, array $records) 128 128 { 129 // If there are no records, parent `update_records` will take care of the deletion. 130 // In case of posts, we ALWAYS need to delete existing records. 131 if (! empty($records)) { 132 $this->delete_item($post); 133 } 134 135 parent::update_records($post, $records); 136 137 // Keep track of the new record count for future updates relying on the objectID's naming convention . 138 $new_records_count = count($records); 139 $this->set_post_records_count($post, $new_records_count); 129 parent::update_post_records($post, $records); 140 130 141 131 do_action('algolia_posts_index_post_updated', $post, $records); … … 156 146 protected function get_re_index_items_count() 157 147 { 158 $query = new WP_Query( 159 array( 160 'post_type' => $this->post_type, 161 'post_status' => 'any', // Let the `should_index` take care of the filtering. 162 'suppress_filters' => true, 163 ) 164 ); 148 $query = new WP_Query([ 149 'post_type' => $this->post_type, 150 'post_status' => 'any', // Let the `should_index` take care of the filtering. 151 'suppress_filters' => true, 152 ]); 165 153 166 154 return (int) $query->found_posts; … … 175 163 protected function get_items($page, $batch_size) 176 164 { 177 $query = new WP_Query( 178 array( 179 'post_type' => $this->post_type, 180 'posts_per_page' => $batch_size, 181 'post_status' => 'any', 182 'order' => 'ASC', 183 'orderby' => 'ID', 184 'paged' => $page, 185 'suppress_filters' => true, 186 ) 187 ); 165 $query = new WP_Query([ 166 'post_type' => $this->post_type, 167 'posts_per_page' => $batch_size, 168 'post_status' => 'any', 169 'order' => 'ASC', 170 'orderby' => 'ID', 171 'paged' => $page, 172 'suppress_filters' => true, 173 ]); 188 174 189 175 return $query->posts; -
wp-algolia/tags/3.0.2/src/indices/class-algolia-searchable-posts-index.php
r2100698 r2101126 122 122 protected function update_post_records(WP_Post $post, array $records) 123 123 { 124 // If there are no records, parent `update_records` will take care of the deletion. 125 // In case of posts, we ALWAYS need to delete existing records. 126 if (! empty($records)) { 127 $this->delete_item($post); 128 } 129 130 parent::update_records($post, $records); 131 132 // Keep track of the new record count for future updates relying on the objectID's naming convention . 133 $new_records_count = count($records); 134 $this->set_post_records_count($post, $new_records_count); 124 parent::update_post_records($post, $records); 135 125 136 126 do_action('algolia_searchable_posts_index_post_updated', $post, $records); -
wp-algolia/tags/3.0.2/src/indices/class-algolia-terms-index.php
r2100083 r2101126 54 54 protected function get_records($item) 55 55 { 56 $record = array();56 $record = []; 57 57 $record['objectID'] = $item->term_id; 58 58 $record['term_id'] = $item->term_id; … … 71 71 $record = (array) apply_filters('algolia_term_' . $item->taxonomy . '_record', $record, $item); 72 72 73 return array( $record );73 return [$record]; 74 74 } 75 75 … … 87 87 protected function get_settings() 88 88 { 89 $settings = array(90 'attributesToIndex' => array(89 $settings = [ 90 'attributesToIndex' => [ 91 91 'unordered(name)', 92 92 'unordered(description)', 93 ),94 'customRanking' => array(93 ], 94 'customRanking' => [ 95 95 'desc(posts_count)', 96 ),97 );96 ], 97 ]; 98 98 99 99 $settings = (array) apply_filters('algolia_terms_index_settings', $settings, $this->taxonomy); … … 108 108 protected function get_synonyms() 109 109 { 110 return (array) apply_filters('algolia_terms_index_synonyms', array());110 return (array) apply_filters('algolia_terms_index_synonyms', []); 111 111 } 112 112 … … 130 130 $offset = $batch_size * ( $page - 1 ); 131 131 132 $args = array(132 $args = [ 133 133 'order' => 'ASC', 134 134 'orderby' => 'id', … … 136 136 'number' => $batch_size, 137 137 'hide_empty' => false, // Let users choose what to index. 138 );138 ]; 139 139 140 140 // We use prior to 4.5 syntax for BC purposes. … … 162 162 public function get_default_autocomplete_config() 163 163 { 164 $config = array(164 $config = [ 165 165 'position' => 20, 166 166 'max_suggestions' => 3, 167 167 'tmpl_suggestion' => 'autocomplete-term-suggestion', 168 );168 ]; 169 169 170 170 return array_merge(parent::get_default_autocomplete_config(), $config); -
wp-algolia/tags/3.0.2/src/indices/class-algolia-users-index.php
r2100083 r2101126 40 40 protected function get_records($item) 41 41 { 42 $record = array();42 $record = []; 43 43 $record['objectID'] = $item->ID; 44 44 $record['user_id'] = $item->ID; … … 57 57 $record['avatar_url'] = get_avatar_url( 58 58 $item->ID, 59 array(59 [ 60 60 'size' => $avatar_size, 61 )61 ] 62 62 ); 63 63 } else { … … 68 68 $record = (array) apply_filters('algolia_user_record', $record, $item); 69 69 70 return array( $record );70 return [$record]; 71 71 } 72 72 … … 86 86 protected function get_settings() 87 87 { 88 $settings = array(89 'attributesToIndex' => array(88 $settings = [ 89 'attributesToIndex' => [ 90 90 'unordered(display_name)', 91 ),92 'customRanking' => array(91 ], 92 'customRanking' => [ 93 93 'desc(posts_count)', 94 ),95 );94 ], 95 ]; 96 96 97 97 return (array) apply_filters('algolia_users_index_settings', $settings); … … 103 103 protected function get_synonyms() 104 104 { 105 return (array) apply_filters('algolia_users_index_synonyms', array());105 return (array) apply_filters('algolia_users_index_synonyms', []); 106 106 } 107 107 … … 125 125 $offset = $batch_size * ( $page - 1 ); 126 126 127 $args = array(127 $args = [ 128 128 'order' => 'ASC', 129 129 'orderby' => 'ID', 130 130 'offset' => $offset, 131 131 'number' => $batch_size, 132 );132 ]; 133 133 134 134 // We use prior to 4.5 syntax for BC purposes, no `paged` arg. … … 153 153 public function get_default_autocomplete_config() 154 154 { 155 $config = array(155 $config = [ 156 156 'position' => 30, 157 157 'max_suggestions' => 3, 158 158 'tmpl_suggestion' => 'autocomplete-user-suggestion', 159 );159 ]; 160 160 161 161 return array_merge(parent::get_default_autocomplete_config(), $config); -
wp-algolia/tags/3.0.2/src/watchers/class-algolia-post-changes-watcher.php
r2100083 r2101126 22 22 { 23 23 // Fires once a post has been saved. 24 add_action('save_post', array( $this, 'sync_item' ));24 add_action('save_post', [$this, 'sync_item']); 25 25 26 26 // Fires before a post is deleted, at the start of wp_delete_post(). 27 27 // At this stage the post metas are still available, and we need them. 28 add_action('before_delete_post', array( $this, 'delete_item' ));28 add_action('before_delete_post', [$this, 'delete_item']); 29 29 30 30 // Handle meta changes after the change occurred. 31 add_action('added_post_meta', array( $this, 'on_meta_change' ), 10, 4);32 add_action('updated_post_meta', array( $this, 'on_meta_change' ), 10, 4);33 add_action('deleted_post_meta', array( $this, 'on_meta_change' ), 10, 4);31 add_action('added_post_meta', [$this, 'on_meta_change'], 10, 4); 32 add_action('updated_post_meta', [$this, 'on_meta_change'], 10, 4); 33 add_action('deleted_post_meta', [$this, 'on_meta_change'], 10, 4); 34 34 35 35 // Handle attachment changes. These are required because the other post hooks are not triggered. 36 add_action('add_attachment', array( $this, 'sync_item' ));37 add_action('attachment_updated', array( $this, 'sync_item' ));38 add_action('delete_attachment', array( $this, 'delete_item' ));36 add_action('add_attachment', [$this, 'sync_item']); 37 add_action('attachment_updated', [$this, 'sync_item']); 38 add_action('delete_attachment', [$this, 'delete_item']); 39 39 } 40 40 … … 84 84 public function on_meta_change($meta_id, $object_id, $meta_key) 85 85 { 86 $keys = array( '_thumbnail_id' );86 $keys = ['_thumbnail_id']; 87 87 $keys = (array) apply_filters('algolia_watch_post_meta_keys', $keys, $object_id); 88 88 -
wp-algolia/tags/3.0.2/src/watchers/class-algolia-term-changes-watcher.php
r2100083 r2101126 22 22 { 23 23 // Fires immediately after the given terms are edited. 24 add_action('edited_term', array( $this, 'sync_item' ));24 add_action('edited_term', [$this, 'sync_item']); 25 25 26 26 // Fires after an object's terms have been set. 27 add_action('set_object_terms', array( $this, 'handle_changes' ), 10, 6);27 add_action('set_object_terms', [$this, 'handle_changes'], 10, 6); 28 28 29 29 // Fires after a term is deleted from the database and the cache is cleaned. 30 add_action('delete_term', array( $this, 'on_delete_term' ), 10, 4);30 add_action('delete_term', [$this, 'on_delete_term'], 10, 4); 31 31 } 32 32 -
wp-algolia/tags/3.0.2/src/watchers/class-algolia-user-changes-watcher.php
r2100083 r2101126 22 22 { 23 23 // Fires immediately after an existing user is updated. 24 add_action('profile_update', array( $this, 'sync_item' ));24 add_action('profile_update', [$this, 'sync_item']); 25 25 26 26 // Fires immediately after a new user is registered. 27 add_action('user_register', array( $this, 'sync_item' ));27 add_action('user_register', [$this, 'sync_item']); 28 28 29 29 // Fires immediately before a user is deleted. 30 add_action('delete_user', array( $this, 'delete_item' ));30 add_action('delete_user', [$this, 'delete_item']); 31 31 32 32 // Fires once a post has been saved. 33 add_action('save_post', array( $this, 'on_save_post' ), 10, 2);33 add_action('save_post', [$this, 'on_save_post'], 10, 2); 34 34 35 35 // Fires before a post is deleted, at the start of wp_delete_post(). 36 36 // At this stage the post metas are still available, and we need them. 37 add_action('before_delete_post', array( $this, 'on_delete_post' ));37 add_action('before_delete_post', [$this, 'on_delete_post']); 38 38 } 39 39 -
wp-algolia/tags/3.0.2/vendor/autoload.php
r2100698 r2101126 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 18009676d0bcc7296499ee1203467cc0::getLoader();7 return ComposerAutoloaderInitc49d78d344667cc430651fb080c0d596::getLoader(); -
wp-algolia/tags/3.0.2/vendor/composer/autoload_real.php
r2100698 r2101126 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 18009676d0bcc7296499ee1203467cc05 class ComposerAutoloaderInitc49d78d344667cc430651fb080c0d596 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit 18009676d0bcc7296499ee1203467cc0', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInitc49d78d344667cc430651fb080c0d596', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit 18009676d0bcc7296499ee1203467cc0', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInitc49d78d344667cc430651fb080c0d596', '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 18009676d0bcc7296499ee1203467cc0::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInitc49d78d344667cc430651fb080c0d596::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; … … 49 49 50 50 if ($useStaticLoader) { 51 $includeFiles = Composer\Autoload\ComposerStaticInit 18009676d0bcc7296499ee1203467cc0::$files;51 $includeFiles = Composer\Autoload\ComposerStaticInitc49d78d344667cc430651fb080c0d596::$files; 52 52 } else { 53 53 $includeFiles = require __DIR__ . '/autoload_files.php'; 54 54 } 55 55 foreach ($includeFiles as $fileIdentifier => $file) { 56 composerRequire 18009676d0bcc7296499ee1203467cc0($fileIdentifier, $file);56 composerRequirec49d78d344667cc430651fb080c0d596($fileIdentifier, $file); 57 57 } 58 58 … … 61 61 } 62 62 63 function composerRequire 18009676d0bcc7296499ee1203467cc0($fileIdentifier, $file)63 function composerRequirec49d78d344667cc430651fb080c0d596($fileIdentifier, $file) 64 64 { 65 65 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
wp-algolia/tags/3.0.2/vendor/composer/autoload_static.php
r2100698 r2101126 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 18009676d0bcc7296499ee1203467cc07 class ComposerStaticInitc49d78d344667cc430651fb080c0d596 8 8 { 9 9 public static $files = array ( … … 338 338 { 339 339 return \Closure::bind(function () use ($loader) { 340 $loader->prefixLengthsPsr4 = ComposerStaticInit 18009676d0bcc7296499ee1203467cc0::$prefixLengthsPsr4;341 $loader->prefixDirsPsr4 = ComposerStaticInit 18009676d0bcc7296499ee1203467cc0::$prefixDirsPsr4;342 $loader->classMap = ComposerStaticInit 18009676d0bcc7296499ee1203467cc0::$classMap;340 $loader->prefixLengthsPsr4 = ComposerStaticInitc49d78d344667cc430651fb080c0d596::$prefixLengthsPsr4; 341 $loader->prefixDirsPsr4 = ComposerStaticInitc49d78d344667cc430651fb080c0d596::$prefixDirsPsr4; 342 $loader->classMap = ComposerStaticInitc49d78d344667cc430651fb080c0d596::$classMap; 343 343 344 344 }, null, ClassLoader::class); -
wp-algolia/tags/3.0.2/wp-algolia.php
r2100698 r2101126 5 5 Plugin URI: https://www.algolia.com/ 6 6 Description: WordPress plugin to use Algolia as a search engine. 7 Version: 3.0. 17 Version: 3.0.2 8 8 Author: Léo Colombaro 9 9 Author URI: https://colombaro.fr/ -
wp-algolia/trunk/src/class-algolia-admin.php
r2100083 r2101126 129 129 ob_end_clean(); 130 130 131 $response = array(131 $response = [ 132 132 'totalPagesCount' => $total_pages, 133 133 'finished' => $page >= $total_pages, 134 );134 ]; 135 135 136 136 wp_send_json($response); -
wp-algolia/trunk/src/class-algolia-api.php
r2100083 r2101126 94 94 $key = $client->getApiKey((string) $api_key); 95 95 96 $required_acls = array(96 $required_acls = [ 97 97 'addObject', 98 98 'deleteObject', … … 101 101 'settings', 102 102 'editSettings', 103 );103 ]; 104 104 105 $missing_acls = array();105 $missing_acls = []; 106 106 foreach ($required_acls as $required_acl) { 107 107 if (! in_array($required_acl, $key['acl'])) { -
wp-algolia/trunk/src/class-algolia-utils.php
r2100083 r2101126 40 40 /** 41 41 * Returns an array like: 42 * array(42 * [ 43 43 * 'lvl0' => ['Sales', 'Marketing'], 44 44 * 'lvl1' => ['Sales > Strategies', 'Marketing > Tips & Tricks'] 45 45 * ... 46 * );.46 * ] 47 47 * 48 48 * This is useful when building hierarchical menus. … … 60 60 $term_ids = wp_list_pluck($terms, 'term_id'); 61 61 62 $parents = array();62 $parents = []; 63 63 foreach ($term_ids as $term_id) { 64 64 $path = self::get_term_parents($term_id, $taxonomy, $separator); … … 66 66 } 67 67 68 $terms = array();68 $terms = []; 69 69 foreach ($parents as $parent) { 70 70 $levels = explode($separator, $parent); … … 91 91 public static function get_post_images($post_id) 92 92 { 93 $images = array();93 $images = []; 94 94 95 95 if (get_post_type($post_id) === 'attachment') { … … 100 100 101 101 if ($post_thumbnail_id) { 102 $sizes = (array) apply_filters('algolia_post_images_sizes', array( 'thumbnail' ));102 $sizes = (array) apply_filters('algolia_post_images_sizes', ['thumbnail']); 103 103 foreach ($sizes as $size) { 104 104 $info = wp_get_attachment_image_src($post_thumbnail_id, $size); … … 107 107 } 108 108 109 $images[ $size ] = array(109 $images[$size] = [ 110 110 'url' => $info[0], 111 111 'width' => $info[1], 112 112 'height' => $info[2], 113 );113 ]; 114 114 } 115 115 } … … 127 127 public static function remove_content_noise($content) 128 128 { 129 $noise_patterns = array(129 $noise_patterns = [ 130 130 // strip out comments. 131 131 "'<!--(.*?)-->'is", … … 145 145 "'<\s*pre[^>]*[^/]>(.*?)<\s*/\s*pre\s*>'is", 146 146 "'<\s*pre\s*>(.*?)<\s*/\s*pre\s*>'is", 147 );147 ]; 148 148 149 149 // If there is ET builder (Divi), remove shortcodes. … … 173 173 } 174 174 175 $parts = array();175 $parts = []; 176 176 $prefix = ''; 177 177 while (true) { -
wp-algolia/trunk/src/indices/class-algolia-index-replica.php
r2100083 r2101126 47 47 public function get_ranking() 48 48 { 49 return array( $this->order . '(' . $this->attribute_name . ')', 'typo', 'geo', 'words', 'filters', 'proximity', 'attribute', 'exact', 'custom' ); 49 return [ 50 "{$this->order}({$this->attribute_name})", 51 'typo', 52 'geo', 53 'words', 54 'filters', 55 'proximity', 56 'attribute', 57 'exact', 58 'custom' 59 ]; 50 60 } 51 61 -
wp-algolia/trunk/src/indices/class-algolia-index.php
r2100083 r2101126 262 262 $items = $this->get_items($page, $batch_size); 263 263 264 $records = array();264 $records = []; 265 265 foreach ($items as $item) { 266 266 if (! $this->should_index($item)) { … … 421 421 public function get_default_autocomplete_config() 422 422 { 423 return array(423 return [ 424 424 'index_id' => $this->get_id(), 425 425 'index_name' => $this->get_name(), … … 429 429 'max_suggestions' => 5, 430 430 'tmpl_suggestion' => 'autocomplete-post-suggestion', 431 );431 ]; 432 432 } 433 433 … … 439 439 $replicas = $this->get_replicas(); 440 440 441 $items = array();441 $items = []; 442 442 foreach ($replicas as $replica) { 443 $items[] = array(443 $items[] = [ 444 444 'name' => $replica->get_replica_index_name($this), 445 );446 } 447 448 return array(445 ]; 446 } 447 448 return [ 449 449 'name' => $this->get_name(), 450 450 'id' => $this->get_id(), 451 451 'enabled' => $this->enabled, 452 452 'replicas' => $items, 453 );453 ]; 454 454 } 455 455 … … 459 459 public function get_replicas() 460 460 { 461 $replicas = (array) apply_filters('algolia_index_replicas', array(), $this);461 $replicas = (array) apply_filters('algolia_index_replicas', [], $this); 462 462 $replicas = (array) apply_filters('algolia_' . $this->get_id() . '_index_replicas', $replicas, $this); 463 463 464 $filtered = array();464 $filtered = []; 465 465 // Filter out invalid inputs. 466 466 foreach ($replicas as $replica) { … … 482 482 } 483 483 484 $replica_index_names = array();484 $replica_index_names = []; 485 485 foreach ($replicas as $replica) { 486 486 /** @var Algolia_Index_Replica $replica */ … … 489 489 490 490 $this->get_index()->setSettings( 491 array(491 [ 492 492 'replicas' => $replica_index_names, 493 ),493 ], 494 494 false 495 495 ); -
wp-algolia/trunk/src/indices/class-algolia-posts-index-abstract.php
r2100698 r2101126 67 67 68 68 if (defined('ALGOLIA_SPLIT_POSTS') && false === ALGOLIA_SPLIT_POSTS) { 69 $parts = array( array_shift($parts) );70 } 71 72 $records = array();69 $parts = [array_shift($parts)]; 70 } 71 72 $records = []; 73 73 foreach ($parts as $i => $part) { 74 74 $record = $shared_attributes; … … 106 106 $author = get_userdata($post->post_author); 107 107 if ($author) { 108 $shared_attributes['post_author'] = array(108 $shared_attributes['post_author'] = [ 109 109 'user_id' => (int) $post->post_author, 110 110 'display_name' => $author->display_name, 111 111 'user_url' => $author->user_url, 112 112 'user_login' => $author->user_login, 113 );113 ]; 114 114 } 115 115 … … 122 122 $taxonomy_objects = get_object_taxonomies($post->post_type, 'objects'); 123 123 124 $shared_attributes['taxonomies'] = array();125 $shared_attributes['taxonomies_hierarchical'] = array();124 $shared_attributes['taxonomies'] = []; 125 $shared_attributes['taxonomies_hierarchical'] = []; 126 126 foreach ($taxonomy_objects as $taxonomy) { 127 127 $terms = wp_get_object_terms($post->ID, $taxonomy->name); 128 $terms = is_array($terms) ? $terms : array();128 $terms = is_array($terms) ? $terms : []; 129 129 130 130 if ($taxonomy->hierarchical) { … … 189 189 * @param array $records 190 190 */ 191 abstract protected function update_post_records(WP_Post $post, array $records); 191 protected function update_post_records(WP_Post $post, array $records) 192 { 193 // If there are no records, parent `update_records` will take care of the deletion. 194 // In case of posts, we ALWAYS need to delete existing records. 195 if (! empty($records)) { 196 $this->delete_item($post); 197 } 198 199 parent::update_records($post, $records); 200 201 // Keep track of the new record count for future updates relying on the objectID's naming convention . 202 $new_records_count = count($records); 203 $this->set_post_records_count($post, $new_records_count); 204 } 192 205 193 206 /** … … 199 212 200 213 $records_count = $this->get_post_records_count($item->ID); 201 $object_ids = array();214 $object_ids = []; 202 215 for ($i = 0; $i < $records_count; $i++) { 203 216 $object_ids[] = $this->get_post_object_id($item->ID, $i); -
wp-algolia/trunk/src/indices/class-algolia-posts-index.php
r2100083 r2101126 79 79 protected function get_settings() 80 80 { 81 $settings = array(82 'attributesToIndex' => array(81 $settings = [ 82 'attributesToIndex' => [ 83 83 'unordered(post_title)', 84 84 'unordered(taxonomies)', 85 85 'unordered(content)', 86 ),87 'customRanking' => array(86 ], 87 'customRanking' => [ 88 88 'desc(is_sticky)', 89 89 'desc(post_date)', 90 90 'asc(record_index)', 91 ),91 ], 92 92 'attributeForDistinct' => 'post_id', 93 93 'distinct' => true, 94 'attributesForFaceting' => array(94 'attributesForFaceting' => [ 95 95 'taxonomies', 96 96 'taxonomies_hierarchical', 97 97 'post_author.display_name', 98 ),99 'attributesToSnippet' => array(98 ], 99 'attributesToSnippet' => [ 100 100 'post_title:30', 101 101 'content:30', 102 ),102 ], 103 103 'snippetEllipsisText' => '…', 104 );104 ]; 105 105 106 106 $settings = (array) apply_filters('algolia_posts_index_settings', $settings, $this->post_type); … … 115 115 protected function get_synonyms() 116 116 { 117 $synonyms = (array) apply_filters('algolia_posts_index_synonyms', array(), $this->post_type);117 $synonyms = (array) apply_filters('algolia_posts_index_synonyms', [], $this->post_type); 118 118 $synonyms = (array) apply_filters('algolia_posts_' . $this->post_type . '_index_synonyms', $synonyms); 119 119 … … 127 127 protected function update_post_records(WP_Post $post, array $records) 128 128 { 129 // If there are no records, parent `update_records` will take care of the deletion. 130 // In case of posts, we ALWAYS need to delete existing records. 131 if (! empty($records)) { 132 $this->delete_item($post); 133 } 134 135 parent::update_records($post, $records); 136 137 // Keep track of the new record count for future updates relying on the objectID's naming convention . 138 $new_records_count = count($records); 139 $this->set_post_records_count($post, $new_records_count); 129 parent::update_post_records($post, $records); 140 130 141 131 do_action('algolia_posts_index_post_updated', $post, $records); … … 156 146 protected function get_re_index_items_count() 157 147 { 158 $query = new WP_Query( 159 array( 160 'post_type' => $this->post_type, 161 'post_status' => 'any', // Let the `should_index` take care of the filtering. 162 'suppress_filters' => true, 163 ) 164 ); 148 $query = new WP_Query([ 149 'post_type' => $this->post_type, 150 'post_status' => 'any', // Let the `should_index` take care of the filtering. 151 'suppress_filters' => true, 152 ]); 165 153 166 154 return (int) $query->found_posts; … … 175 163 protected function get_items($page, $batch_size) 176 164 { 177 $query = new WP_Query( 178 array( 179 'post_type' => $this->post_type, 180 'posts_per_page' => $batch_size, 181 'post_status' => 'any', 182 'order' => 'ASC', 183 'orderby' => 'ID', 184 'paged' => $page, 185 'suppress_filters' => true, 186 ) 187 ); 165 $query = new WP_Query([ 166 'post_type' => $this->post_type, 167 'posts_per_page' => $batch_size, 168 'post_status' => 'any', 169 'order' => 'ASC', 170 'orderby' => 'ID', 171 'paged' => $page, 172 'suppress_filters' => true, 173 ]); 188 174 189 175 return $query->posts; -
wp-algolia/trunk/src/indices/class-algolia-searchable-posts-index.php
r2100698 r2101126 122 122 protected function update_post_records(WP_Post $post, array $records) 123 123 { 124 // If there are no records, parent `update_records` will take care of the deletion. 125 // In case of posts, we ALWAYS need to delete existing records. 126 if (! empty($records)) { 127 $this->delete_item($post); 128 } 129 130 parent::update_records($post, $records); 131 132 // Keep track of the new record count for future updates relying on the objectID's naming convention . 133 $new_records_count = count($records); 134 $this->set_post_records_count($post, $new_records_count); 124 parent::update_post_records($post, $records); 135 125 136 126 do_action('algolia_searchable_posts_index_post_updated', $post, $records); -
wp-algolia/trunk/src/indices/class-algolia-terms-index.php
r2100083 r2101126 54 54 protected function get_records($item) 55 55 { 56 $record = array();56 $record = []; 57 57 $record['objectID'] = $item->term_id; 58 58 $record['term_id'] = $item->term_id; … … 71 71 $record = (array) apply_filters('algolia_term_' . $item->taxonomy . '_record', $record, $item); 72 72 73 return array( $record );73 return [$record]; 74 74 } 75 75 … … 87 87 protected function get_settings() 88 88 { 89 $settings = array(90 'attributesToIndex' => array(89 $settings = [ 90 'attributesToIndex' => [ 91 91 'unordered(name)', 92 92 'unordered(description)', 93 ),94 'customRanking' => array(93 ], 94 'customRanking' => [ 95 95 'desc(posts_count)', 96 ),97 );96 ], 97 ]; 98 98 99 99 $settings = (array) apply_filters('algolia_terms_index_settings', $settings, $this->taxonomy); … … 108 108 protected function get_synonyms() 109 109 { 110 return (array) apply_filters('algolia_terms_index_synonyms', array());110 return (array) apply_filters('algolia_terms_index_synonyms', []); 111 111 } 112 112 … … 130 130 $offset = $batch_size * ( $page - 1 ); 131 131 132 $args = array(132 $args = [ 133 133 'order' => 'ASC', 134 134 'orderby' => 'id', … … 136 136 'number' => $batch_size, 137 137 'hide_empty' => false, // Let users choose what to index. 138 );138 ]; 139 139 140 140 // We use prior to 4.5 syntax for BC purposes. … … 162 162 public function get_default_autocomplete_config() 163 163 { 164 $config = array(164 $config = [ 165 165 'position' => 20, 166 166 'max_suggestions' => 3, 167 167 'tmpl_suggestion' => 'autocomplete-term-suggestion', 168 );168 ]; 169 169 170 170 return array_merge(parent::get_default_autocomplete_config(), $config); -
wp-algolia/trunk/src/indices/class-algolia-users-index.php
r2100083 r2101126 40 40 protected function get_records($item) 41 41 { 42 $record = array();42 $record = []; 43 43 $record['objectID'] = $item->ID; 44 44 $record['user_id'] = $item->ID; … … 57 57 $record['avatar_url'] = get_avatar_url( 58 58 $item->ID, 59 array(59 [ 60 60 'size' => $avatar_size, 61 )61 ] 62 62 ); 63 63 } else { … … 68 68 $record = (array) apply_filters('algolia_user_record', $record, $item); 69 69 70 return array( $record );70 return [$record]; 71 71 } 72 72 … … 86 86 protected function get_settings() 87 87 { 88 $settings = array(89 'attributesToIndex' => array(88 $settings = [ 89 'attributesToIndex' => [ 90 90 'unordered(display_name)', 91 ),92 'customRanking' => array(91 ], 92 'customRanking' => [ 93 93 'desc(posts_count)', 94 ),95 );94 ], 95 ]; 96 96 97 97 return (array) apply_filters('algolia_users_index_settings', $settings); … … 103 103 protected function get_synonyms() 104 104 { 105 return (array) apply_filters('algolia_users_index_synonyms', array());105 return (array) apply_filters('algolia_users_index_synonyms', []); 106 106 } 107 107 … … 125 125 $offset = $batch_size * ( $page - 1 ); 126 126 127 $args = array(127 $args = [ 128 128 'order' => 'ASC', 129 129 'orderby' => 'ID', 130 130 'offset' => $offset, 131 131 'number' => $batch_size, 132 );132 ]; 133 133 134 134 // We use prior to 4.5 syntax for BC purposes, no `paged` arg. … … 153 153 public function get_default_autocomplete_config() 154 154 { 155 $config = array(155 $config = [ 156 156 'position' => 30, 157 157 'max_suggestions' => 3, 158 158 'tmpl_suggestion' => 'autocomplete-user-suggestion', 159 );159 ]; 160 160 161 161 return array_merge(parent::get_default_autocomplete_config(), $config); -
wp-algolia/trunk/src/watchers/class-algolia-post-changes-watcher.php
r2100083 r2101126 22 22 { 23 23 // Fires once a post has been saved. 24 add_action('save_post', array( $this, 'sync_item' ));24 add_action('save_post', [$this, 'sync_item']); 25 25 26 26 // Fires before a post is deleted, at the start of wp_delete_post(). 27 27 // At this stage the post metas are still available, and we need them. 28 add_action('before_delete_post', array( $this, 'delete_item' ));28 add_action('before_delete_post', [$this, 'delete_item']); 29 29 30 30 // Handle meta changes after the change occurred. 31 add_action('added_post_meta', array( $this, 'on_meta_change' ), 10, 4);32 add_action('updated_post_meta', array( $this, 'on_meta_change' ), 10, 4);33 add_action('deleted_post_meta', array( $this, 'on_meta_change' ), 10, 4);31 add_action('added_post_meta', [$this, 'on_meta_change'], 10, 4); 32 add_action('updated_post_meta', [$this, 'on_meta_change'], 10, 4); 33 add_action('deleted_post_meta', [$this, 'on_meta_change'], 10, 4); 34 34 35 35 // Handle attachment changes. These are required because the other post hooks are not triggered. 36 add_action('add_attachment', array( $this, 'sync_item' ));37 add_action('attachment_updated', array( $this, 'sync_item' ));38 add_action('delete_attachment', array( $this, 'delete_item' ));36 add_action('add_attachment', [$this, 'sync_item']); 37 add_action('attachment_updated', [$this, 'sync_item']); 38 add_action('delete_attachment', [$this, 'delete_item']); 39 39 } 40 40 … … 84 84 public function on_meta_change($meta_id, $object_id, $meta_key) 85 85 { 86 $keys = array( '_thumbnail_id' );86 $keys = ['_thumbnail_id']; 87 87 $keys = (array) apply_filters('algolia_watch_post_meta_keys', $keys, $object_id); 88 88 -
wp-algolia/trunk/src/watchers/class-algolia-term-changes-watcher.php
r2100083 r2101126 22 22 { 23 23 // Fires immediately after the given terms are edited. 24 add_action('edited_term', array( $this, 'sync_item' ));24 add_action('edited_term', [$this, 'sync_item']); 25 25 26 26 // Fires after an object's terms have been set. 27 add_action('set_object_terms', array( $this, 'handle_changes' ), 10, 6);27 add_action('set_object_terms', [$this, 'handle_changes'], 10, 6); 28 28 29 29 // Fires after a term is deleted from the database and the cache is cleaned. 30 add_action('delete_term', array( $this, 'on_delete_term' ), 10, 4);30 add_action('delete_term', [$this, 'on_delete_term'], 10, 4); 31 31 } 32 32 -
wp-algolia/trunk/src/watchers/class-algolia-user-changes-watcher.php
r2100083 r2101126 22 22 { 23 23 // Fires immediately after an existing user is updated. 24 add_action('profile_update', array( $this, 'sync_item' ));24 add_action('profile_update', [$this, 'sync_item']); 25 25 26 26 // Fires immediately after a new user is registered. 27 add_action('user_register', array( $this, 'sync_item' ));27 add_action('user_register', [$this, 'sync_item']); 28 28 29 29 // Fires immediately before a user is deleted. 30 add_action('delete_user', array( $this, 'delete_item' ));30 add_action('delete_user', [$this, 'delete_item']); 31 31 32 32 // Fires once a post has been saved. 33 add_action('save_post', array( $this, 'on_save_post' ), 10, 2);33 add_action('save_post', [$this, 'on_save_post'], 10, 2); 34 34 35 35 // Fires before a post is deleted, at the start of wp_delete_post(). 36 36 // At this stage the post metas are still available, and we need them. 37 add_action('before_delete_post', array( $this, 'on_delete_post' ));37 add_action('before_delete_post', [$this, 'on_delete_post']); 38 38 } 39 39 -
wp-algolia/trunk/vendor/autoload.php
r2100698 r2101126 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 18009676d0bcc7296499ee1203467cc0::getLoader();7 return ComposerAutoloaderInitc49d78d344667cc430651fb080c0d596::getLoader(); -
wp-algolia/trunk/vendor/composer/autoload_real.php
r2100698 r2101126 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 18009676d0bcc7296499ee1203467cc05 class ComposerAutoloaderInitc49d78d344667cc430651fb080c0d596 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit 18009676d0bcc7296499ee1203467cc0', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInitc49d78d344667cc430651fb080c0d596', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit 18009676d0bcc7296499ee1203467cc0', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInitc49d78d344667cc430651fb080c0d596', '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 18009676d0bcc7296499ee1203467cc0::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInitc49d78d344667cc430651fb080c0d596::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; … … 49 49 50 50 if ($useStaticLoader) { 51 $includeFiles = Composer\Autoload\ComposerStaticInit 18009676d0bcc7296499ee1203467cc0::$files;51 $includeFiles = Composer\Autoload\ComposerStaticInitc49d78d344667cc430651fb080c0d596::$files; 52 52 } else { 53 53 $includeFiles = require __DIR__ . '/autoload_files.php'; 54 54 } 55 55 foreach ($includeFiles as $fileIdentifier => $file) { 56 composerRequire 18009676d0bcc7296499ee1203467cc0($fileIdentifier, $file);56 composerRequirec49d78d344667cc430651fb080c0d596($fileIdentifier, $file); 57 57 } 58 58 … … 61 61 } 62 62 63 function composerRequire 18009676d0bcc7296499ee1203467cc0($fileIdentifier, $file)63 function composerRequirec49d78d344667cc430651fb080c0d596($fileIdentifier, $file) 64 64 { 65 65 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
wp-algolia/trunk/vendor/composer/autoload_static.php
r2100698 r2101126 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 18009676d0bcc7296499ee1203467cc07 class ComposerStaticInitc49d78d344667cc430651fb080c0d596 8 8 { 9 9 public static $files = array ( … … 338 338 { 339 339 return \Closure::bind(function () use ($loader) { 340 $loader->prefixLengthsPsr4 = ComposerStaticInit 18009676d0bcc7296499ee1203467cc0::$prefixLengthsPsr4;341 $loader->prefixDirsPsr4 = ComposerStaticInit 18009676d0bcc7296499ee1203467cc0::$prefixDirsPsr4;342 $loader->classMap = ComposerStaticInit 18009676d0bcc7296499ee1203467cc0::$classMap;340 $loader->prefixLengthsPsr4 = ComposerStaticInitc49d78d344667cc430651fb080c0d596::$prefixLengthsPsr4; 341 $loader->prefixDirsPsr4 = ComposerStaticInitc49d78d344667cc430651fb080c0d596::$prefixDirsPsr4; 342 $loader->classMap = ComposerStaticInitc49d78d344667cc430651fb080c0d596::$classMap; 343 343 344 344 }, null, ClassLoader::class); -
wp-algolia/trunk/wp-algolia.php
r2100698 r2101126 5 5 Plugin URI: https://www.algolia.com/ 6 6 Description: WordPress plugin to use Algolia as a search engine. 7 Version: 3.0. 17 Version: 3.0.2 8 8 Author: Léo Colombaro 9 9 Author URI: https://colombaro.fr/
Note: See TracChangeset
for help on using the changeset viewer.