get_post_format_slugs

Retrieves an array of post format slugs.

Description

(array) get_post_format_slugs(); 

Returns (array)

The array of post format slugs.


Usage

  1. if ( !function_exists( 'get_post_format_slugs' ) ) { 
  2. require_once ABSPATH . WPINC . '/post-formats.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_post_format_slugs(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/post-formats.php  
  1. function get_post_format_slugs() { 
  2. $slugs = array_keys( get_post_format_strings() ); 
  3. return array_combine( $slugs, $slugs );