get_post_format_slugs()WP 3.1.0

Retrieves the array of post format slugs.

No Hooks.

Return

String[]. The array of post format slugs as both keys and values.

Usage

get_post_format_slugs();

Changelog

Since 3.1.0 Introduced.

get_post_format_slugs() code WP 6.4.3

function get_post_format_slugs() {
	$slugs = array_keys( get_post_format_strings() );
	return array_combine( $slugs, $slugs );
}