diff --git a/images/logo-elasticpress-io.svg b/images/logo-elasticpress-io.svg index d913c0f9ff..8f09945710 100644 --- a/images/logo-elasticpress-io.svg +++ b/images/logo-elasticpress-io.svg @@ -1,4 +1,4 @@ - + ElasticPress.io Logo diff --git a/images/logo-icon.svg b/images/logo-icon.svg index 4c102db77c..d3b4c7616f 100644 --- a/images/logo-icon.svg +++ b/images/logo-icon.svg @@ -1 +1 @@ -logo \ No newline at end of file +logo \ No newline at end of file diff --git a/images/logo.svg b/images/logo.svg index 2dad352f59..9be5250e95 100644 --- a/images/logo.svg +++ b/images/logo.svg @@ -1 +1 @@ -logo \ No newline at end of file +logo \ No newline at end of file diff --git a/images/warning.svg b/images/warning.svg index 6765fab1ca..fe60e7d28e 100644 --- a/images/warning.svg +++ b/images/warning.svg @@ -1,3 +1,3 @@ - + diff --git a/includes/classes/Upgrades.php b/includes/classes/Upgrades.php index a3d966307a..82e1da3ac6 100644 --- a/includes/classes/Upgrades.php +++ b/includes/classes/Upgrades.php @@ -8,7 +8,7 @@ namespace ElasticPress; -use ElasticPress\Utils as Utils; +use ElasticPress\Utils; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. @@ -46,6 +46,7 @@ public function setup() { '3.5.3' => [ 'upgrade_3_5_3', 'init' ], '3.6.6' => [ 'upgrade_3_6_6', 'init' ], '4.2.2' => [ 'upgrade_4_2_2', 'init' ], + '4.4.0' => [ 'upgrade_4_4_0', 'init' ], ]; array_walk( $routines, [ $this, 'run_upgrade_routine' ] ); @@ -179,6 +180,17 @@ public function upgrade_4_2_2() { } } + /** + * Upgrade routine of v4.4.0. + * + * Delete the ep_prefix option, as that is now obtained via ep_credentials + * + * @see https://github.com/10up/ElasticPress/issues/2739 + */ + public function upgrade_4_4_0() { + Utils\delete_option( 'ep_prefix' ); + } + /** * Adjust the upgrade sync notice to warn users about Instant Results. * diff --git a/includes/dashboard.php b/includes/dashboard.php index 95b6df9737..06f1814ae2 100644 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -606,11 +606,6 @@ function action_admin_init() { Utils\update_option( 'ep_host', $host ); } - if ( isset( $_POST['ep_prefix'] ) ) { - $prefix = ( isset( $_POST['ep_prefix'] ) ) ? sanitize_text_field( wp_unslash( $_POST['ep_prefix'] ) ) : ''; - Utils\update_option( 'ep_prefix', $prefix ); - } - if ( isset( $_POST['ep_credentials'] ) ) { $credentials = ( isset( $_POST['ep_credentials'] ) ) ? Utils\sanitize_credentials( $_POST['ep_credentials'] ) : [ 'username' => '', @@ -625,7 +620,6 @@ function action_admin_init() { } } else { register_setting( 'elasticpress', 'ep_host', 'esc_url_raw' ); - register_setting( 'elasticpress', 'ep_prefix', 'sanitize_text_field' ); register_setting( 'elasticpress', 'ep_credentials', 'ep_sanitize_credentials' ); register_setting( 'elasticpress', 'ep_language', 'sanitize_text_field' ); register_setting( diff --git a/includes/partials/settings-page.php b/includes/partials/settings-page.php index dc8f0e40fb..088a7ee0a6 100644 --- a/includes/partials/settings-page.php +++ b/includes/partials/settings-page.php @@ -90,42 +90,18 @@

-

+

-

+

- - - - - - - disabled type="text" value="" name="ep_prefix" id="ep_prefix"> - - -

- -

- - - - + disabled type="text" value="" name="ep_credentials[username]" id="ep_username"> -

+

-

+

- + +