[wp-trac] [WordPress Trac] #13084: Loading Parent Theme functions BEFORE Child Theme functions

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 22 15:43:16 UTC 2010


#13084: Loading Parent Theme functions BEFORE Child Theme functions
--------------------------+-------------------------------------------------
 Reporter:  oncletom      |       Owner:                      
     Type:  defect (bug)  |      Status:  new                 
 Priority:  normal        |   Milestone:  Unassigned          
Component:  Themes        |     Version:  2.9.2               
 Severity:  normal        |    Keywords:  parent, child, theme
--------------------------+-------------------------------------------------
 Hello,

 I am creating a child theme for a mobile purpose.
 The goal was to complete parent theme's functions.php and modify already
 configured behavior from the child theme to improve things.

 It would be more logical that child theme's functions.php be loaded AFTER
 parent theme's one... like it is done for template file overloading.

 The parent theme is not aware of the child one.[[BR]]
 The opposite is true.

 {{{
 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH .
 '/functions.php') )
         include(STYLESHEETPATH . '/functions.php');
 if ( file_exists(TEMPLATEPATH . '/functions.php') )
         include(TEMPLATEPATH . '/functions.php');
 }}}

 should be replaced by
 {{{
 if ( file_exists(TEMPLATEPATH . '/functions.php') )
         include(TEMPLATEPATH . '/functions.php');
 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH .
 '/functions.php') )
         include(STYLESHEETPATH . '/functions.php');
 }}}

 in wp-settings.php

 Patch is attached.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13084>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list