Improve JS array/object detection when outputting the TinyMCE init array.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-05-29 21:18:58 +00:00
parent 2d2f8d4c6f
commit 7536a1107e
1 changed files with 1 additions and 1 deletions

View File

@ -1649,7 +1649,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} || preg_match('/^\(?function ?\(/', $v) ) ) {
} elseif ( is_string($v) && ( ('{' == $v{0} && '}' == $v{strlen($v) - 1}) || ('[' == $v{0} && ']' == $v{strlen($v) - 1}) || preg_match('/^\(?function ?\(/', $v) ) ) {
$mce_options .= $k . ':' . $v . ', ';
continue;
}