Tribe__Context::is_new_post( null $post_type = null )
Whether we are currently creating a new post, a post of post type(s) or not.
Contents
Parameters
- $post_type
-
(null) (Optional) The optional post type to check.
Default value: null
Return
(bool) Whether we are currently creating a new post, a post of post type(s) or not.
Source
File: src/Tribe/Context.php
public function is_new_post( $post_type = null ) {
global $pagenow;
$is_new = 'post-new.php' === $pagenow;
return $is_new && $this->is_editing_post( $post_type );
}
Changelog
| Version | Description |
|---|---|
| 4.7.7 | Introduced. |