[wp-trac] [WordPress Trac] #27441: SHORTINIT - formatting.php required by some functions

WordPress Trac noreply at wordpress.org
Tue Jul 22 17:22:51 UTC 2014

#27441: SHORTINIT - formatting.php required by some functions
 Reporter:  jesin           |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Bootstrap/Load  |     Version:  3.8.1
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:

Comment (by michalzuber):

 Tried and reproduced with success. I don't know why was that constant
 introduced, but after testing it, it's really a tiny piece from WP core.
 Found some cases where somebody used {{{SHORTINIT}}}:
 * http://wordpress.org/support/topic/load-wp-core-in-another-framework-
 * http://wpengineer.com/2449/load-minimum-of-wordpress/
 * http://kynatro.com/blog/2012/12/11/finally-a-practical-use-for-

 If it will somebody ever use, they just require files that they need.
 It's not stated that everything will work in SHORTINIT environment.
 Error introduced in this ticket pointed out that ''sanitize_*'' functions
 won't work.
 For debugging this, somebody had to call every function in SHORTINIT

 Tried in root dir:
 define( 'SHORTINIT', true );
 require_once( dirname( __FILE__ ) . '/wp-load.php' );
 $funcs = get_defined_functions();
 echo "WordPress $wp_version SHORTINIT functions: <pre>";
 print_r($funcs['user']); echo "</pre>";
 [http://pastebin.com/H3FKEab9 the output] showed 234 functions

Ticket URL: <https://core.trac.wordpress.org/ticket/27441#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list