From a0c7bbe5df6b7a68556972af0358b95887e942b4 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Fri, 27 Aug 2021 13:14:31 +0100 Subject: [PATCH] Blockbase: Add social navigation to blockbase themes --- blockbase/block-template-parts/header.html | 1 + blockbase/functions.php | 7 ++++--- mayland-blocks/block-template-parts/header.html | 1 + mayland-blocks/functions.php | 7 ------- quadrat/block-template-parts/header.html | 1 + quadrat/functions.php | 7 ------- seedlet-blocks/block-template-parts/header.html | 2 ++ seedlet-blocks/functions.php | 7 ------- skatepark/functions.php | 8 -------- 9 files changed, 9 insertions(+), 32 deletions(-) diff --git a/blockbase/block-template-parts/header.html b/blockbase/block-template-parts/header.html index ee9829a999..2a35d35b8e 100644 --- a/blockbase/block-template-parts/header.html +++ b/blockbase/block-template-parts/header.html @@ -4,5 +4,6 @@ + diff --git a/blockbase/functions.php b/blockbase/functions.php index 3fd82103a4..f6335dac75 100644 --- a/blockbase/functions.php +++ b/blockbase/functions.php @@ -30,10 +30,11 @@ function blockbase_support() { ) ); - // This theme has one menu location. + // Register two nav menus register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'blockbase' ), + 'social' => __( 'Social Navigation', 'blockbase' ) ) ); @@ -191,8 +192,8 @@ function blockbase_social_menu_render( $block_content, $block ) { $nav_menu_locations = get_nav_menu_locations(); $social_menu_id = $nav_menu_locations['social']; $class_name = 'is-style-logos-only'; - if( !empty( $block['attrs']['itemsJustification'] ) && $block['attrs']['itemsJustification'] === 'right' ) { - $class_name .= ' items-justified-right'; + if( !empty( $block['attrs']['itemsJustification'] ) ) { + $class_name .= ' items-justified-' . $block['attrs']['itemsJustification']; } $block_content = '