geno/wp-content/plugins/mailpoet/lib/Util/Request.php
2024-02-01 11:54:18 +00:00

12 lines
325 B
PHP

<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
namespace MailPoet\Util;
if (!defined('ABSPATH')) exit;
class Request {
public function isPost(): bool {
return isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST' || count($_POST) > 0;
}
}