Skip to content

Commit

Permalink
fix active theme bug
Browse files Browse the repository at this point in the history
  • Loading branch information
roccotrip committed Jan 9, 2025
1 parent 5c75884 commit 92d3c46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ThemeGarden.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function enqueue_assets( string $hook ): void {
$theme = wp_get_theme();

$active_theme = array(
'id' => $theme->get( 'Name' ),
'id' => get_option('tumblr_theme_id'),
'title' => $theme->get( 'Name' ),
'thumbnail' => $theme->get_screenshot(),
'author_name' => $theme->get( 'Author' ),
Expand Down Expand Up @@ -360,6 +360,7 @@ public function maybe_activate_theme(): void {

// Setup theme option defaults.
$this->option_defaults_helper( $theme_slug, maybe_unserialize( $theme->default_params ) );
add_option('tumblr_theme_id', $theme->id);

// Finally, redirect to the customizer with the new theme active.
switch_theme( $theme_slug );
Expand Down

0 comments on commit 92d3c46

Please sign in to comment.