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 a0_render_message method #558

Merged
merged 2 commits into from
Oct 5, 2018
Merged
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
28 changes: 16 additions & 12 deletions WP_Auth0.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,18 +271,6 @@ public function a0_register_query_vars( $qvars ) {
return $qvars;
}

// TODO: Deprecate, not used
public function a0_render_message() {
$message = null;

if ( $message ) {
echo "<div class=\"a0-message\">$message <small onclick=\"jQuery('.a0-message').hide();\">(Close)</small></div>";
echo '<script type="text/javascript">
setTimeout(function(){jQuery(".a0-message").hide();}, 10 * 1000);
</script>';
}
}

/**
* Add settings link on plugin page.
*/
Expand Down Expand Up @@ -494,6 +482,22 @@ private function autoloader( $class ) {
*
*/

/**
* @deprecated - 3.8.0, not used and no replacement provided.
*
* @codeCoverageIgnore - Deprecated
*/
public function a0_render_message() {
$message = null;

Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this print the warning like you do in other methods?

trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED );

if ( $message ) {
echo "<div class=\"a0-message\">$message <small onclick=\"jQuery('.a0-message').hide();\">(Close)</small></div>";
echo '<script type="text/javascript">
setTimeout(function(){jQuery(".a0-message").hide();}, 10 * 1000);
</script>';
}
}

/**
* @deprecated - 3.8.0, not used and no replacement provided.
*
Expand Down