public function afterSwitchTheme() {
		$this->clearCache();
		foreach ( $this->getTabs() as $slug => $subclass ) {
			/** @var \Pressbooks\Options $subclass (not instantiated, just a string) */
			$current_options = get_option( "pressbooks_theme_options_{$slug}", [] );
			if ( ! empty( $current_options ) ) {
				update_option( "pressbooks_theme_options_{$slug}", $subclass::filterDefaults( $current_options ) );
			}
		}
	}
public function afterSwitchTheme() {
		$this->clearCache();
		foreach ( $this->getTabs() as $slug => $subclass ) {
			/** @var \Pressbooks\Options $subclass (not instantiated, just a string) */
			$current_options = get_option( "pressbooks_theme_options_{$slug}", [] );
			if ( ! empty( $current_options ) ) {
				update_option( "pressbooks_theme_options_{$slug}", $subclass::filterDefaults( $current_options ) );
			}
		}
	}
public function afterSwitchTheme ( ) { $ this -> clearCache ( ) ; foreach ( $ this -> getTabs ( ) as $ slug => $ subclass ) { /** @var \Pressbooks\Options $subclass (not instantiated, just a string) */ $ current_options = get_option ( "pressbooks_theme_options_{$slug}" , [ ] ) ; if ( ! empty ( $ current_options ) ) { update_option ( "pressbooks_theme_options_{$slug}" , $ subclass :: filterDefaults ( $ current_options ) ) ; } } }
Override saved options with filtered defaults when switching theme
Override saved options with filtered defaults when switching theme