the_editor

函式
the_editor ( $content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true )
引數
  • (string) $content Textarea content.
    Required:
  • (string) $id Optional. HTML ID attribute value. Default 'content'.
    Required:
    Default: 'content'
  • (string) $prev_id Optional. Unused.
    Required:
    Default: 'title'
  • (bool) $media_buttons Optional. Whether to display media buttons. Default true.
    Required:
    Default: true
  • (int) $tab_index Optional. Unused.
    Required:
    Default: 2
  • (bool) $extended Optional. Unused.
    Required:
    Default: true
相關
  • wp_editor()
定義位置
相關方法
wp_editorthe_authorthe_generatorthe_metathe_date
引入
2.1.0
棄用
3.3.0

the_editor – 這個函式用來顯示WordPress的文章編輯器。它通常用在WordPress網站的管理方面。它需要幾個引數,允許自定義編輯器,如編輯器的ID和要編輯的內容型別。

顯示一個編輯器。TinyMCE,HTML,或兩者都是。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) );
}
function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) { _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' ); wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) ); }
function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );

	wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) );
}

常見問題

FAQs
檢視更多 >