确定TinyMCE是否可用。
原型
rich_edit_exists()
描述
检查用户是否删除了tinymce文件以减少其WordPress安装。
返回值
(bool)
是否存在TinyMCE。
源文件
路径:wp-includes/deprecated.php
<?php
...
function rich_edit_exists() {
global $wp_rich_edit_exists;
_deprecated_function( __FUNCTION__, '3.9.0' );
if ( ! isset( $wp_rich_edit_exists ) )
$wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' );
return $wp_rich_edit_exists;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/rich_edit_exists/