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

Deprecate Social Amplificator classes + methods #612

Merged
merged 2 commits into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 1 addition & 1 deletion WP_Auth0.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class WP_Auth0 {
protected $a0_options;

/**
* TODO: Deprecate
* @deprecated - 3.9.0, functionality removed
*
* @var WP_Auth0_Amplificator
*/
Expand Down
6 changes: 2 additions & 4 deletions lib/WP_Auth0_Amplificator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Class WP_Auth0_Amplificator
*
* TODO: Deprecate, functionality removed
* @deprecated - 3.9.0, functionality removed
*
* @codeCoverageIgnore
*/
Expand All @@ -18,9 +18,7 @@ class WP_Auth0_Amplificator {
* @param WP_Auth0_DBManager $db_manager
* @param WP_Auth0_Options $a0_options
*
* TODO: Deprecate, functionality removed
*
* @codeCoverageIgnore
* @deprecated - 3.9.0, functionality removed
*/
public function __construct( WP_Auth0_DBManager $db_manager, WP_Auth0_Options $a0_options ) {
$this->db_manager = $db_manager;
Expand Down
6 changes: 3 additions & 3 deletions lib/WP_Auth0_SocialAmplification_Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Class WP_Auth0_SocialAmplification_Widget
*
* TODO: Deprecate, functionality removed
* @deprecated - 3.9.0, functionality removed
*
* @codeCoverageIgnore
*/
Expand All @@ -21,7 +21,7 @@ public static function set_context( WP_Auth0_DBManager $db_manager, WP_Auth0_Amp
/**
* WP_Auth0_SocialAmplification_Widget constructor.
*
* TODO: Deprecate, functionality removed
* @deprecated - 3.9.0, functionality removed
*/
function __construct() {
parent::__construct(
Expand Down Expand Up @@ -188,7 +188,7 @@ public function widget( $args, $instance ) {
}

/**
* TODO: Deprecate, functionality removed
* @deprecated - 3.9.0, functionality removed
*/
protected static function current_page_url() {

Expand Down
182 changes: 91 additions & 91 deletions lib/admin/WP_Auth0_Admin_Advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,97 +520,6 @@ public function render_custom_signup_fields( $args = array() ) {
);
}

/**
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality unchanged, moved to the deprecated section of the file.

* Render form field and description for the `social_twitter_key` option.
* IMPORTANT: Internal callback use only, do not call this function directly!
*
* TODO: Deprecate, functionality removed
*
* @param array $args - callback args passed in from add_settings_field().
*
* @see WP_Auth0_Admin_Generic::init_option_section()
* @see add_settings_field()
*/
public function render_social_twitter_key( $args = array() ) {
$this->render_text_field( $args['label_for'], $args['opt_name'] );
$this->render_field_description(
__( 'Twitter app key for the Social Amplification Widget. ', 'wp-auth0' ) .
__( 'The app used here needs to have "read" and "write" permissions. ', 'wp-auth0' ) .
$this->get_docs_link(
'connections/social/twitter#2-get-your-consumer-key-and-consumer-secret',
__( 'Instructions here', 'wp-auth0' )
)
);
}

/**
* Render form field and description for the `social_twitter_secret` option.
* IMPORTANT: Internal callback use only, do not call this function directly!
*
* TODO: Deprecate, functionality removed
*
* @param array $args - callback args passed in from add_settings_field().
*
* @see WP_Auth0_Admin_Generic::init_option_section()
* @see add_settings_field()
*/
public function render_social_twitter_secret( $args = array() ) {
$this->render_text_field( $args['label_for'], $args['opt_name'] );
$this->render_field_description(
__( 'Secret for the app above. ', 'wp-auth0' ) .
$this->get_docs_link(
'connections/social/twitter#2-get-your-consumer-key-and-consumer-secret',
__( 'Instructions here', 'wp-auth0' )
)
);
}

/**
* Render form field and description for the `social_facebook_key` option.
* IMPORTANT: Internal callback use only, do not call this function directly!
*
* TODO: Deprecate, functionality removed
*
* @param array $args - callback args passed in from add_settings_field().
*
* @see WP_Auth0_Admin_Generic::init_option_section()
* @see add_settings_field()
*/
public function render_social_facebook_key( $args = array() ) {
$this->render_text_field( $args['label_for'], $args['opt_name'] );
$this->render_field_description(
__( 'Facebook app key for the Social Amplification Widget. ', 'wp-auth0' ) .
__( 'The app used here needs to have "publish_actions" permission. ', 'wp-auth0' ) .
__( 'Used for the Social Amplification Widget. ', 'wp-auth0' ) .
$this->get_docs_link(
'connections/social/facebook#5-get-your-app-id-and-app-secret',
__( 'Instructions here', 'wp-auth0' )
)
);
}

/**
* Render form field and description for the `social_facebook_secret` option.
* IMPORTANT: Internal callback use only, do not call this function directly!
*
* TODO: Deprecate, functionality removed
*
* @param array $args - callback args passed in from add_settings_field().
*
* @see WP_Auth0_Admin_Generic::init_option_section()
* @see add_settings_field()
*/
public function render_social_facebook_secret( $args = array() ) {
$this->render_text_field( $args['label_for'], $args['opt_name'] );
$this->render_field_description(
__( 'Secret for the app above. ', 'wp-auth0' ) .
$this->get_docs_link(
'connections/social/facebook#5-get-your-app-id-and-app-secret',
__( 'Instructions here', 'wp-auth0' )
)
);
}

/**
* Render form field and description for the `auth0_server_domain` option.
* IMPORTANT: Internal callback use only, do not call this function directly!
Expand Down Expand Up @@ -793,6 +702,97 @@ private function get_domain( $url ) {
return $domain;
}

/*
* DEPRECATED
*/

/**
* Render form field and description for the `social_twitter_key` option.
* IMPORTANT: Internal callback use only, do not call this function directly!
*
* @deprecated - 3.9.0, functionality removed
*
* @param array $args - callback args passed in from add_settings_field().
*
* @codeCoverageIgnore - Deprecated
*/
public function render_social_twitter_key( $args = array() ) {
$this->render_text_field( $args['label_for'], $args['opt_name'] );
$this->render_field_description(
__( 'Twitter app key for the Social Amplification Widget. ', 'wp-auth0' ) .
__( 'The app used here needs to have "read" and "write" permissions. ', 'wp-auth0' ) .
$this->get_docs_link(
'connections/social/twitter#2-get-your-consumer-key-and-consumer-secret',
__( 'Instructions here', 'wp-auth0' )
)
);
}

/**
* Render form field and description for the `social_twitter_secret` option.
* IMPORTANT: Internal callback use only, do not call this function directly!
*
* @deprecated - 3.9.0, functionality removed
*
* @param array $args - callback args passed in from add_settings_field().
*
* @codeCoverageIgnore - Deprecated
*/
public function render_social_twitter_secret( $args = array() ) {
$this->render_text_field( $args['label_for'], $args['opt_name'] );
$this->render_field_description(
__( 'Secret for the app above. ', 'wp-auth0' ) .
$this->get_docs_link(
'connections/social/twitter#2-get-your-consumer-key-and-consumer-secret',
__( 'Instructions here', 'wp-auth0' )
)
);
}

/**
* Render form field and description for the `social_facebook_key` option.
* IMPORTANT: Internal callback use only, do not call this function directly!
*
* @deprecated - 3.9.0, functionality removed
*
* @param array $args - callback args passed in from add_settings_field().
*
* @codeCoverageIgnore - Deprecated
*/
public function render_social_facebook_key( $args = array() ) {
$this->render_text_field( $args['label_for'], $args['opt_name'] );
$this->render_field_description(
__( 'Facebook app key for the Social Amplification Widget. ', 'wp-auth0' ) .
__( 'The app used here needs to have "publish_actions" permission. ', 'wp-auth0' ) .
__( 'Used for the Social Amplification Widget. ', 'wp-auth0' ) .
$this->get_docs_link(
'connections/social/facebook#5-get-your-app-id-and-app-secret',
__( 'Instructions here', 'wp-auth0' )
)
);
}

/**
* Render form field and description for the `social_facebook_secret` option.
* IMPORTANT: Internal callback use only, do not call this function directly!
*
* @deprecated - 3.9.0, functionality removed
*
* @param array $args - callback args passed in from add_settings_field().
*
* @codeCoverageIgnore - Deprecated
*/
public function render_social_facebook_secret( $args = array() ) {
$this->render_text_field( $args['label_for'], $args['opt_name'] );
$this->render_field_description(
__( 'Secret for the app above. ', 'wp-auth0' ) .
$this->get_docs_link(
'connections/social/facebook#5-get-your-app-id-and-app-secret',
__( 'Instructions here', 'wp-auth0' )
)
);
}

/**
* @deprecated - 3.6.0, handled by WP_Auth0_Admin_Features::render_passwordless_enabled()
*
Expand Down
4 changes: 2 additions & 2 deletions lib/twitter-api-php/TwitterAPIExchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
*
* PHP version 5.3.10
*
* @deprecated - 3.9.0, functionality removed
*
* @category Awesomeness
* @package Twitter-API-PHP
* @author James Mallison <me@j7mbo.co.uk>
* @license MIT License
* @version 1.0.4
* @link http://github.com/j7mbo/twitter-api-php
*
* TODO: Deprecate with Amplificator, not used
*/
class TwitterAPIExchange {

Expand Down