acf_get_post_status_label()
Function acf_get_post_status_label()
This function will return a pretty label for a specific post_status
No Hooks.
Returns
String. The post status label.
Usage
acf_get_post_status_label( $post_status );
- $post_status(string) (required)
- The post status.
Changelog
| Since 6.1.0 | Introduced. |
acf_get_post_status_label() acf get post status label code ACF 6.8.8
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;
}