get_post_format_slugs

函式
get_post_format_slugs ( No parameters )
返回值
  • (string[]) The array of post format slugs as both keys and values.
定義位置
相關方法
get_post_format_stringsget_post_format_stringget_post_formatget_post_format_linkset_post_format
引入
3.1.0
棄用
-

get_post_format_slugs函式返回所有註冊的post-format_slug的陣列。它不帶任何引數。

檢索文章格式slug的陣列。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function get_post_format_slugs() {
$slugs = array_keys( get_post_format_strings() );
return array_combine( $slugs, $slugs );
}
function get_post_format_slugs() { $slugs = array_keys( get_post_format_strings() ); return array_combine( $slugs, $slugs ); }
function get_post_format_slugs() {
	$slugs = array_keys( get_post_format_strings() );
	return array_combine( $slugs, $slugs );
}

常見問題

FAQs
檢視更多 >