tell tinymce to also allow <script> tags

This commit is contained in:
Ben Word
2012-01-15 16:24:39 -07:00
parent 8ca5847f32
commit 898f3a3cb0

View File

@@ -448,9 +448,9 @@ add_action('admin_init', 'roots_notice_tagline_ignore');
// was set in wp-config.php to avoid DB bloat
if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', 5);
// allow more tags in TinyMCE including iframes
// allow more tags in TinyMCE including <iframe> and <script>
function roots_change_mce_options($options) {
$ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]';
$ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src],script[charset|defer|language|src|type]';
if (isset($initArray['extended_valid_elements'])) {
$options['extended_valid_elements'] .= ',' . $ext;
} else {