wp_tiny_mce

函式
wp_tiny_mce ( $teeny = false, $settings = false )
相關
  • wp_editor()
定義位置
相關方法
wp_nav_menuwp_timezonewp_titlewp_verify_noncewp_trim_excerpt
引入
2.7.0
棄用
3.3.0

wp_tiny_mce: 這個函式查詢TinyMCE JavaScript庫和它的依賴項。TinyMCE是一個流行的、開源的WYSIWYG編輯器,被WordPress用於視覺化編輯器。

輸出TinyMCE編輯器。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_tiny_mce( $teeny = false, $settings = false ) {
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
static $num = 1;
if ( ! class_exists( '_WP_Editors', false ) )
require_once ABSPATH . WPINC . '/class-wp-editor.php';
$editor_id = 'content' . $num++;
$set = array(
'teeny' => $teeny,
'tinymce' => $settings ? $settings : true,
'quicktags' => false
);
$set = _WP_Editors::parse_settings($editor_id, $set);
_WP_Editors::editor_settings($editor_id, $set);
}
function wp_tiny_mce( $teeny = false, $settings = false ) { _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' ); static $num = 1; if ( ! class_exists( '_WP_Editors', false ) ) require_once ABSPATH . WPINC . '/class-wp-editor.php'; $editor_id = 'content' . $num++; $set = array( 'teeny' => $teeny, 'tinymce' => $settings ? $settings : true, 'quicktags' => false ); $set = _WP_Editors::parse_settings($editor_id, $set); _WP_Editors::editor_settings($editor_id, $set); }
function wp_tiny_mce( $teeny = false, $settings = false ) {
	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );

	static $num = 1;

	if ( ! class_exists( '_WP_Editors', false ) )
		require_once ABSPATH . WPINC . '/class-wp-editor.php';

	$editor_id = 'content' . $num++;

	$set = array(
		'teeny' => $teeny,
		'tinymce' => $settings ? $settings : true,
		'quicktags' => false
	);

	$set = _WP_Editors::parse_settings($editor_id, $set);
	_WP_Editors::editor_settings($editor_id, $set);
}

常見問題

FAQs
檢視更多 >