/** * Returns the list of property statuses. * * @return array */ public function get_post_statuses() { $all = 0; $_attrs = \WPP_F::get_all_attribute_values('post_status'); $attrs = array(); if (is_array($_attrs)) { foreach ($_attrs as $attr) { $count = \WPP_F::get_properties_quantity(array($attr)); switch ($attr) { case 'publish': $label = __('Published', $this->get('domain')); $all += $count; break; case 'pending': $label = __('Pending', $this->get('domain')); $all += $count; break; case 'trash': $label = __('Trashed', $this->get('domain')); break; case 'auto-draft': $label = __('Auto-Draft', $this->get('domain')); break; default: $label = strtoupper(substr($attr, 0, 1)) . substr($attr, 1, strlen($attr)); $all += $count; } $attrs[$attr] = $label . ' (' . \WPP_F::format_numeric($count) . ')'; } } else { return array(); } $attrs['any'] = __('Any', $this->get('domain')) . ' (' . \WPP_F::format_numeric($all) . ')'; ksort($attrs); return $attrs; }