Uses
| Uses | Description |
|---|---|
| wp-includes/post-formats.php: get_post_format_strings() | Returns an array of post format slugs to their translated and pretty display versions |
Returns a pretty, translated version of a post format slug
(string) (Required) A post format slug.
(string) The translated post format name.
File: wp-includes/post-formats.php
function get_post_format_string( $slug ) {
$strings = get_post_format_strings();
if ( ! $slug ) {
return $strings['standard'];
} else {
return ( isset( $strings[ $slug ] ) ) ? $strings[ $slug ] : '';
}
} | Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_post_format_string