From a212495dc3290986b3a27f84e3542ebb1f16d150 Mon Sep 17 00:00:00 2001 From: Matt Bernhardt Date: Tue, 3 May 2022 16:16:27 -0400 Subject: [PATCH] Convert content below hours grid to a widget area ** Why are these changes being introduced: * As the Libraries have re-opened, there have been a number of changes to the currently-static-HTML content below the hours grid. In order to allow us to change this content more responsively as the organization evolves, this converts that static content into a widget area so that changes don't require code updates. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/uxws-1367 ** How does this address that need: * This takes out the static content from page-hours-json.php and replaces it with a new sidebar area. As part of the deploy of this, I will create and populate a widget with the static content. ** Document any side effects to this change: * The actual markup around this content will change, but not in a way that will be visible to the user or a search engine. --- functions.php | 9 +++++++++ page-hours-json.php | 21 ++++----------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/functions.php b/functions.php index e99b4b6a..414afdfa 100644 --- a/functions.php +++ b/functions.php @@ -353,6 +353,15 @@ function mitlib_widgets_init() { 'after_title' => '', ) ); + register_sidebar( array( + 'name' => __( 'Below Hours Grid Area', 'twentytwelve' ), + 'id' => 'sidebar-below-hours-grid', + 'description' => __( 'Appears below the grid of library hours, allowing for widgets to describe locations that do not appear on the grid.', 'twentytwelve' ), + 'before_widget' => '', + 'before_title' => '

', + 'after_title' => '

', + ) ); } add_action( 'widgets_init', 'mitlib_widgets_init' ); diff --git a/page-hours-json.php b/page-hours-json.php index 30c299a8..f144f2f0 100644 --- a/page-hours-json.php +++ b/page-hours-json.php @@ -376,23 +376,10 @@ - -
-

Locations without hours

- -

Building 9 book drop

-

Map:  9-Samuel Tak Lee Building

- -

Digital Instruction Resource Center (DIRC)

-

Map:  14N-132

- -

Stata Center Book Drop

-

Map:  32-Student Street

- -

Physics Reading Room

-

Building 4-332 | 617.253.1791
- Tan-Quy Tran, Reading Room Assistant

-
+ + + +