2014-01-21, 11:26:15
Should the get_footer() function within the theme_functions.php file not look for a file called footer.php in the Themes folder first?
Like this:
This way I can simply add the file footer.php to my theme and it appears where <?php get_footer(); ?> is placed.
Or Am I not understanding the proper use of the get_footer() function?
Like this:
PHP Code:
/**
* Get Page Footer HTML
*
* This will return footer html for a particular page. Right now
* this function only executes a plugin hook so developers can hook into
* the bottom of a site's template.
*
* @since 2.0
* @uses exec_action
*
* @return string HTML for template header
*/
function get_footer() {
global $SITEURL;
global $TEMPLATE;
$footer = trim("theme/" . $TEMPLATE . '/footer.php');
if(stream_resolve_include_path($footer)){
include_once($footer);
get_scripts_frontend(TRUE);
exec_action('theme-footer');
} else {
get_scripts_frontend(TRUE);
exec_action('theme-footer');
}
}
This way I can simply add the file footer.php to my theme and it appears where <?php get_footer(); ?> is placed.
Or Am I not understanding the proper use of the get_footer() function?