wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_post_statuses › WordPress Function

Od2.5.0
Przestarzałyn/a
get_post_statuses ( Brak parametrów )
Powrót:
  • (string[]) Array of post status labels keyed by their status.
Zdefiniowane na:
Codex:

Retrieves all of the WordPress supported post statuses.

Posts have a limited set of valid status values, this provides the post_status values and descriptions.


Źródło

function get_post_statuses() {
	$status = array(
		'draft'   => __( 'Draft' ),
		'pending' => __( 'Pending Review' ),
		'private' => __( 'Private' ),
		'publish' => __( 'Published' ),
	);

	return $status;
}