Skip to content

Commit 53ef52e

Browse files
authored
Merge pull request #862 from Automattic/chore/remove-unused-vip-feature-flag
2 parents 68e3985 + e586cec commit 53ef52e

File tree

3 files changed

+1
-57
lines changed

3 files changed

+1
-57
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
3232

3333
### Maintenance
3434

35+
* chore: remove unused VIP feature flag setting and related code by @GaryJones in [#862](https://github.com/Automattic/Edit-Flow/pull/862)
3536
* chore: rename workflow to match plugin standards by @GaryJones in [#850](https://github.com/Automattic/Edit-Flow/pull/850)
3637
* chore: migrate build system from webpack to wp-scripts by @GaryJones in [#845](https://github.com/Automattic/Edit-Flow/pull/845)
3738
* chore: simplify ESLint config after eslint-plugin-wpvip fix by @GaryJones in [#844](https://github.com/Automattic/Edit-Flow/pull/844)

common/php/class-module.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,6 @@ public function module_enabled( $slug ) {
4646
return isset( $edit_flow->$slug ) && $edit_flow->$slug->is_enabled();
4747
}
4848

49-
/**
50-
* Returns whether vip features have been enabled or not.
51-
*
52-
* @since 0.10.0
53-
*
54-
* @return true, if the feature is enabled, false otherwise
55-
*/
56-
protected function are_vip_features_enabled() {
57-
global $edit_flow;
58-
59-
return 'on' === $edit_flow->settings->module->options->vip_features;
60-
}
61-
6249
/**
6350
* Returns whether analytics has been enabled or not.
6451
*

modules/settings/settings.php

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public function __construct() {
2222
'settings_slug' => 'ef-settings',
2323
'default_options' => array(
2424
'enabled' => 'on',
25-
'vip_features' => $this->is_vip_site() ? 'on' : 'off',
2625
),
2726
'configure_page_cb' => 'print_default_settings',
2827
'autoload' => true,
@@ -35,7 +34,6 @@ public function __construct() {
3534
*/
3635
public function init() {
3736
add_action( 'admin_init', array( $this, 'helper_settings_validate_and_save' ), 100 );
38-
add_action( 'admin_init', array( $this, 'register_settings' ) );
3937

4038
add_action( 'admin_print_styles', array( $this, 'action_admin_print_styles' ) );
4139
add_action( 'admin_print_scripts', array( $this, 'action_admin_print_scripts' ) );
@@ -154,34 +152,6 @@ public function settings_page_controller() {
154152
$this->print_default_footer( $requested_module );
155153
}
156154

157-
/**
158-
* Register settings for notifications so we can partially use the Settings API
159-
* We use the Settings API for form generation, but not saving because we have our
160-
* own way of handling the data.
161-
*
162-
* @since 0.10.0
163-
*/
164-
public function register_settings() {
165-
add_settings_section(
166-
$this->module->options_group_name . '_general',
167-
__( 'WordPress VIP', 'edit-flow' ),
168-
array( $this, 'settings_vip_section_description' ),
169-
$this->module->options_group_name
170-
);
171-
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' );
172-
}
173-
174-
/**
175-
* Print the description for the VIP features section.
176-
*
177-
* @since 0.10.0
178-
*/
179-
public function settings_vip_section_description() {
180-
echo '<p>';
181-
esc_html_e( 'WordPress VIP features provide enhanced editorial workflow capabilities optimised for enterprise environments.', 'edit-flow' );
182-
echo '</p>';
183-
}
184-
185155
/**
186156
* 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.
187157
* phpcs:disable:WordPress.Security.NonceVerification.Missing
@@ -273,20 +243,6 @@ public function print_default_settings() {
273243
<?php
274244
}
275245

276-
public function settings_vip_features_option() {
277-
$options = array(
278-
'off' => __( 'Disabled', 'edit-flow' ),
279-
'on' => __( 'Enabled', 'edit-flow' ),
280-
);
281-
echo '<select id="vip_features" name="' . esc_attr( $this->module->options_group_name ) . '[vip_features]">';
282-
foreach ( $options as $value => $label ) {
283-
echo '<option value="' . esc_attr( $value ) . '"';
284-
echo selected( $this->module->options->vip_features, $value );
285-
echo '>' . esc_html( $label ) . '</option>';
286-
}
287-
echo '</select>';
288-
}
289-
290246
public function print_default_footer( $current_module ) {
291247
?>
292248
</div>

0 commit comments

Comments
 (0)