Kirki_Helper::get_post_types PHP Method

get_post_types() public static method

Get an array of publicly-querable post-types.
public static get_post_types ( ) : array
return array
        public static function get_post_types()
        {
            $items = array();
            // Get the post types.
            $post_types = get_post_types(array('public' => true), 'objects');
            // Build the array.
            foreach ($post_types as $post_type) {
                $items[$post_type->name] = $post_type->labels->name;
            }
            return $items;
        }