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 |
---|---|
199 | * @param string $theme_root Theme root. |
200 | * @param WP_Error|void $_child If this theme is a parent theme, the child may be passed for validation purposes. |
201 | */ |
202 | public function __construct( $theme_dir, $theme_root, $_child = null ) { |
203 | global $wp_theme_directories; |
204 |
|
205 | // Initialize caching on first run. |
206 | if ( ! isset( self::$persistently_cache ) ) { |
207 | /** This action is documented in wp-includes/theme.php */ |
208 | self::$persistently_cache = apply_filters( 'wp_cache_themes_persistently', false, 'WP_Theme' ); |
209 | if ( self::$persistently_cache ) { |
210 | wp_cache_add_global_groups( 'themes' ); |
211 | if ( is_int( self::$persistently_cache ) ) |
212 | self::$cache_expiration = self::$persistently_cache; |
213 | } else { |
214 | wp_cache_add_non_persistent_groups( 'themes' ); |
215 | } |
216 | } |
217 |
|