-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Remove connection settings #502
Conversation
0b344ca
to
a9dbe74
Compare
@@ -6,193 +6,6 @@ class WP_Auth0_Admin { | |||
|
|||
protected $router; | |||
|
|||
protected $providers = array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer control connections from the settings page so this is not needed.
@@ -3,239 +3,18 @@ | |||
class WP_Auth0_InitialSetup_Connections { | |||
|
|||
protected $a0_options; | |||
protected $providers = array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer control connections from the settings page so this is not needed.
The options
child array is still used in a method for this class - WP_Auth0_InitialSetup_Connections::toggle_social()
- so those 3 were moved down. Method will be deprecated in another PR but need to retain functionality in the meantime.
|
||
public function __construct( WP_Auth0_Options $a0_options ) { | ||
$this->a0_options = $a0_options; | ||
|
||
add_action( 'wp_ajax_a0_initial_setup_set_connection', array( $this, 'update_connection' ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused AJAX hook
} | ||
|
||
public function render( $step ) { | ||
wp_enqueue_script( 'wpa0_async', WPA0_PLUGIN_LIB_URL . 'async.min.js' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connection pieces were removed, other vars were moved to the templates/initial-setup/connections.php
template below
a9dbe74
to
58b884d
Compare
@@ -108,56 +108,6 @@ | |||
</div> | |||
|
|||
<script type="text/javascript"> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all updates connections based on settings, which is not there anymore.
58b884d
to
82b74cd
Compare
@@ -138,10 +138,6 @@ public function consent_callback( $name ) { | |||
$enabled_clients = array_diff( $connection->enabled_clients, array( $client_id ) ); | |||
WP_Auth0_Api_Client::update_connection( $domain, $app_token, $connection->id, array( 'enabled_clients' => array_values( $enabled_clients ) ) ); | |||
} | |||
} elseif ( $connection->strategy !== 'auth0' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connection will only be DB
" role="tab" data-toggle="tab" class="js-a0-settings-tabs"><?php echo ucfirst( $tab ); ?></a></li> | ||
<?php endforeach; ?> | ||
<?php | ||
foreach ( array( 'basic', 'features', 'appearance', 'advanced', 'help' ) as $tab ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored, whitespace scan was causing tab memory to fail
67f54fd
to
9a95102
Compare
f5bfe11
to
f56c852
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for comments, LGTM
f56c852
to
bdd5b77
Compare
WP_Auth0_Options::get_connection()
calls withWP_Auth0_Options::get()
onesWP_Auth0_Options::set_connection()
callsWP_Auth0_Admin_Generic::render_social_key_field()
method and replaced withWP_Auth0_Admin_Generic::render_text_field()