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 |
---|---|
961 | * You can use the 'validate_current_theme' filter to return FALSE to |
962 | * disable this functionality. |
963 | * |
964 | * @since 1.5.0 |
965 | * |
966 | * @return bool |
967 | */ |
968 | function validate_current_theme() { |
969 | // Don't validate during an install/upgrade. |
970 | if ( defined('WP_INSTALLING') || !apply_filters( 'validate_current_theme', true ) ) |
971 | return true; |
972 |
|
973 | if ( get_template() != 'default' && !file_exists(get_template_directory() . '/index.php') ) { |
974 | switch_theme('default', 'default'); |
975 | return false; |
976 | } |
977 |
|
978 | if ( get_stylesheet() != 'default' && !file_exists(get_template_directory() . '/style.css') ) { |
979 | switch_theme('default', 'default'); |