Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 0 additions & 13 deletions common/php/class-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
44 changes: 0 additions & 44 deletions modules/settings/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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' ) );
Expand Down Expand Up @@ -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 '<p>';
esc_html_e( 'WordPress VIP features provide enhanced editorial workflow capabilities optimised for enterprise environments.', 'edit-flow' );
echo '</p>';
}

/**
* 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
Expand Down Expand Up @@ -273,20 +243,6 @@ public function print_default_settings() {
<?php
}

public function settings_vip_features_option() {
$options = array(
'off' => __( 'Disabled', 'edit-flow' ),
'on' => __( 'Enabled', 'edit-flow' ),
);
echo '<select id="vip_features" name="' . esc_attr( $this->module->options_group_name ) . '[vip_features]">';
foreach ( $options as $value => $label ) {
echo '<option value="' . esc_attr( $value ) . '"';
echo selected( $this->module->options->vip_features, $value );
echo '>' . esc_html( $label ) . '</option>';
}
echo '</select>';
}

public function print_default_footer( $current_module ) {
?>
</div>
Expand Down
Loading