diff --git a/src/Posts/Post.php b/src/Posts/Post.php index 710b0fa..6ae2685 100644 --- a/src/Posts/Post.php +++ b/src/Posts/Post.php @@ -98,12 +98,12 @@ public DateTimeImmutable $post_date { get => new DateTimeImmutable($this->get(Posts::POST_DATE->value)); - set (DateTimeImmutable $post_date) => $this->set(Posts::POST_DATE->value, $post_date->format(static::DATETIME_FORMAT)); + set (DateTimeImmutable $post_date) => $this->set(Posts::POST_DATE->value, $post_date->format(static::DATETIME_FORMAT), $post_date); } public DateTimeImmutable $post_date_gmt { get => new DateTimeImmutable($this->get(Posts::POST_DATE_GMT->value)); - set (DateTimeImmutable $post_date_gmt) => $this->set(Posts::POST_DATE_GMT->value, $post_date_gmt->format(static::DATETIME_FORMAT)); + set (DateTimeImmutable $post_date_gmt) => $this->set(Posts::POST_DATE_GMT->value, $post_date_gmt->format(static::DATETIME_FORMAT), $post_date_gmt); } public string $post_content { @@ -158,17 +158,17 @@ public DateTimeImmutable $post_modified { get => new DateTimeImmutable($this->get(Posts::POST_MODIFIED->value)); - set (DateTimeImmutable $post_modified) => $this->set(Posts::POST_MODIFIED->value, $post_modified->format(static::DATETIME_FORMAT)); + set (DateTimeImmutable $post_modified) => $this->set(Posts::POST_MODIFIED->value, $post_modified->format(static::DATETIME_FORMAT), $post_modified); } public DateTimeImmutable $post_modified_gmt { get => new DateTimeImmutable($this->get(Posts::POST_MODIFIED_GMT->value)); - set (DateTimeImmutable $post_modified_gmt) => $this->set(Posts::POST_MODIFIED_GMT->value, $post_modified_gmt->format(static::DATETIME_FORMAT)); + set (DateTimeImmutable $post_modified_gmt) => $this->set(Posts::POST_MODIFIED_GMT->value, $post_modified_gmt->format(static::DATETIME_FORMAT), $post_modified_gmt); } public Post|false|null $post_parent { get => $this->get(Posts::POST_PARENT->value) !== 0 ? new self($this->get(Posts::POST_PARENT->value)) : null; - set (Post|false|null $post_parent) => $this->set(Posts::POST_PARENT->value, $post_parent ? $post_parent->id : 0); + set (Post|false|null $post_parent) => $this->set(Posts::POST_PARENT->value, $post_parent ? $post_parent->id : 0, $post_parent); } public string $guid {