Skip to content

Commit

Permalink
added header and footer mapping in fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayadav09 committed Aug 21, 2024
1 parent fe195d1 commit 904999f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion includes/Patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ public static function get_fallbacks() {
'about-4' => 'yith-wonder/company-page',
'contact-4' => 'yith-wonder/contact-us',
'testimonials-template-2' => 'yith-wonder/testimonials-page',
'header-1' => 'yith-wonder/site-header-left-logo-navigation-inline',
'header-3' => 'yith-wonder/site-header-centered',
'header-8' => 'yith-wonder/site-header-left-logo-navigation-below',
'header-10' => 'yith-wonder/site-header-splitted-menu',
'footer-15' => 'yith-wonder/site-footer',
),
);
}
Expand Down Expand Up @@ -414,7 +419,8 @@ public static function get_theme_step_patterns_from_step( $step, $squash = false
if ( 'wonder-blocks' === $header_menu_data['type'] ) {
$pattern_slug_data['wonder_blocks'] = $slug;
} else {
$pattern_slug = $slug;
// to update the chosen header from the fallback in the homelayouts page(wp-setup/step/design/homepage-menu)
$pattern_slug_data['wonder_blocks'] = array_search($active_theme . '/' . $slug, self::get_fallbacks()['wonder-blocks']);
}
}
$pattern_slugs[ $pattern_slug ] = $pattern_slug_data;
Expand Down

0 comments on commit 904999f

Please sign in to comment.