check_theme_switched [ WordPress Function ]
check_theme_switched ( No parameters )
| Defined at: |
|
Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load
Source
<?php
function check_theme_switched() {
if ( $stylesheet = get_option( 'theme_switched' ) ) {
$old_theme = wp_get_theme( $stylesheet );
if ( $old_theme->exists() )
do_action( 'after_switch_theme', $old_theme->get('Name'), $old_theme );
else
do_action( 'after_switch_theme', $stylesheet );
update_option( 'theme_switched', false );
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- check_theme_switched
Function and Method Cross Reference. check_theme_switched(). Defined at: /wp -includes/theme.php -> line 1550. No references found.
phpxref.ftwr.co.uk - check_theme_switched (WordPress Function) - WPSeek.com
WordPress lookup for check_theme_switched, a WordPress Function. wpseek. com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - check_theme_switched | A HitchHackers guide through WordPress
Dec 13, 2011 ... function check_theme_switched() { if ( false !== ( $old_theme = get_option( ' theme_switched' ) ) && !empty( $old_theme ) ) { do_action( ...
hitchhackerguide.com - check_theme_switched() WordPress function reference, arguments ...
Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load.
queryposts.com