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 |
---|---|
677 | */ |
678 | function get_theme_root_uri( $stylesheet_or_template = false ) { |
679 | $theme_roots = get_theme_roots(); |
680 |
|
681 | if ( isset( $theme_roots[$stylesheet_or_template] ) && $theme_roots[$stylesheet_or_template] ) |
682 | $theme_root_uri = content_url( $theme_roots[$stylesheet_or_template] ); |
683 | else |
684 | $theme_root_uri = content_url( 'themes' ); |
685 |
|
686 | return apply_filters( 'theme_root_uri', $theme_root_uri, get_option('siteurl'), $stylesheet_or_template ); |
687 | } |
688 |
|
689 | /** |
690 | * Retrieve path to file without the use of extension. |
691 | * |
692 | * Used to quickly retrieve the path of file without including the file |
693 | * extension. It will also check the parent template, if the file exists, with |
694 | * the use of {@link locate_template()}. Allows for more generic file location |
695 | * without the use of the other get_*_template() functions. |