Allow JS functions in the TinyMCE init array, fixes #15596

git-svn-id: https://develop.svn.wordpress.org/trunk@17522 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2011-03-17 22:01:40 +00:00
parent 04bc9c01cb
commit 80e0029a13

View File

@ -1635,7 +1635,7 @@ function wp_tiny_mce( $teeny = false, $settings = false ) {
$val = $v ? 'true' : 'false';
$mce_options .= $k . ':' . $val . ', ';
continue;
} elseif ( !empty($v) && is_string($v) && ( '{' == $v{0} || '[' == $v{0} ) ) {
} elseif ( !empty($v) && is_string($v) && ( '{' == $v{0} || '[' == $v{0} || preg_match('/^\(?function ?\(/', $v) ) ) {
$mce_options .= $k . ':' . $v . ', ';
continue;
}
@ -1700,4 +1700,4 @@ function wp_tiny_mce_preload_dialogs() { ?>
<div id="preloaded-dialogs" style="display:none;">
<?php do_action('tiny_mce_preload_dialogs'); ?>
</div>
<?php }
<?php }