[wp-trac] [WordPress Trac] #3790: Change exit's to return's in
 template-loader.php
    WordPress Trac 
    wp-trac at lists.automattic.com
       
    Wed Feb 14 16:11:56 GMT 2007
    
    
  
#3790: Change exit's to return's in template-loader.php
--------------------------+-------------------------------------------------
 Reporter:  Otto42        |       Owner:  anonymous
     Type:  enhancement   |      Status:  new      
 Priority:  lowest        |   Milestone:  2.3      
Component:  Optimization  |     Version:           
 Severity:  trivial       |    Keywords:           
--------------------------+-------------------------------------------------
 All the exit statements in template-loader.php cause the script to
 terminate at that point (after the blog has been rendered). This early
 termination makes it difficult to include Wordpress as a piece of a larger
 page, as script execution will end here instead of continuing to whatever
 is after it.
 These exits are actually unnecessary, but they do reduce execution time
 (in theory). As such, changing these exits to returns will have the same
 effect. Execution of template-loader.php will end early (as desired) and
 it will continue back to blog-header.php (where template-loader.php was
 require_once'd from). From there it will return back to index.php and thus
 end execution. But the use of returns will allow other packages to
 include('index.php') to create the blog within their own page area,
 allowing a greater level of customization without having to hack the main
 Wordpress source.
 So the request is to change all "exit;" statements to "return;" statements
 in template-loader.php.
-- 
Ticket URL: <http://trac.wordpress.org/ticket/3790>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
    
    
More information about the wp-trac
mailing list