Yoast\WP\SEO\Conditionals
Get_Request_Conditional{}└─ Conditional
Conditional that is only met when the current request uses the GET method.
Хуков нет.
Использование
$Get_Request_Conditional = new Get_Request_Conditional(); // use class methods
Методы
- public is_met()
Код Get_Request_Conditional{} Get Request Conditional{} Yoast 27.7
class Get_Request_Conditional implements Conditional {
/**
* Returns whether or not this conditional is met.
*
* @return bool Whether or not the conditional is met.
*/
public function is_met() {
if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'GET' ) {
return true;
}
return false;
}
}