acf_get_post_status_label()ACF 6.1.0

Function acf_get_post_status_label()

This function will return a pretty label for a specific post_status

Хуков нет.

Возвращает

Строку. The post status label.

Использование

acf_get_post_status_label( $post_status );
$post_status(строка) (обязательный)
The post status.

Список изменений

С версии 6.1.0 Введена.

Код acf_get_post_status_label() ACF 6.4.2

function acf_get_post_status_label( $post_status ) {
	$label = $post_status;
	$obj   = get_post_status_object( $post_status );
	$label = is_object( $obj ) ? $obj->label : '';

	return $label;
}