Browse Source

Switch to menu instead of widget for right network footer block.

pull/8/head
Ned Zimmerman 7 years ago
parent
commit
23371dca96
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 4
      app/admin.php
  2. 14
      app/setup.php
  3. 10
      resources/views/partials/footer.blade.php

4
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,
]);
});
/**

14
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);
});
/**

10
resources/views/partials/footer.blade.php

@ -1,6 +1,5 @@
<footer class="content-info">
<div class="container">
@if(is_active_sidebar('network-footer-block-1') || is_active_sidebar('network-footer-block-2') || is_active_sidebar('network-footer-block-3'))
<section class="network-footer">
@if(is_active_sidebar('network-footer-block-1'))
<div class="network-footer-block network-footer-block-1">
@ -12,13 +11,10 @@
@php(dynamic_sidebar('network-footer-block-2'))
</div>
@endif
@if(is_active_sidebar('network-footer-block-3'))
<div class="network-footer-block network-footer-block-3">
@php(dynamic_sidebar('network-footer-block-3'))
</div>
@endif
<div class="network-footer-block network-footer-menu">
@php(wp_nav_menu('network-footer-menu'))
</div>
</section>
@endif
<section class="pressbooks-footer">
<a class="pressbooks-icon" href="https://pressbooks.com" title="Pressbooks">@php(include get_theme_file_path() . '/dist/' . Aldine\svg_path('images/pb.svg'))</a>
<div class="pressbooks-links">

Loading…
Cancel
Save