PHP Cross Reference of WordPress Subversion HEAD

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]

title

Body

[close]

/wp-includes/js/tinymce/ -> tiny_mce_config.php (source)

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


Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs Cross-referenced by PHPXref 0.6 and RedAlt