get_post_format_strings() - WordPress 函数参考中文文档

返回介绍

get_post_format_strings()

发布于 2017-09-10 字数1942 浏览 921 评论 0

get_post_format_strings()

Returns an array of post format slugs to their translated and pretty display versions


描述


返回值

(array) The array of translated post format names.


源代码

File: wp-includes/post-formats.php

function get_post_format_strings() {
	$strings = array(
		'standard' => _x( 'Standard', 'Post format' ), // Special case. any value that evals to false will be considered standard
		'aside'    => _x( 'Aside',    'Post format' ),
		'chat'     => _x( 'Chat',     'Post format' ),
		'gallery'  => _x( 'Gallery',  'Post format' ),
		'link'     => _x( 'Link',     'Post format' ),
		'image'    => _x( 'Image',    'Post format' ),
		'quote'    => _x( 'Quote',    'Post format' ),
		'status'   => _x( 'Status',   'Post format' ),
		'video'    => _x( 'Video',    'Post format' ),
		'audio'    => _x( 'Audio',    'Post format' ),
	);
	return $strings;
}

更新日志

Version 描述
3.1.0 Introduced.

相关函数

Uses

  • wp-includes/l10n.php:
    _x()

Used By

  • wp-includes/post-formats.php:
    get_post_format_slugs()
  • wp-includes/post-formats.php:
    get_post_format_string()
  • wp-includes/class-wp-xmlrpc-server.php:
    wp_xmlrpc_server::mw_editPost()
  • wp-includes/class-wp-xmlrpc-server.php:
    wp_xmlrpc_server::mw_newPost()
  • wp-includes/class-wp-xmlrpc-server.php:
    wp_xmlrpc_server::wp_getPostFormats()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!