From 867e587f36526f7413d7bf951d85ebe8dd88ec7c Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Wed, 21 Feb 2024 12:57:14 +0530 Subject: [PATCH 1/2] Replace menu items in previews with those from the sitemap. --- includes/Patterns.php | 16 +++++++++++++--- includes/Services/SiteGenService.php | 26 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/includes/Patterns.php b/includes/Patterns.php index 653195e..a74d0be 100644 --- a/includes/Patterns.php +++ b/includes/Patterns.php @@ -1,6 +1,7 @@ SiteGenService::get_dummy_navigation_menu_items(), + 'wp-setup' => $default_items, + 'ecommerce' => $default_items, + ); + + $current_flow = Data::current_flow(); + return isset( $flow_to_dummy_items[ $current_flow ] ) ? $flow_to_dummy_items[ $current_flow ] : $default_items; } /** @@ -357,7 +367,7 @@ private static function replace_split_menu_items( $pattern_content ) { $dummy_menu_grammar = ''; $menu_navigation_grammar = ''; - foreach ( self::get_dummy_menu_items() as $item ) { + foreach ( self::get_dummy_navigation_menu_items() as $item ) { $dummy_menu_grammar = '