• In my theme I expect switch_theme to be enacted when I change away from my theme; however, it is never firing; I even put in a nonsense function to call hoping to get an error, with nothing.

    function my_deinit () {
      echo "<script>console.log('In my_deinit');</script>";
      my_do_caps( 'remove_cap' );
      my_clear_taxonomy( 'persondepartments' );
    }
    add_action('switch_theme', 'my_deinitzzz');
Viewing 1 replies (of 1 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Try outputting to a debug log file instead. I believe a reload occurs immediately after the theme is switched, so you wouldn’t see any output unless you interrupted the process with a die; or similar. But outputting to a file will let you know what’s going on.

Viewing 1 replies (of 1 total)
  • The topic ‘action 'switch_theme' not firing’ is closed to new replies.