Skip to content

Commit

Permalink
use initial instance
Browse files Browse the repository at this point in the history
  • Loading branch information
willpercey-gb committed Jun 10, 2020
1 parent 928d793 commit 74b1778
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Extends/WP_Post_Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ public function __construct(?\WP_Post $post = null)
private function _use(): void
{
global $post;
$this->the_post = $post;
if (!$this->the_post) {
$this->the_post = $post;
}
}

private static function instance(): WP_Post_Extension
Expand Down

0 comments on commit 74b1778

Please sign in to comment.