| [ Index ] |
WordPress Source Cross Reference |
[Summary view] [Print] [Text view]
1 <?php 2 @ require('../../../wp-config.php'); 3 4 function wp_translate_tinymce_lang($text) { 5 if ( ! function_exists('__') ) { 6 return $text; 7 } else { 8 $search1 = "/^tinyMCELang\\[(['\"])(.*)\\1\]( ?= ?)(['\"])(.*)\\4/Uem"; 9 $replace1 = "'tinyMCELang[\\1\\2\\1]\\3'.stripslashes('\\4').__('\\5').stripslashes('\\4')"; 10 11 $search2 = "/ : (['\"])(.*)\\1/Uem"; 12 $replace2 = "' : '.stripslashes('\\1').__('\\2').stripslashes('\\1')"; 13 14 $search = array($search1, $search2); 15 $replace = array($replace1, $replace2); 16 17 $text = preg_replace($search, $replace, $text); 18 19 return $text; 20 } 21 } 22 23 // Set up init variables 24 $valid_elements = 'p/-div[*],-b[*],-font[*],-ul[*],-ol[*],-li[*],*[*]'; 25 $valid_elements = apply_filters('mce_valid_elements', $valid_elements); 26 27 $plugins = array('inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress'); 28 $plugins = apply_filters('mce_plugins', $plugins); 29 $plugins = implode($plugins, ','); 30 31 $mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', 'link', 'unlink', 'image', 'wp_more', 'separator', 'spellchecker', 'separator', 'code', 'wp_help', 'wp_adv_start', 'wp_adv', 'separator', 'formatselect', 'underline', 'justifyfull', 'forecolor', 'separator', 'pastetext', 'pasteword', 'separator', 'removeformat', 'cleanup', 'separator', 'charmap', 'separator', 'undo', 'redo', 'wp_adv_end')); 32 $mce_buttons = implode($mce_buttons, ','); 33 34 $mce_buttons_2 = apply_filters('mce_buttons_2', array()); 35 $mce_buttons_2 = implode($mce_buttons_2, ','); 36 37 $mce_buttons_3 = apply_filters('mce_buttons_3', array()); 38 $mce_buttons_3 = implode($mce_buttons_3, ','); 39 40 $mce_browsers = apply_filters('mce_browsers', array('msie', 'gecko', 'opera', 'safari')); 41 $mce_browsers = implode($mce_browsers, ','); 42 43 $mce_popups_css = get_option('siteurl') . '/wp-includes/js/tinymce/plugins/wordpress/popups.css'; 44 $mce_css = get_option('siteurl') . '/wp-includes/js/tinymce/plugins/wordpress/wordpress.css'; 45 $mce_css = apply_filters('mce_css', $mce_css); 46 ?> 47 48 initArray = { 49 mode : "specific_textareas", 50 editor_selector : "mceEditor", 51 width : "100%", 52 theme : "advanced", 53 theme_advanced_buttons1 : "<?php echo $mce_buttons; ?>", 54 theme_advanced_buttons2 : "<?php echo $mce_buttons_2; ?>", 55 theme_advanced_buttons3 : "<?php echo $mce_buttons_3; ?>", 56 language : "<?php echo strtolower(get_locale()); ?>", 57 theme_advanced_toolbar_location : "top", 58 theme_advanced_toolbar_align : "left", 59 theme_advanced_path_location : "bottom", 60 theme_advanced_resizing : true, 61 browsers : "<?php echo $mce_browsers; ?>", 62 dialog_type : "modal", 63 theme_advanced_resize_horizontal : false, 64 convert_urls : false, 65 relative_urls : false, 66 remove_script_host : false, 67 force_p_newlines : true, 68 force_br_newlines : false, 69 convert_newlines_to_brs : false, 70 remove_linebreaks : false, 71 fix_list_elements : true, 72 content_css : "<?php echo $mce_css; ?>", 73 valid_elements : "<?php echo $valid_elements; ?>", 74 save_callback : 'TinyMCE_wordpressPlugin.saveCallback', 75 imp_version : "<?php echo intval($_GET['ver']); ?>", 76 <?php do_action('mce_options'); ?> 77 plugins : "<?php echo $plugins; ?>" 78 }; 79 80 <?php 81 // For people who really REALLY know what they're doing with TinyMCE 82 // You can modify initArray to add, remove, change elements of the config before tinyMCE.init 83 do_action('tinymce_before_init'); 84 ?> 85 86 tinyMCE.init(initArray);
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sat Jul 15 11:57:04 2006 | Courtesy of Taragana |