Make WordPress Core


Ignore:
Timestamp:
11/05/2010 03:04:13 AM (13 years ago)
Author:
markjaquith
Message:

get_post_format_string() to get nice version of a post format slug. Try appending post format as a post-status label. Enclose in square brackets to help it stand out. Remove post format strings filter. If this is going to be standard, it should be standard. see #14746

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r16196 r16198  
    52305230        'video'   => _x( 'Video',   'Post format' )
    52315231    );
    5232     return apply_filters( 'post_format_strings', $strings );
     5232    return $strings;
     5233}
     5234
     5235/**
     5236 * Returns a pretty, translated version of a post format slug
     5237 *
     5238 * @param string $slug A post format slug
     5239 * @return string The translated post format name
     5240 */
     5241function get_post_format_string( $slug ) {
     5242    $strings = get_post_format_strings();
     5243    return ( isset( $strings[$slug] ) ) ? $strings[$slug] : '';
    52335244}
    52345245
Note: See TracChangeset for help on using the changeset viewer.