From 904999f1b69bb2d78135f8d5f237e424519ee432 Mon Sep 17 00:00:00 2001 From: ajayadav09 Date: Thu, 22 Aug 2024 03:28:47 +0530 Subject: [PATCH] added header and footer mapping in fallback --- includes/Patterns.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/Patterns.php b/includes/Patterns.php index 694ffaa..823bbda 100644 --- a/includes/Patterns.php +++ b/includes/Patterns.php @@ -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', ), ); } @@ -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;