How/Where is editor.min.js Added to the wp-admin Post Page?

How/Where is the wp-admin/js/editor.min.js file added to the backend WordPress post editing page (wp-admin/post.php)? How could I change this to use the non-minified file?

I’m working on a browser extension that will interact with a WordPress installation. I’d like to add some temporary debugging code the the editor.js file. However, in a standard WordPress 3.5.1 site, this file is already minimized, and somehow loaded on the page via a mechanism that isn’t a standard <script/> tag. I’d like to know how the WordPress core team includes (and/or a minimize workflow for) this file.

Put another way, if I wanted to add a feature that required changing editor.js, how would I go about developing that.

Competent programmer here, not super familiar with WordPress’s architecture. In case my words failed me above, I’m not looking to extend WordPress, I’m trying to diagnose existing system behavior.

Thanks in advance!

3 Answers
3

WordPress concatenates scripts via the script-loader.php file.

You can disable the concatenation of scripts by adding this to your wp-config.php:

define('CONCATENATE_SCRIPTS', false);

You can load the non-minified versions by adding this to wp-config.php:

define('SCRIPT_DEBUG', true);

Leave a Comment