Yoast\WP\SEO\Conditionals
Wincher_Token_Conditional{}└─ Conditional
Conditional that is only met when the Wincher token is set.
Хуков нет.
Использование
$Wincher_Token_Conditional = new Wincher_Token_Conditional(); // use class methods
Методы
- public __construct( Wincher_Client $client )
- public is_met()
Код Wincher_Token_Conditional{} Wincher Token Conditional{} Yoast 26.9
class Wincher_Token_Conditional implements Conditional {
/**
* The Wincher client.
*
* @var Wincher_Client
*/
private $client;
/**
* Wincher_Token_Conditional constructor.
*
* @param Wincher_Client $client The Wincher client.
*/
public function __construct( Wincher_Client $client ) {
$this->client = $client;
}
/**
* Returns whether this conditional is met.
*
* @return bool Whether the conditional is met.
*/
public function is_met() {
return $this->client->has_valid_tokens();
}
}