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.


Parameters

$post_type

(null) (Optional) The optional post type to check.

Default value: null


Top ↑

Return

(bool) Whether we are currently creating a new post, a post of post type(s) or not.


Top ↑

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 );
	}

Top ↑

Changelog

Changelog
Version Description
4.7.7 Introduced.