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 |
|---|---|
| 401 | |
| 402 | // This is the same as get_theme_file_path(), which isn't available in load-styles.php context |
| 403 | if ( $stylesheet_directory !== $template_directory && file_exists( $stylesheet_directory . '/theme.json' ) ) { |
| 404 | $path = $stylesheet_directory . '/theme.json'; |
| 405 | } else { |
| 406 | $path = $template_directory . '/theme.json'; |
| 407 | } |
| 408 | |
| 409 | /** This filter is documented in wp-includes/link-template.php */ |
| 410 | $path = apply_filters( 'theme_file_path', $path, 'theme.json' ); |
| 411 | |
| 412 | $theme_has_support[ $stylesheet ] = file_exists( $path ); |
| 413 | |
| 414 | return $theme_has_support[ $stylesheet ]; |
| 415 | } |
| 416 | |
| 417 | /** |
| 418 | * Cleans the caches under the theme_json group. |
| 419 | * |