TwentTen functions parsing order with child template

Here’s the parsing order of TwentyTen theme:

The ‘after_setup_theme’ function is where you would unload an action, filter or change parameters etc:

In the parents functions.php there is a line:
if ( ! function_exists( 'twentyten_posted_on' ) ) :
This tells wordpress to only load the function if it has not already been loaded, as the child themes functions.php is run first our function is already loaded.

So the sequence is:
1. child themes functions.php
2. parent themes functions.php (any conditional functions already loaded then skip em!)
3. back to the child themes function ‘after_setup_theme’ run this to unload any parent actions or functions, declare any new variables etc

 

http://wordpress.org/support/topic/can-i-create-child-functionsphp-file-for-twentyten

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>