PluginProbe
ElasticPress / 5.3.5
ElasticPress v5.3.5
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
← All changes | elasticpress.php +29 -31 4.7.25.3.5 View file →
@@ -2,16 +2,17 @@
2 2 /**
3 3 * Plugin Name: ElasticPress
4 4 * Plugin URI: https://github.com/10up/ElasticPress
5 5 * Description: A fast and flexible search and query engine for WordPress.
6 - * Version: 4.7.2
7 - * Requires at least: 5.6
8 - * Requires PHP: 7.0
6 + * Version: 5.3.5
7 + * Requires at least: 6.2
8 + * Requires PHP: 7.4
9 9 * Author: 10up
10 10 * Author URI: https://10up.com
11 11 * License: GPL v2 or later
12 12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
13 13 * Text Domain: elasticpress
14 + * Domain Path: /lang
14 15 *
15 16 * This program derives work from Alley Interactive's SearchPress
16 17 * and Automattic's VIP search plugin:
17 18 *
@@ -22,9 +23,9 @@
22 23 */
23 24
24 25 namespace ElasticPress;
25 26
26 -use \WP_CLI;
27 +use WP_CLI;
27 28
28 29 if ( ! defined( 'ABSPATH' ) ) {
29 30 exit; // Exit if accessed directly.
30 31 }
@@ -31,16 +32,16 @@
31 32
32 33 define( 'EP_URL', plugin_dir_url( __FILE__ ) );
33 34 define( 'EP_PATH', plugin_dir_path( __FILE__ ) );
34 35 define( 'EP_FILE', plugin_basename( __FILE__ ) );
35 -define( 'EP_VERSION', '4.7.2' );
36 +define( 'EP_VERSION', '5.3.5' );
36 37
37 -define( 'EP_PHP_VERSION_MIN', '7.0' );
38 +define( 'EP_PHP_VERSION_MIN', '7.4' );
38 39
39 40 if ( ! version_compare( phpversion(), EP_PHP_VERSION_MIN, '>=' ) ) {
40 41 add_action(
41 42 'admin_notices',
42 - function() {
43 + function () {
43 44 ?>
44 45 <div class="notice notice-error">
45 46 <p>
46 47 <?php
@@ -70,9 +71,9 @@
70 71 *
71 72 * @since 2.6
72 73 */
73 74 spl_autoload_register(
74 - function( $class ) {
75 + function ( $class_name ) {
75 76 // project-specific namespace prefix.
76 77 $prefix = 'ElasticPress\\';
77 78
78 79 // base directory for the namespace prefix.
@@ -80,13 +81,13 @@
80 81
81 82 // does the class use the namespace prefix?
82 83 $len = strlen( $prefix );
83 84
84 - if ( strncmp( $prefix, $class, $len ) !== 0 ) {
85 + if ( strncmp( $prefix, $class_name, $len ) !== 0 ) {
85 86 return;
86 87 }
87 88
88 - $relative_class = substr( $class, $len );
89 + $relative_class = substr( $class_name, $len );
89 90
90 91 $file = $base_dir . str_replace( '\\', '/', $relative_class ) . '.php';
91 92
92 93 // if the file exists, require it.
@@ -104,9 +105,9 @@
104 105 * We don't check minor releases so if your ES version if 7.10.1, we consider that 7.10 in our comparison.
105 106 *
106 107 * @since 2.2
107 108 */
108 -define( 'EP_ES_VERSION_MAX', '7.10' );
109 +define( 'EP_ES_VERSION_MAX', '9.999' );
109 110 define( 'EP_ES_VERSION_MIN', '5.2' );
110 111
111 112 require_once __DIR__ . '/includes/compat.php';
112 113 require_once __DIR__ . '/includes/utils.php';
@@ -189,29 +190,15 @@
189 190 new Feature\Documents\Documents()
190 191 );
191 192
192 193 Features::factory()->register_feature(
194 + new Feature\AcfRepeater\AcfRepeater()
195 + );
196 +
197 + Features::factory()->register_feature(
193 198 new Feature\Comments\Comments()
194 199 );
195 200
196 - /**
197 - * Filter whether the Users feature should be registered or not.
198 - *
199 - * The Users feature is going to be migrated to ElasticPress Labs. If EP Labs is enabled
200 - * and in a more recent version, it will change this to false and load its own version
201 - * of the Users feature.
202 - *
203 - * @hook ep_user_register_feature
204 - * @since 4.5.0
205 - * @param {bool} $version Version
206 - * @return {bool} New version
207 - */
208 - if ( apply_filters( 'ep_user_register_feature', true ) ) {
209 - Features::factory()->register_feature(
210 - new Feature\Users\Users()
211 - );
212 - }
213 -
214 201 Features::factory()->register_feature(
215 202 new Feature\Terms\Terms()
216 203 );
217 204
@@ -232,9 +219,12 @@
232 219 */
233 220 $query_logger = apply_filters( 'ep_query_logger', new \ElasticPress\QueryLogger() );
234 221 get_container()->set( '\ElasticPress\QueryLogger', $query_logger, true );
235 222
223 + get_container()->set( '\ElasticPress\AdminBar', new \ElasticPress\AdminBar(), true );
236 224 get_container()->set( '\ElasticPress\BlockTemplateUtils', new \ElasticPress\BlockTemplateUtils(), true );
225 + get_container()->set( '\ElasticPress\ElasticPressIo', new \ElasticPress\ElasticPressIo() );
226 + get_container()->set( '\ElasticPress\ElementorUtils', new \ElasticPress\ElementorUtils(), true );
237 227 }
238 228 add_action( 'plugins_loaded', __NAMESPACE__ . '\register_indexable_posts' );
239 229
240 230 /**
@@ -292,10 +282,8 @@
292 282 *
293 283 * @since 2.2
294 284 */
295 285 function setup_misc() {
296 - load_plugin_textdomain( 'elasticpress', false, basename( __DIR__ ) . '/lang' ); // Load any available translations first.
297 -
298 286 if ( is_user_logged_in() && ! defined( 'WP_EP_DEBUG' ) ) {
299 287 require_once ABSPATH . 'wp-admin/includes/plugin.php';
300 288 define( 'WP_EP_DEBUG', is_plugin_active( 'debug-bar-elasticpress/debug-bar-elasticpress.php' ) );
301 289 }
@@ -300,8 +288,18 @@
300 288 define( 'WP_EP_DEBUG', is_plugin_active( 'debug-bar-elasticpress/debug-bar-elasticpress.php' ) );
301 289 }
302 290 }
303 291 add_action( 'plugins_loaded', __NAMESPACE__ . '\setup_misc' );
292 +
293 +/**
294 + * Load text domain
295 + *
296 + * @since 5.1.4
297 + */
298 +function i18n() {
299 + load_plugin_textdomain( 'elasticpress', false, basename( __DIR__ ) . '/lang' );
300 +}
301 +add_action( 'init', __NAMESPACE__ . '\i18n' );
304 302
305 303 /**
306 304 * Set up role(s) with EP capability
307 305 */