[wp-hackers] adding action to get_footer, get_header etc.
Jennifer Hodgdon
yahgrp at poplarware.com
Wed Jun 3 17:00:04 GMT 2009
This is probably worthy of filing an issue on Trac.
--Jennifer
Aaron Jorbin wrote:
> That's correct Peter.
>
> Using Get_Header as an example:
>
> <code>
> function get_header( $name = null ) {
> do_action( 'get_header' );
>
> $templates = array();
> if ( isset($name) )
> $templates[] = "header-{$name}.php";
>
> $templates[] = "header.php";
>
> if ('' == locate_template($templates, true))
> load_template( get_theme_root() . '/default/header.php');
> }
> </code>
>
> so for example a template could have get_header('home') set in there
> theme template to use the header-home.php file, but when adding an
> action to get_header, I can't figure out how to use $name variable
> that would be set to 'home'.
--
Jennifer Hodgdon * Poplar ProductivityWare
www.poplarware.com
Drupal, WordPress, and custom Web programming
More information about the wp-hackers
mailing list