Inpsyde\MultilingualPress\Module\CustomPostTypeSupport\TypeSafePostTypeRepository::get_custom_post_types PHP Method

get_custom_post_types() public method

Since: 3.0.0
    public function get_custom_post_types()
    {
        if (isset($this->custom_post_types)) {
            return $this->custom_post_types;
        }
        $this->custom_post_types = get_post_types(['_builtin' => false, 'show_ui' => true], 'objects');
        if ($this->custom_post_types) {
            uasort($this->custom_post_types, function ($a, $b) {
                return strcasecmp($a->labels->name, $b->labels->name);
            });
        }
        return $this->custom_post_types;
    }