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 |
|---|---|
| 500 | |
| 501 | /** |
| 502 | * Filters whether to get the cache of the registered theme directories. |
| 503 | * |
| 504 | * @since 3.4.0 |
| 505 | * |
| 506 | * @param bool $cache_expiration Whether to get the cache of the theme directories. Default false. |
| 507 | * @param string $context The class or function name calling the filter. |
| 508 | */ |
| 509 | $cache_expiration = apply_filters( 'wp_cache_themes_persistently', false, 'search_theme_directories' ); |
| 510 | |
| 511 | if ( $cache_expiration ) { |
| 512 | $cached_roots = get_site_transient( 'theme_roots' ); |
| 513 | if ( is_array( $cached_roots ) ) { |
| 514 | foreach ( $cached_roots as $theme_dir => $theme_root ) { |
| 515 | // A cached theme root is no longer around, so skip it. |
| 516 | if ( ! isset( $relative_theme_roots[ $theme_root ] ) ) { |
| 517 | continue; |
| 518 | } |