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. |
Code of get_post_format_slugs() get post format slugs WP 5.6
function get_post_format_slugs() {
$slugs = array_keys( get_post_format_strings() );
return array_combine( $slugs, $slugs );
}