Skip to content

Commit

Permalink
Add consumer deletion method.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccue committed Dec 13, 2011
1 parent e80172a commit 3b44658
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions provider.php
Expand Up @@ -98,6 +98,10 @@ public static function create_consumer() {
return self::$data->new_consumer();
}

public static function delete_consumer($key) {
return self::$data->delete_consumer($key);
}

public static function request_token($request) {
$token = self::$server->fetch_request_token($request);

Expand Down Expand Up @@ -272,6 +276,14 @@ public function new_consumer() {
return $key;
}

/**
* @param string $consumer_key
* @return boolean
*/
public function delete_consumer($consumer_key) {
return delete_option('wpoa_c_' . $consumer_key, false);
}

/**
* @param OAuthConsumer $consumer
* @return WPOAuthProvider_Token_Request|null
Expand Down

0 comments on commit 3b44658

Please sign in to comment.