Make WordPress Core

Changeset 28081


Ignore:
Timestamp:
04/11/2014 10:16:01 PM (10 years ago)
Author:
azaozz
Message:

Don't include the non-minified tinymce.js in /build. Load it when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG). Props nacin, fixes #27739

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r27847 r28081  
    5757                            '!wp-includes/js/underscore.js',
    5858                            '!wp-includes/js/jquery/jquery.masonry.js',
     59                            '!wp-includes/js/tinymce/tinymce.js',
    5960                            '!wp-includes/version.php' // Exclude version.php
    6061                        ],
  • trunk/src/wp-includes/class-wp-editor.php

    r28071 r28081  
    10811081
    10821082        $baseurl = self::$baseurl;
     1083        // Load tinymce.js when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG)
     1084        $mce_suffix = false !== strpos( $GLOBALS['wp_version'], '-src' ) ? '' : '.min';
    10831085
    10841086        if ( $tmce_on ) {
     
    10861088                echo "<script type='text/javascript' src='{$baseurl}/wp-tinymce.php?c=1&amp;$version'></script>\n";
    10871089            } else {
    1088                 echo "<script type='text/javascript' src='{$baseurl}/tinymce.js?$version'></script>\n";
     1090                echo "<script type='text/javascript' src='{$baseurl}/tinymce{$mce_suffix}.js?$version'></script>\n";
    10891091                echo "<script type='text/javascript' src='{$baseurl}/plugins/compat3x/plugin{$suffix}.js?$version'></script>\n";
    10901092            }
  • trunk/src/wp-includes/js/tinymce/wp-tinymce.php

    r23120 r28081  
    3333    echo $file;
    3434} else {
    35     echo get_file($basepath . '/tiny_mce.js');
    36     echo get_file($basepath . '/wp-tinymce-schema.js');
     35    // Back compat. This file shouldn't be used if this condition can occur (as in, if gzip isn't accepted).
     36    echo get_file( $basepath . '/tinymce.min.js' );
     37    echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
    3738}
    3839exit;
Note: See TracChangeset for help on using the changeset viewer.