Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/archive-interviewee.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
$interviews = new \WP_Query( $interview_params );
?>

<?php get_header( 'child' ); ?>
<?php get_header(); ?>

<?php get_template_part( 'inc/breadcrumbs', 'child' ); ?>

Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Mitlib\Child;

get_header( 'child' ); ?>
get_header(); ?>

<?php get_template_part( 'inc/breadcrumbs', 'category' ); ?>

Expand Down
38 changes: 0 additions & 38 deletions web/app/themes/mitlib-child/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,44 +122,6 @@ function theme_setup() {
}
add_action( 'after_setup_theme', 'Mitlib\Child\theme_setup' );

/**
* Define a new Menu Style section within the Customizer.
*
* @link https://developer.wordpress.org/themes/customize-api/customizer-objects/
* @param type $wp_customize The Customizer object which we are extending.
*/
function theme_menu_style_customizer( $wp_customize ) {

$wp_customize->add_section(
'menu_style_section',
array(
'title' => 'Menu Style',
)
);

$wp_customize->add_setting(
'menu_style_setting',
array(
'default' => 'Full Menu',
'type' => 'option',
)
);

$wp_customize->add_control(
'menu_style_setting',
array(
'label' => 'Menu Style',
'section' => 'menu_style_section',
'type' => 'radio',
'choices' => array(
'full' => 'Full Menu',
'slim' => 'Slim No Menu',
),
)
);
}
add_action( 'customize_register', 'Mitlib\Child\theme_menu_style_customizer' );

/**
* Define register_child_nav function.
*/
Expand Down
19 changes: 0 additions & 19 deletions web/app/themes/mitlib-child/header-child.php

This file was deleted.

59 changes: 0 additions & 59 deletions web/app/themes/mitlib-child/header-slim.php

This file was deleted.

2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

?>

<?php get_header( 'child' ); ?>
<?php get_header(); ?>

<?php get_template_part( 'inc/breadcrumbs', 'sitename' ); ?>

Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Mitlib\Child;

get_header( 'child' ); ?>
get_header(); ?>

<?php get_template_part( 'inc/breadcrumbs', 'child' ); ?>

Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/single-exhibits.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Mitlib\Child;

get_header( 'child' );
get_header();

get_template_part( 'inc/breadcrumbs', 'child' );

Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/single-interview.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Mitlib\PostTypes;

get_header( 'child' ); // Should be 'moh'?
get_header();

get_template_part( 'inc/breadcrumbs', 'child' );

Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/single.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Mitlib\Child;

get_header( 'child' );
get_header();

get_template_part( 'inc/breadcrumbs', 'child' );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Mitlib\Child;

get_header( 'child' );
get_header();
?>

<?php get_template_part( 'inc/breadcrumbs', 'child' ); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Mitlib\Child;

get_header( 'child' ); ?>
get_header(); ?>

<?php
// Get today's date in the right format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace Mitlib\Child;

get_header( 'child' );
get_header();

// Pages using this template should have one and only one category value. If
// the page is placed in multiple categories, then the first term returned here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Mitlib\Child;

get_header( 'child' );
get_header();
?>

<?php get_template_part( 'inc/breadcrumbs', 'child' ); ?>
Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/templates/page-front.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
?>

<?php get_header( 'child' ); ?>
<?php get_header(); ?>

<?php
if ( is_front_page() ) {
Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/templates/page-full-width.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

?>

<?php get_header( 'child' ); ?>
<?php get_header(); ?>

<?php
if ( is_front_page() ) {
Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/templates/page-posts-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
?>

<?php get_header( 'child' ); ?>
<?php get_header(); ?>

<?php
if ( is_front_page() ) {
Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/templates/page-widgetized.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
?>

<?php get_header( 'child' ); ?>
<?php get_header(); ?>

<?php
if ( is_front_page() ) {
Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-child/templates/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
?>

<?php get_header( 'child' ); ?>
<?php get_header(); ?>

<?php
if ( is_front_page() ) {
Expand Down
38 changes: 38 additions & 0 deletions web/app/themes/mitlib-parent/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,44 @@ function setup_scripts_styles() {
}
add_action( 'wp_enqueue_scripts', 'Mitlib\Parent\setup_scripts_styles' );

/**
* Define a new Menu Style section within the Customizer.
*
* @link https://developer.wordpress.org/themes/customize-api/customizer-objects/
* @param type $wp_customize The Customizer object which we are extending.
*/
function customize_menu_style( $wp_customize ) {

$wp_customize->add_section(
'menu_style_section',
array(
'title' => 'Menu Style',
)
);

$wp_customize->add_setting(
'menu_style_setting',
array(
'default' => 'Full Menu',
'type' => 'option',
)
);

$wp_customize->add_control(
'menu_style_setting',
array(
'label' => 'Menu Style',
'section' => 'menu_style_section',
'type' => 'radio',
'choices' => array(
'full' => 'Full Menu',
'slim' => 'Slim No Menu',
),
)
);
}
add_action( 'customize_register', 'Mitlib\Parent\customize_menu_style' );

/**
* Creates a nicely formatted and more specific title element text
* for output in head of document, based on current view.
Expand Down
16 changes: 13 additions & 3 deletions web/app/themes/mitlib-parent/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

namespace Mitlib\Parent;

$menu = 'full';
if ( 'slim' === get_option( 'menu_style_setting' ) ) {
$menu = 'slim';
}
?><!DOCTYPE html>
<!--[if lte IE 9]><html class="no-js lte-ie9" lang="en"><![endif]-->
<!--[if !(IE 8) | !(IE 9) ]><!-->
Expand Down Expand Up @@ -39,10 +43,16 @@
<div id="skip"><a href="#content">Skip to Main Content</a></div>
<div class="wrap-page">
<header class="header-main flex-container flex-end">
<?php get_template_part( 'inc/nav', 'hamburger' ); ?>
<?php if ( 'full' === $menu ) { ?>
<?php get_template_part( 'inc/nav', 'hamburger' ); ?>
<?php } ?>
<?php get_template_part( 'inc/liblogo' ); ?>
<?php get_template_part( 'inc/nav', 'main' ); ?>
<?php if ( 'full' === $menu ) { ?>
<?php get_template_part( 'inc/nav', 'main' ); ?>
<?php } ?>
<a class="link-logo-mit" href="http://www.mit.edu"><img src="https://cdn.libraries.mit.edu/files/branding/local/mit_logo_std_rgb_white.svg" height="32" alt="MIT logo" >
</a><!-- End MIT Logo -->
<?php get_template_part( 'inc/nav', 'smalldisplays' ); ?>
<?php if ( 'full' === $menu ) { ?>
<?php get_template_part( 'inc/nav', 'smalldisplays' ); ?>
<?php } ?>
</header>