Source View: get_footer

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
70       * The hook allows a specific footer template file to be used in place of the
71       * default footer template file. If your file is called footer-new.php,
72       * you would specify the filename in the hook as get_footer( 'new' ).
73       *
74       * @since 2.1.0
75       * @since 2.8.0 $name parameter added.
76       *
77       * @param string $name Name of the specific footer file to use.
78       */
79      do_action( 'get_footer', $name );
80
81      $templates = array();
82      $name = (string) $name;
83      if ( '' !== $name )
84           $templates[] = "footer-{$name}.php";
85
86      $templates[] = 'footer.php';
87
88      // Backward compat code will be removed in a future release