Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get_footer(); in theme_functions.php
#1
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:
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?
Reply
#2
Get footer is for internal use not theme use, it is used for plugin hooks
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
So then how should I include my footer.php file? Just a regular old include(); ?
Reply
#4
Yup
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
http://get-simple.info/wiki/theme:advanced
Reply




Users browsing this thread: 1 Guest(s)