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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
1117 | $theme_loc = 'wp-content/themes'; |
1118 | $theme_root = ABSPATH.$theme_loc; |
1119 |
|
1120 | $template = get_settings('template'); |
1121 | $stylesheet = get_settings('stylesheet'); |
1122 |
|
1123 | if (($template != 'default') && (!file_exists("$theme_root/$template/index.php"))) { |
1124 | update_option('template', 'default'); |
1125 | update_option('stylesheet', 'default'); |
1126 | do_action('switch_theme', 'Default'); |
1127 | return false; |
1128 | } |
1129 |
|
1130 | if (($stylesheet != 'default') && (!file_exists("$theme_root/$stylesheet/style.css"))) { |
1131 | update_option('template', 'default'); |
1132 | update_option('stylesheet', 'default'); |
1133 | do_action('switch_theme', 'Default'); |
1134 | return false; |
1135 | } |
1136 |
|
1137 | return true; |
1138 | } |
1139 |
|
1140 | function get_broken_themes() { |
1141 | global $wp_broken_themes; |
1142 |
|