From f44fb47f7ccbba3ef48678e5f1dd894ec9928053 Mon Sep 17 00:00:00 2001 From: Josh Cunningham Date: Tue, 8 Jan 2019 08:58:25 -0800 Subject: [PATCH] Remove unused IP range setting --- lib/WP_Auth0_Options.php | 2 -- lib/admin/WP_Auth0_Admin_Advanced.php | 20 ++++++++------------ tests/testWPAuth0Options.php | 2 +- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/lib/WP_Auth0_Options.php b/lib/WP_Auth0_Options.php index d32111e2..cf7b76d1 100755 --- a/lib/WP_Auth0_Options.php +++ b/lib/WP_Auth0_Options.php @@ -248,8 +248,6 @@ protected function defaults() { 'auto_login' => 0, 'auto_login_method' => '', 'auth0_implicit_workflow' => false, - 'ip_range_check' => 0, - 'ip_ranges' => '', 'valid_proxy_ip' => null, 'custom_signup_fields' => '', 'extra_conf' => '', diff --git a/lib/admin/WP_Auth0_Admin_Advanced.php b/lib/admin/WP_Auth0_Admin_Advanced.php index 6c5c249b..c9467053 100644 --- a/lib/admin/WP_Auth0_Admin_Advanced.php +++ b/lib/admin/WP_Auth0_Admin_Advanced.php @@ -122,18 +122,6 @@ public function init() { 'id' => 'wpa0_auth0_implicit_workflow', 'function' => 'render_auth0_implicit_workflow', ), - array( - 'name' => __( 'Enable IP Ranges', 'wp-auth0' ), - 'opt' => 'ip_range_check', - 'id' => 'wpa0_ip_range_check', - 'function' => 'render_ip_range_check', - ), - array( - 'name' => __( 'IP Ranges', 'wp-auth0' ), - 'opt' => 'ip_ranges', - 'id' => 'wpa0_ip_ranges', - 'function' => 'render_ip_ranges', - ), array( 'name' => __( 'Valid Proxy IP', 'wp-auth0' ), 'opt' => 'valid_proxy_ip', @@ -441,10 +429,14 @@ public function render_auth0_implicit_workflow( $args = array() ) { * Render form field and description for the `ip_range_check` option. * IMPORTANT: Internal callback use only, do not call this function directly! * + * TODO: Deprecate, not used + * * @param array $args - callback args passed in from add_settings_field(). * * @see WP_Auth0_Admin_Generic::init_option_section() * @see add_settings_field() + * + * @codeCoverageIgnore - Deprecated */ public function render_ip_range_check( $args = array() ) { $this->render_switch( $args['label_for'], $args['opt_name'], 'wpa0_ip_ranges' ); @@ -454,10 +446,14 @@ public function render_ip_range_check( $args = array() ) { * Render form field and description for the `ip_ranges` option. * IMPORTANT: Internal callback use only, do not call this function directly! * + * TODO: Deprecate, not used + * * @param array $args - callback args passed in from add_settings_field(). * * @see WP_Auth0_Admin_Generic::init_option_section() * @see add_settings_field() + * + * @codeCoverageIgnore - Deprecated */ public function render_ip_ranges( $args = array() ) { $this->render_textarea_field( $args['label_for'], $args['opt_name'] ); diff --git a/tests/testWPAuth0Options.php b/tests/testWPAuth0Options.php index 661d6eff..ec96c915 100644 --- a/tests/testWPAuth0Options.php +++ b/tests/testWPAuth0Options.php @@ -28,7 +28,7 @@ class TestWPAuth0Options extends TestCase { /** * Total number of options. */ - const DEFAULT_OPTIONS_COUNT = 68; + const DEFAULT_OPTIONS_COUNT = 66; /** * Test the basic options functionality.