From 0755cc0543779bb2232a9717f492063118ac70f3 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Fri, 27 Aug 2021 13:14:31 +0100 Subject: [PATCH 01/10] Blockbase: Add social navigation to blockbase themes --- blockbase/functions.php | 7 ++++--- mayland-blocks/block-template-parts/header.html | 1 + mayland-blocks/functions.php | 7 ------- quadrat/functions.php | 7 ------- seedlet-blocks/block-template-parts/header.html | 2 ++ seedlet-blocks/functions.php | 7 ------- skatepark/functions.php | 8 -------- 7 files changed, 7 insertions(+), 32 deletions(-) diff --git a/blockbase/functions.php b/blockbase/functions.php index 9c3e2c2e33..ce288fca8a 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' ) ) ); @@ -193,8 +194,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 = '