v1.5.0
This commit is contained in:
parent
8e6a52d8ce
commit
b2849880ec
8 changed files with 91 additions and 16 deletions
|
|
@ -149,7 +149,7 @@ class Robotstxt_Manager_Core_Client {
|
|||
);
|
||||
}
|
||||
|
||||
$response = $this->get( '/plugins' );
|
||||
$response = $this->get( '/me/subscriptions' );
|
||||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
return array(
|
||||
|
|
@ -161,6 +161,13 @@ class Robotstxt_Manager_Core_Client {
|
|||
|
||||
$code = (int) wp_remote_retrieve_response_code( $response );
|
||||
|
||||
if ( 401 === $code ) {
|
||||
return array(
|
||||
'ok' => false,
|
||||
'message' => __( 'Invalid API key. Please check your key and try again.', 'robotstxt-manager' ),
|
||||
);
|
||||
}
|
||||
|
||||
if ( 200 !== $code ) {
|
||||
return array(
|
||||
'ok' => false,
|
||||
|
|
@ -175,7 +182,7 @@ class Robotstxt_Manager_Core_Client {
|
|||
return array(
|
||||
'ok' => true,
|
||||
'message' => __( 'Connected.', 'robotstxt-manager' ),
|
||||
'catalog_count' => $count,
|
||||
'subscriptions' => $count,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue