@@ -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