Skip to content

Commit

Permalink
autoload meta fields
Browse files Browse the repository at this point in the history
  • Loading branch information
hokoo committed Aug 21, 2021
1 parent 6cfba04 commit 78a3775
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wpPostAbleTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ private function loadPost( int $post_id ): self {

$this->post = $post;

if ( $this->applyFilters( '\wpPostAbleTrait\loadPost\loadMeta', true, $this ) ) {
$this->post_meta = get_post_meta( $this->post->ID );
}

$this->doActionRef( '\wpPostAbleTrait\loadPost\loading', [ & $this ] );
return $this;
}
Expand Down

0 comments on commit 78a3775

Please sign in to comment.