[wp-trac] [WordPress Trac] #20055: Load .dev.js scripts for TinyMCE plugins if $concatenate_scripts == false

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 17 20:51:17 UTC 2012


#20055: Load .dev.js scripts for TinyMCE plugins if $concatenate_scripts == false
-------------------------+------------------------------
 Reporter:  ericlewis    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  TinyMCE      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by azaozz):

 Replying to [comment:1 nacin]:
 > The script-loader a while back got polluted with globals
 $concatenate_scripts, $compress_scripts, and $compress_css. This is silly
 as we also have constants for this, and also a site option called
 'can_compress_scripts'. None of these are canonical. It's silly to have
 all of these settings.

 Agreed. Now most of these aren't needed. At the time of adding them few
 years ago, some web servers had different issues when compressing scripts
 from PHP (disregarding headers, double compressing, etc.) that seem
 (mostly?) resolved now.

 > Hypothetically, setting tinyMCEPreInit.suffix to be '.dev' is enough to
 load editor_plugin.dev.js files.

 Right, the problem here is mostly with MCE plugins added by WP plugins not
 having .dev.js files and also with the default MCE plugins having slightly
 different naming scheme (_src.js vs. .dev.js).

 The other part is that MCE plugins are not loaded through script_loader.
 They are loaded by MCE using non-blocking methods. So force-loading
 everything as in 1.diff above would not work well. MCE has a debug mode
 loading/init we should use for that. The only requirement would be to
 rename our custom plugins that are in the MCE's plugins directory from
 .dev.js to _src.js. There doesn't seem to be a problem with that as
 currently the .dev.js files there are not used anywhere (they are
 distributed only as sources for the editor_plugin.js files).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20055#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list