Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused IP range setting #616

Merged
merged 1 commit into from
Jan 8, 2019
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
2 changes: 0 additions & 2 deletions lib/WP_Auth0_Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '',
Expand Down
20 changes: 8 additions & 12 deletions lib/admin/WP_Auth0_Admin_Advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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' );
Expand All @@ -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'] );
Expand Down
2 changes: 1 addition & 1 deletion tests/testWPAuth0Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down