packages/kirki-framework/core/src/Helper.php
public static function get_post_types() {
		$items = [];

		// Get the post types.
		$post_types = get_post_types(
			[
				'public' => true,
			],
			'objects'
		);

		// Build the array.
		foreach ( $post_types as $post_type ) {
			$items[ $post_type->name ] = $post_type->labels->name;
		}

		return $items;
	}
public static function get_post_types() {
		$items = [];

		// Get the post types.
		$post_types = get_post_types(
			[
				'public' => true,
			],
			'objects'
		);

		// Build the array.
		foreach ( $post_types as $post_type ) {
			$items[ $post_type->name ] = $post_type->labels->name;
		}

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

@static
@access public
@return array
Get an array of publicly - querable post - types .