get_post_format_slugs

The timeline below displays how wordpress function get_post_format_slugs has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.4

/**
 * Retrieves the array of post format slugs.
 *
 * @since 3.1.0
 *
 * @return string[] The array of post format slugs as both keys and values.
 */
function get_post_format_slugs()
{
    $slugs = array_keys(get_post_format_strings());
    return array_combine($slugs, $slugs);
}

WordPress Version: 4.9

/**
 * Retrieves the array of post format slugs.
 *
 * @since 3.1.0
 *
 * @return array The array of post format slugs as both keys and values.
 */
function get_post_format_slugs()
{
    $slugs = array_keys(get_post_format_strings());
    return array_combine($slugs, $slugs);
}

WordPress Version: 4.1

/**
 * Retrieves an array of post format slugs.
 *
 * @since 3.1.0
 *
 * @return array The array of post format slugs.
 */
function get_post_format_slugs()
{
    $slugs = array_keys(get_post_format_strings());
    return array_combine($slugs, $slugs);
}

WordPress Version: 3.7

/**
 * Retrieves an array of post format slugs.
 *
 * @since 3.1.0
 *
 * @uses get_post_format_strings()
 *
 * @return array The array of post format slugs.
 */
function get_post_format_slugs()
{
    $slugs = array_keys(get_post_format_strings());
    return array_combine($slugs, $slugs);
}