[ Index ]
 

Code source de WordPress 2.1.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/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_start', 'wp_adv', 'separator', '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  
  53  initArray = {
  54      mode : "specific_textareas",
  55      editor_selector : "mceEditor",
  56      width : "100%",
  57      theme : "advanced",
  58      theme_advanced_buttons1 : "<?php echo $mce_buttons; ?>",
  59      theme_advanced_buttons2 : "<?php echo $mce_buttons_2; ?>",
  60      theme_advanced_buttons3 : "<?php echo $mce_buttons_3; ?>",
  61      language : "<?php echo strtolower(get_locale()); ?>",
  62      theme_advanced_toolbar_location : "top",
  63      theme_advanced_toolbar_align : "left",
  64      theme_advanced_path_location : "bottom",
  65      theme_advanced_resizing : true,
  66      browsers : "<?php echo $mce_browsers; ?>",
  67      dialog_type : "modal",
  68      theme_advanced_resize_horizontal : false,
  69      convert_urls : false,
  70      relative_urls : false,
  71      remove_script_host : false,
  72      force_p_newlines : true,
  73      force_br_newlines : false,
  74      convert_newlines_to_brs : false,
  75      remove_linebreaks : false,
  76      fix_list_elements : true,
  77      gecko_spellcheck : true,
  78      entities : "38,amp,60,lt,62,gt",
  79      content_css : "<?php echo $mce_css; ?>",
  80      valid_elements : "<?php echo $valid_elements; ?>",
  81      save_callback : 'TinyMCE_wordpressPlugin.saveCallback',
  82      imp_version : "<?php echo intval($_GET['ver']); ?>",
  83  <?php do_action('mce_options'); ?>
  84      plugins : "<?php echo $plugins; ?>"
  85  };
  86  
  87  <?php
  88      // For people who really REALLY know what they're doing with TinyMCE
  89      // You can modify initArray to add, remove, change elements of the config before tinyMCE.init
  90      do_action('tinymce_before_init');
  91  ?>
  92  
  93  tinyMCE.init(initArray);


Généré le : Fri Mar 30 19:41:27 2007 par Balluche grâce à PHPXref 0.7