set_value($value); } /** * Get the translated label. * * @since 0.9.2 * @return null|string The translated label if any. */ public function get_label() { switch ($this->value) { case self::PUBLISH: $label = __('Publish', 'affilicious'); break; case self::FUTURE: $label = __('Future', 'affilicious'); break; case self::DRAFT: $label = __('Draft', 'affilicious'); break; case self::PENDING: $label = __('Pending', 'affilicious'); break; case self::_PRIVATE: $label = __('Private', 'affilicious'); break; case self::TRASH: $label = __('Trash', 'affilicious'); break; case self::AUTO_DRAFT: $label = __('Auto draft', 'affilicious'); break; case self::INHERIT: $label = __('Inherit', 'affilicious'); break; default: $label = null; } $label = apply_filters('aff_common_status_label', $label, $this->value); return $label; } }