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