render_block_core_shortcode

函式
render_block_core_shortcode ( $attributes, $content )
引數
  • (array) $attributes The block attributes.
    Required:
  • (string) $content The block content.
    Required:
返回值
  • (string) Returns the block content.
定義位置
相關方法
register_block_core_shortcoderender_block_core_coverrender_block_core_post_daterender_block_core_post_contentrender_block_core_tag_cloud
引入
-
棄用
-

render_block_core_shortcode: 這個函式用於在WordPress中渲染一個短碼塊。短碼允許使用者通過在一個塊中輸入一段簡短的程式碼來為他們的網站新增複雜的功能: 這個函式負責生成短碼塊的HTML標記,使用者可以自定義。

對短碼區塊內容執行wpautop()。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function render_block_core_shortcode( $attributes, $content ) {
return wpautop( $content );
}
function render_block_core_shortcode( $attributes, $content ) { return wpautop( $content ); }
function render_block_core_shortcode( $attributes, $content ) {
	return wpautop( $content );
}

常見問題

FAQs
檢視更多 >