block_core_latest_posts_get_excerpt_length

函式
block_core_latest_posts_get_excerpt_length ( No parameters )
返回值
  • (int) Returns the global $block_core_latest_posts_excerpt_length variable to allow the excerpt_length filter respect the Latest Block setting.
定義位置
相關方法
block_core_latest_posts_migrate_categoriesrender_block_core_latest_postsrender_block_core_post_excerptregister_block_core_latest_postsregister_block_core_post_excerpt
引入
-
棄用
-

block_core_latest_posts_get_excerpt_length: 該函式用於獲取最新文章塊的摘錄長度。它從該塊的設定或全域性excelpt_length選項中獲取該值。

在渲染時,最新文章塊使用的excelpt_length過濾器的回撥。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function block_core_latest_posts_get_excerpt_length() {
global $block_core_latest_posts_excerpt_length;
return $block_core_latest_posts_excerpt_length;
}
function block_core_latest_posts_get_excerpt_length() { global $block_core_latest_posts_excerpt_length; return $block_core_latest_posts_excerpt_length; }
function block_core_latest_posts_get_excerpt_length() {
	global $block_core_latest_posts_excerpt_length;
	return $block_core_latest_posts_excerpt_length;
}

常見問題

FAQs
檢視更多 >