[wp-trac] [WordPress Trac] #47100: Use WPINC constant in script-loader.php, load-scripts.php, and load-styles.php instead of hardcoded wp-includes directory name

WordPress Trac noreply at wordpress.org
Tue Jul 2 00:52:22 UTC 2019


#47100: Use WPINC constant in script-loader.php, load-scripts.php, and load-
styles.php instead of hardcoded wp-includes directory name
-----------------------------+----------------------
 Reporter:  mwarnermindedge  |       Owner:  (none)
     Type:  enhancement      |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Script Loader    |     Version:  5.1.1
 Severity:  normal           |  Resolution:  invalid
 Keywords:                   |     Focuses:
-----------------------------+----------------------

Comment (by SergeyBiryukov):

 Replying to [comment:4 Ryan_B]:
 > Third, anyone using one of the loaders would need to define WPINC in
 their script before calling the loader. Or better yet, allow wp-config to
 be completly stand alone and not fully load WordPress. That would be a
 simple as moving `require_once( ABSPATH . 'wp-settings.php' );` out of wp-
 config.php and into wp-load.php after the require_once statement for wp-
 config.php then the script loaders could bring in wp-config.php to get teh
 WPINC constant from there if its defined.

 Just wanted to note that this doesn't seem as straightforward in terms of
 backward compatibility. It would require every WordPress user to perform
 the change to `wp-config.php`, which does not seem feasible, since many of
 them may not know where it's located or how to edit it.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47100#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list