name ] = $post_type_object; } } return $return; } /** * acfe_get_pretty_post_statuses * * Similar to acf_get_pretty_post_types() but for Post Statuses * * @param array $posts_statuses * * @return array */ function acfe_get_pretty_post_statuses($posts_statuses = array()){ if(empty($posts_statuses)){ $posts_statuses = get_post_stati(array(), 'names'); } $return = array(); // Choices if(!empty($posts_statuses)){ foreach($posts_statuses as $post_status){ $post_status_object = get_post_status_object($post_status); $return[$post_status_object->name] = $post_status_object->label . ' (' . $post_status_object->name . ')'; } } return $return; }