| 1 |
<?php |
| 2 |
|
| 3 |
namespace Yoast\WP\SEO\Conditionals; |
| 4 |
|
| 5 |
/** |
| 6 |
* Conditional that is only met when the current request uses the GET method. |
| 7 |
*/ |
| 8 |
class Get_Request_Conditional implements Conditional { |
| 9 |
|
| 10 |
/** |
| 11 |
* Returns whether or not this conditional is met. |
| 12 |
* |
| 13 |
* @return bool Whether or not the conditional is met. |
| 14 |
*/ |
| 15 |
public function is_met() { |
| 16 |
if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'GET' ) { |
| 17 |
return true; |
| 18 |
} |
| 19 |
|
| 20 |
return false; |
| 21 |
} |
| 22 |
} |
| 23 |
|