Make WordPress Core


Ignore:
Timestamp:
08/09/2008 05:36:14 AM (16 years ago)
Author:
ryan
Message:

Trailing whitespace cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/tinymce/tiny_mce_config.php

    r8517 r8600  
    1 <?php 
     1<?php
    22// some code below is from:
    33/**
     
    6969$plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'wpeditimage' );
    7070
    71 /* 
     71/*
    7272The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'.
    73 It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin. 
    74 The url should be absolute and should include the js file name to be loaded. Example: 
     73It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin.
     74The url should be absolute and should include the js file name to be loaded. Example:
    7575array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' )
    7676If the plugin uses a button, it should be added with one of the "$mce_buttons" filters.
     
    8080$ext_plugins = "\n";
    8181if ( ! empty($mce_external_plugins) ) {
    82    
     82
    8383    /*
    8484    The following filter loads external language files for TinyMCE plugins.
    85     It takes an associative array 'plugin_name' => 'path', where path is the 
    86     include path to the file. The language file should follow the same format as 
    87     /tinymce/langs/wp-langs.php and should define a variable $strings that 
    88     holds all translated strings. Example: 
     85    It takes an associative array 'plugin_name' => 'path', where path is the
     86    include path to the file. The language file should follow the same format as
     87    /tinymce/langs/wp-langs.php and should define a variable $strings that
     88    holds all translated strings. Example:
    8989    $strings = 'tinyMCE.addI18n("' . $mce_locale . '.mypluginname_dlg",{tab_general:"General", ... })';
    9090    */
    91     $mce_external_languages = apply_filters('mce_external_languages', array()); 
    92    
     91    $mce_external_languages = apply_filters('mce_external_languages', array());
     92
    9393    $loaded_langs = array();
    9494    $strings = '';
    95    
     95
    9696    if ( ! empty($mce_external_languages) ) {
    9797        foreach ( $mce_external_languages as $name => $path ) {
    98             if ( is_file($path) && is_readable($path) ) { 
     98            if ( is_file($path) && is_readable($path) ) {
    9999                include_once($path);
    100100                $ext_plugins .= $strings;
     
    105105
    106106    foreach ( $mce_external_plugins as $name => $url ) {
    107        
     107
    108108        if ( is_ssl() ) $url = str_replace('http://', 'https://', $url);
    109        
     109
    110110        $plugins[] = '-' . $name;
    111111
     
    127127$mce_buttons_3 = apply_filters('mce_buttons_3', array());
    128128$mce_buttons_3 = implode($mce_buttons_3, ',');
    129    
     129
    130130$mce_buttons_4 = apply_filters('mce_buttons_4', array());
    131131$mce_buttons_4 = implode($mce_buttons_4, ',');
     
    196196
    197197// Cache path, this is where the .gz files will be stored
    198 $cache_path = WP_CONTENT_DIR . '/uploads/js_cache'; 
     198$cache_path = WP_CONTENT_DIR . '/uploads/js_cache';
    199199if ( $disk_cache && ! is_dir($cache_path) )
    200200    $disk_cache = wp_mkdir_p($cache_path);
     
    204204$theme = ( 'simple' == $initArray['theme'] ) ? 'simple' : 'advanced';
    205205$language = ( isset($initArray['language']) && ! empty($initArray['language']) ) ? substr( $initArray['language'], 0, 2 ) : 'en';
    206 $cacheKey = $mce_options = ''; 
     206$cacheKey = $mce_options = '';
    207207
    208208// Check if browser supports gzip
     
    225225            $cacheKey .= $n;
    226226    }
    227    
     227
    228228    $cacheKey = md5( $cacheKey );
    229229    $cache_file = $cache_path . '/tinymce_' . $cacheKey . $cache_ext;
     
    239239
    240240    $mtime = gmdate("D, d M Y H:i:s", filemtime($cache_file)) . " GMT";
    241    
     241
    242242    if ( isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $_SERVER['HTTP_IF_MODIFIED_SINCE'] == $mtime ) {
    243243        header('HTTP/1.1 304 Not Modified');
     
    248248
    249249    $content = getFileContents( $cache_file );
    250    
     250
    251251    if ( '.gz' == $cache_ext )
    252252        header( 'Content-Encoding: gzip' );
     
    256256}
    257257
    258 foreach ( $initArray as $k => $v ) 
     258foreach ( $initArray as $k => $v )
    259259    $mce_options .= $k . ':"' . $v . '",';
    260260
     
    278278
    279279// Add plugins
    280 foreach ( $plugins as $plugin ) 
     280foreach ( $plugins as $plugin )
    281281    $content .= getFileContents( 'plugins/' . $plugin . '/editor_plugin.js' );
    282282
    283 // Add external plugins 
     283// Add external plugins
    284284$content .= $ext_plugins;
    285285
Note: See TracChangeset for help on using the changeset viewer.