WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
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.
Line | Code |
---|---|
763 | $templates = array(); |
764 |
|
765 | if ( $author ) |
766 | $templates[] = "author-{$author}.php"; |
767 | if ( $author_id ) |
768 | $templates[] = "author-{$author_id}.php"; |
769 | $templates[] = 'author.php'; |
770 |
|
771 | $template = locate_template( $templates ); |
772 | return apply_filters( 'author_template', $template ); |
773 | } |
774 |
|
775 | /** |
776 | * Retrieve path of category template in current or parent template. |
777 | * |
778 | * Works by first retrieving the current slug for example 'category-default.php' and then |
779 | * trying category ID, for example 'category-1.php' and will finally fallback to category.php |
780 | * template, if those files don't exist. |
781 | * |