'wpcf7_contact_form', 'posts_per_page' => 1, 'orderby' => 'ID', 'order' => 'DESC', 'post_status' => 'publish', 'fields' => 'ids', ) ); return ! empty( $forms ) ? (int) $forms[0] : null; } public static function get_days_since( int $timestamp ): int { $datetime_now = new \DateTime( 'now' ); $datetime_from = new \DateTime( '@' . $timestamp ); $diff = date_diff( $datetime_now, $datetime_from ); return (int) $diff->format( '%a' ); } private function __construct() {} private function __clone() {} public function __wakeup() { throw new \Exception( 'Cannot unserialize singleton' ); } }