From 23371dca96b787f21d47e9510e6fa32dcb9c9d05 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Thu, 24 Aug 2017 16:10:27 -0300 Subject: [PATCH] Switch to menu instead of widget for right network footer block. --- app/admin.php | 4 ++++ app/setup.php | 14 +++++++++----- resources/views/partials/footer.blade.php | 10 +++------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/app/admin.php b/app/admin.php index d8b08d5..f17c22f 100644 --- a/app/admin.php +++ b/app/admin.php @@ -14,6 +14,10 @@ add_action('customize_register', function (\WP_Customize_Manager $wp_customize) bloginfo('name'); } ]); + $wp_customize->add_section('social-media', [ + 'title' => __('Social Media','aldine'), + 'priority' => 30, + ]); }); /** diff --git a/app/setup.php b/app/setup.php index 4d48ae2..b44dcfc 100644 --- a/app/setup.php +++ b/app/setup.php @@ -50,7 +50,7 @@ add_action('wp_enqueue_scripts', function () { ); wp_enqueue_script('aldine/main.js', asset_path('scripts/main.js'), ['jquery'], null, true); wp_enqueue_script('uio.js', get_theme_file_uri() . '/lib/infusion/infusion-uiOptions.js', ['jquery'], null, true); - wp_localize_script('aldine/main.js', 'SAGE_DIST_PATH', get_theme_file_uri('dist/')); + wp_localize_script('aldine/main.js', 'SAGE_DIST_PATH', get_theme_file_uri() . '/dist/'); }, 100); /** @@ -63,6 +63,14 @@ add_action('after_setup_theme', function () { */ add_theme_support('title-tag'); + /** + * Register navigation menus + * @link https://developer.wordpress.org/reference/functions/register_nav_menus/ + */ + register_nav_menus([ + 'network-footer-menu' => __('Network Footer Menu', 'aldine') + ]); + /** * Enable post thumbnails * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ @@ -126,10 +134,6 @@ add_action('widgets_init', function () { 'name' => __('Network Footer Block 2', 'aldine'), 'id' => 'network-footer-block-2' ] + $config); - register_sidebar([ - 'name' => __('Network Footer Block 3', 'aldine'), - 'id' => 'network-footer-block-3' - ] + $config); }); /** diff --git a/resources/views/partials/footer.blade.php b/resources/views/partials/footer.blade.php index aa78c94..631b59e 100644 --- a/resources/views/partials/footer.blade.php +++ b/resources/views/partials/footer.blade.php @@ -1,6 +1,5 @@