diff --git a/CHANGELOG.md b/CHANGELOG.md index c0846183..07e6bd96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Maintenance +* chore: remove unused VIP feature flag setting and related code by @GaryJones in [#862](https://github.com/Automattic/Edit-Flow/pull/862) * chore: rename workflow to match plugin standards by @GaryJones in [#850](https://github.com/Automattic/Edit-Flow/pull/850) * chore: migrate build system from webpack to wp-scripts by @GaryJones in [#845](https://github.com/Automattic/Edit-Flow/pull/845) * chore: simplify ESLint config after eslint-plugin-wpvip fix by @GaryJones in [#844](https://github.com/Automattic/Edit-Flow/pull/844) diff --git a/common/php/class-module.php b/common/php/class-module.php index 00668bd7..d5d5c39e 100644 --- a/common/php/class-module.php +++ b/common/php/class-module.php @@ -46,19 +46,6 @@ public function module_enabled( $slug ) { return isset( $edit_flow->$slug ) && $edit_flow->$slug->is_enabled(); } - /** - * Returns whether vip features have been enabled or not. - * - * @since 0.10.0 - * - * @return true, if the feature is enabled, false otherwise - */ - protected function are_vip_features_enabled() { - global $edit_flow; - - return 'on' === $edit_flow->settings->module->options->vip_features; - } - /** * Returns whether analytics has been enabled or not. * diff --git a/modules/settings/settings.php b/modules/settings/settings.php index c4c42700..0bad89d4 100644 --- a/modules/settings/settings.php +++ b/modules/settings/settings.php @@ -22,7 +22,6 @@ public function __construct() { 'settings_slug' => 'ef-settings', 'default_options' => array( 'enabled' => 'on', - 'vip_features' => $this->is_vip_site() ? 'on' : 'off', ), 'configure_page_cb' => 'print_default_settings', 'autoload' => true, @@ -35,7 +34,6 @@ public function __construct() { */ public function init() { add_action( 'admin_init', array( $this, 'helper_settings_validate_and_save' ), 100 ); - add_action( 'admin_init', array( $this, 'register_settings' ) ); add_action( 'admin_print_styles', array( $this, 'action_admin_print_styles' ) ); add_action( 'admin_print_scripts', array( $this, 'action_admin_print_scripts' ) ); @@ -154,34 +152,6 @@ public function settings_page_controller() { $this->print_default_footer( $requested_module ); } - /** - * Register settings for notifications so we can partially use the Settings API - * We use the Settings API for form generation, but not saving because we have our - * own way of handling the data. - * - * @since 0.10.0 - */ - public function register_settings() { - add_settings_section( - $this->module->options_group_name . '_general', - __( 'WordPress VIP', 'edit-flow' ), - array( $this, 'settings_vip_section_description' ), - $this->module->options_group_name - ); - add_settings_field( 'vip_features', __( 'Enable VIP features', 'edit-flow' ), array( $this, 'settings_vip_features_option' ), $this->module->options_group_name, $this->module->options_group_name . '_general' ); - } - - /** - * Print the description for the VIP features section. - * - * @since 0.10.0 - */ - public function settings_vip_section_description() { - echo '
'; - esc_html_e( 'WordPress VIP features provide enhanced editorial workflow capabilities optimised for enterprise environments.', 'edit-flow' ); - echo '
'; - } - /** * Disabling nonce verification because that is not available here, it's just rendering it. The actual save is done in helper_settings_validate_and_save and that's guarded well. * phpcs:disable:WordPress.Security.NonceVerification.Missing @@ -273,20 +243,6 @@ public function print_default_settings() { __( 'Disabled', 'edit-flow' ), - 'on' => __( 'Enabled', 'edit-flow' ), - ); - echo ''; - } - public function print_default_footer( $current_module ) { ?>