Skip to content

Commit

Permalink
Deprecate 2 lookup methods
Browse files Browse the repository at this point in the history
- WP_Auth0_Options::get_enabled_connections()
- WP_Auth0::get_plugin_dir_url()
  • Loading branch information
joshcanhelp committed Apr 25, 2018
1 parent 993645a commit 78ac6cc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
8 changes: 7 additions & 1 deletion WP_Auth0.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,14 @@ function on_activate_redirect( $plugin ) {
}
}

// TODO: Deprecate
/**
* @deprecated 3.6.0 - Use WPA0_PLUGIN_URL constant
*
* @return string
*/
public static function get_plugin_dir_url() {
// phpcs:ignore
trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED );
return WPA0_PLUGIN_URL;
}

Expand Down
16 changes: 11 additions & 5 deletions lib/WP_Auth0_Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ public function is_wp_registration_enabled() {
return get_site_option( 'users_can_register', 0 ) == 1;
}

// TODO: Deprecate, not used
public function get_enabled_connections() {
return array( 'facebook', 'twitter', 'google-oauth2' );
}

public function set_connection( $key, $value ) {
$options = $this->get_options();
$options['connections'][$key] = $value;
Expand Down Expand Up @@ -252,4 +247,15 @@ protected function defaults() {
'chart_age_step' => '5',
);
}

/**
* @deprecated 3.6.0 - Social connections are no longer set during initial setup so this data is no longer needed.
*
* @return array
*/
public function get_enabled_connections() {
// phpcs:ignore
trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED );
return array( 'facebook', 'twitter', 'google-oauth2' );
}
}

0 comments on commit 78ac6cc

Please sign in to comment.