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 |
|---|---|
| 642 | */ |
| 643 | function get_theme_root_uri( $stylesheet_or_template = false ) { |
| 644 | $theme_roots = get_theme_roots(); |
| 645 | |
| 646 | if ( $theme_roots[$stylesheet_or_template] ) |
| 647 | $theme_root_uri = content_url( $theme_roots[$stylesheet_or_template] ); |
| 648 | else |
| 649 | $theme_root_uri = content_url( 'themes' ); |
| 650 | |
| 651 | return apply_filters( 'theme_root_uri', $theme_root_uri, get_option('siteurl'), $stylesheet_or_template ); |
| 652 | } |
| 653 | |
| 654 | /** |
| 655 | * Retrieve path to file without the use of extension. |
| 656 | * |
| 657 | * Used to quickly retrieve the path of file without including the file |
| 658 | * extension. It will also check the parent template, if the file exists, with |
| 659 | * the use of {@link locate_template()}. Allows for more generic file location |
| 660 | * without the use of the other get_*_template() functions. |