Tribe__Events__Admin__Event_Meta_Box::is_auto_draft()
Check if the Event is an Auto-Draft
Return
(bool)
Source
File: src/Tribe/Admin/Event_Meta_Box.php
public function is_auto_draft() {
if ( ! $this->event instanceof WP_Post ) {
return true;
}
if ( ! $this->event->ID ) {
return true;
}
// Fetch Status to check what we need to do
$status = get_post_status( $this->event->ID );
if ( ! $status || 'auto-draft' === $status ) {
return true;
}
// By the end it's non-draft event
return false;
}
Changelog
| Version | Description |
|---|---|
| 4.4 | Introduced. |