Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: taxonomy_template

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.

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
1993           $post =& get_post($post);
1994      elseif ( !is_object($post) )
1995           $post =& $GLOBALS['post'];
1996
1997      $taxonomies = array();
1998
1999      if ( !$post )
2000           return $taxonomies;
2001
2002      $template = apply_filters('taxonomy_template', '%s: %l.');
2003
2004      foreach ( get_object_taxonomies($post) as $taxonomy ) {
2005           $t = (array) get_taxonomy($taxonomy);
2006           if ( empty($t['label']) )
2007                $t['label'] = $taxonomy;
2008           if ( empty($t['args']) )
2009                $t['args'] = array();
2010           if ( empty($t['template']) )
2011                $t['template'] = $template;