| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/wincher-account-action.php.tar |
home/xbodynamge/www/wp-content/plugins/wordpress-seo/src/actions/wincher/wincher-account-action.php 0000644 00000002715 15113254435 0030023 0 ustar 00 <?php
namespace Yoast\WP\SEO\Actions\Wincher;
use Yoast\WP\SEO\Config\Wincher_Client;
use Yoast\WP\SEO\Helpers\Options_Helper;
/**
* Class Wincher_Account_Action
*/
class Wincher_Account_Action {
const ACCOUNT_URL = 'https://api.wincher.com/beta/account';
/**
* The Wincher_Client instance.
*
* @var Wincher_Client
*/
protected $client;
/**
* The Options_Helper instance.
*
* @var Options_Helper
*/
protected $options_helper;
/**
* Wincher_Account_Action constructor.
*
* @param Wincher_Client $client The API client.
* @param Options_Helper $options_helper The options helper.
*/
public function __construct( Wincher_Client $client, Options_Helper $options_helper ) {
$this->client = $client;
$this->options_helper = $options_helper;
}
/**
* Checks the account limit for tracking keyphrases.
*
* @return object The response object.
*/
public function check_limit() {
// Code has already been validated at this point. No need to do that again.
try {
$results = $this->client->get( self::ACCOUNT_URL );
$usage = $results['limits']['keywords']['usage'];
$limit = $results['limits']['keywords']['limit'];
return (object) [
'canTrack' => \is_null( $limit ) || $usage < $limit,
'limit' => $limit,
'usage' => $usage,
'status' => 200,
];
} catch ( \Exception $e ) {
return (object) [
'status' => $e->getCode(),
'error' => $e->getMessage(),
];
}
}
}
crosstraining/wp-content/plugins/wordpress-seo/src/actions/wincher/wincher-account-action.php 0000644 00000002715 15114076614 0032007 0 ustar 00 home/xbodynamge <?php
namespace Yoast\WP\SEO\Actions\Wincher;
use Yoast\WP\SEO\Config\Wincher_Client;
use Yoast\WP\SEO\Helpers\Options_Helper;
/**
* Class Wincher_Account_Action
*/
class Wincher_Account_Action {
const ACCOUNT_URL = 'https://api.wincher.com/beta/account';
/**
* The Wincher_Client instance.
*
* @var Wincher_Client
*/
protected $client;
/**
* The Options_Helper instance.
*
* @var Options_Helper
*/
protected $options_helper;
/**
* Wincher_Account_Action constructor.
*
* @param Wincher_Client $client The API client.
* @param Options_Helper $options_helper The options helper.
*/
public function __construct( Wincher_Client $client, Options_Helper $options_helper ) {
$this->client = $client;
$this->options_helper = $options_helper;
}
/**
* Checks the account limit for tracking keyphrases.
*
* @return object The response object.
*/
public function check_limit() {
// Code has already been validated at this point. No need to do that again.
try {
$results = $this->client->get( self::ACCOUNT_URL );
$usage = $results['limits']['keywords']['usage'];
$limit = $results['limits']['keywords']['limit'];
return (object) [
'canTrack' => \is_null( $limit ) || $usage < $limit,
'limit' => $limit,
'usage' => $usage,
'status' => 200,
];
} catch ( \Exception $e ) {
return (object) [
'status' => $e->getCode(),
'error' => $e->getMessage(),
];
}
}
}
lebauwcentre/wp-content/plugins/wordpress-seo/src/actions/wincher/wincher-account-action.php 0000644 00000002715 15114232140 0031566 0 ustar 00 home/xbodynamge <?php
namespace Yoast\WP\SEO\Actions\Wincher;
use Yoast\WP\SEO\Config\Wincher_Client;
use Yoast\WP\SEO\Helpers\Options_Helper;
/**
* Class Wincher_Account_Action
*/
class Wincher_Account_Action {
const ACCOUNT_URL = 'https://api.wincher.com/beta/account';
/**
* The Wincher_Client instance.
*
* @var Wincher_Client
*/
protected $client;
/**
* The Options_Helper instance.
*
* @var Options_Helper
*/
protected $options_helper;
/**
* Wincher_Account_Action constructor.
*
* @param Wincher_Client $client The API client.
* @param Options_Helper $options_helper The options helper.
*/
public function __construct( Wincher_Client $client, Options_Helper $options_helper ) {
$this->client = $client;
$this->options_helper = $options_helper;
}
/**
* Checks the account limit for tracking keyphrases.
*
* @return object The response object.
*/
public function check_limit() {
// Code has already been validated at this point. No need to do that again.
try {
$results = $this->client->get( self::ACCOUNT_URL );
$usage = $results['limits']['keywords']['usage'];
$limit = $results['limits']['keywords']['limit'];
return (object) [
'canTrack' => \is_null( $limit ) || $usage < $limit,
'limit' => $limit,
'usage' => $usage,
'status' => 200,
];
} catch ( \Exception $e ) {
return (object) [
'status' => $e->getCode(),
'error' => $e->getMessage(),
];
}
}
}
xbodynamge/namtation/wp-content/plugins/wordpress-seo/src/actions/wincher/wincher-account-action.php0000644 00000002715 15115165612 0031112 0 ustar 00 home <?php
namespace Yoast\WP\SEO\Actions\Wincher;
use Yoast\WP\SEO\Config\Wincher_Client;
use Yoast\WP\SEO\Helpers\Options_Helper;
/**
* Class Wincher_Account_Action
*/
class Wincher_Account_Action {
const ACCOUNT_URL = 'https://api.wincher.com/beta/account';
/**
* The Wincher_Client instance.
*
* @var Wincher_Client
*/
protected $client;
/**
* The Options_Helper instance.
*
* @var Options_Helper
*/
protected $options_helper;
/**
* Wincher_Account_Action constructor.
*
* @param Wincher_Client $client The API client.
* @param Options_Helper $options_helper The options helper.
*/
public function __construct( Wincher_Client $client, Options_Helper $options_helper ) {
$this->client = $client;
$this->options_helper = $options_helper;
}
/**
* Checks the account limit for tracking keyphrases.
*
* @return object The response object.
*/
public function check_limit() {
// Code has already been validated at this point. No need to do that again.
try {
$results = $this->client->get( self::ACCOUNT_URL );
$usage = $results['limits']['keywords']['usage'];
$limit = $results['limits']['keywords']['limit'];
return (object) [
'canTrack' => \is_null( $limit ) || $usage < $limit,
'limit' => $limit,
'usage' => $usage,
'status' => 200,
];
} catch ( \Exception $e ) {
return (object) [
'status' => $e->getCode(),
'error' => $e->getMessage(),
];
}
}
}