Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




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ý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics