get_post_taxonomies

Definition:
function get_post_taxonomies($post = 0) {}

Retrieve all taxonomies of a post with just the names.

Parameters

  • int $post: Optional. Post ID

Source code

function get_post_taxonomies($post = 0) {

	$post =& get_post($post);



	return get_object_taxonomies($post);

}

1615

get_post_status_object

Definition:
function get_post_status_object( $post_status ) {}

Retrieve a post status object by name

Parameters

  • string $post_status: The name of a registered post status

Return values

returns:post status object

Source code

function get_post_status_object( $post_status ) {

	global $wp_post_statuses;



	if ( empty($wp_post_statuses[$post_status]) )

		return null;



	return $wp_post_statuses[$post_status];

}

1613

get_post_statuses

Definition:
function get_post_statuses( ) {}

Retrieve all of the WordPress supported post statuses.
Posts have a limited set of valid status values, this provides the post_status values and descriptions.

Return values

returns:List of post statuses.

Source code

function get_post_statuses( ) {

	$status = array(

		'draft'			=> __('Draft'),

		'pending'		=> __('Pending Review'),

		'private'		=> __('Private'),

		'publish'		=> __('Published')

	);



	return $status;

}

1611

get_post_status

Definition:
function get_post_status($ID = '') {}

Retrieve the post status based on the Post ID.
If the post ID is of an attachment, then the parent post status will be given instead.

Parameters

  • int $ID: Post ID

Return values

returns:Post status or false on failure.

Source code

function get_post_status($ID = '') {

	$post = get_post($ID);



	if ( !is_object($post) )

		return false;



	if ( 'attachment' == $post->post_type ) {

		if ( 'private' == $post->post_status )

			return 'private';



		// Unattached attachments are assumed to be published

		if ( ( 'inherit' == $post->post_status ) && ( 0 == $post->post_parent) )

			return 'publish';



		// Inherit status from the parent

		if ( $post->post_parent && ( $post->ID != $post->post_parent ) )

			return get_post_status($post->post_parent);

	}



	return $post->post_status;

}

1609

get_post_stati

Definition:
function get_post_stati( $args = array() {}

Get a list of all registered post status objects.

Parameters

  • array|string $args: An array of key => value arguments to match against the post status objects.
  • string $output: The type of output to return, either post status ‘names’ or ‘objects’. ‘names’ is the default.
  • string $operator: The logical operation to perform. ‘or’ means only one element from the array needs to match; ‘and’ means all elements must match. The default is ‘and’.

Return values

returns:A list of post type names or objects

Source code

function get_post_stati( $args = array(), $output = 'names', $operator = 'and' ) {

	global $wp_post_statuses;



	$field = ('names' == $output) ? 'name' : false;



	return wp_filter_object_list($wp_post_statuses, $args, $operator, $field);

}

1607