PodsField_Pick::data_post_stati PHP Method

data_post_stati() public method

Data callback for Post Stati
Since: 2.3
public data_post_stati ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array
$name string The name of the field
$value string | array The value of the field
$options array Field options
$pod array Pod data
$id integer Item ID
return array
    public function data_post_stati($name = null, $value = null, $options = null, $pod = null, $id = null)
    {
        $data = array();
        $post_stati = get_post_stati(array(), 'objects');
        foreach ($post_stati as $post_status) {
            $data[$post_status->name] = $post_status->label;
        }
        return apply_filters('pods_form_ui_field_pick_' . __FUNCTION__, $data, $name, $value, $options, $pod, $id);
    }