From d5a7fd1484131632a74740e0f898cb782f244d9d Mon Sep 17 00:00:00 2001 From: Matthew Bernhardt Date: Mon, 17 Aug 2026 16:07:30 -0400 Subject: [PATCH 01/10] Quick cleanup of simple linting errors --- .../class-multisearch-widget.php | 31 +++++++++---------- .../mitlib-multisearch-widget.php | 2 +- .../templates/tab-all-use-v2.php | 2 +- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php b/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php index 9e73e7c6..c5e21c2e 100644 --- a/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php +++ b/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php @@ -84,20 +84,20 @@ public function widget( $args, $instance ) { ); wp_enqueue_style( 'multisearch-tabs' ); - if ( $instance['targets'] != 'use-v2' ) { + if ( $instance['targets'] != 'use-v2' ) { // Render markup. echo ''; echo '
'; echo '

Search the MIT libraries

'; }; - // Render the search tabs only when "Unified Search" option is not selected + // Render the search tabs only when "Unified Search" option is not selected. if ( $instance['targets'] != 'use' && $instance['targets'] != 'use-v2' ) { - + echo ''; + '; - // Render the individual tab panes + // Render the individual tab panes. echo '
'; - include( $all_template ); + include $all_template; echo '
'; echo '
'; - include( $books_template ); + include $books_template; echo '
'; echo '
'; - include( $articles_template ); + include $articles_template; echo '
'; echo '
'; - include( $more_template ); + include $more_template; echo '
'; }; if ( $instance['targets'] == 'use' ) { - + // Determine whether to enable NLS based on widget settings and the user's cookie. $nls_enabled = $this->readCookie( $instance['nls_default'] ); @@ -133,13 +133,12 @@ public function widget( $args, $instance ) { $nls_included = $instance['nls_included']; echo '
'; - include( $all_template ); + include $all_template; echo '
'; }; if ( $instance['targets'] == 'use-v2' ) { - // Determine whether to enable NLS based on widget settings and the user's cookie. $nls_enabled = $this->readCookie( $instance['nls_default'] ); @@ -147,9 +146,7 @@ public function widget( $args, $instance ) { $nls_included = $instance['nls_included']; - include( $all_template ); - - + include $all_template; }; if ( $instance['banner_text'] ) { @@ -170,7 +167,7 @@ public function widget( $args, $instance ) { echo '
'; } - if ( $instance['targets'] != 'use-v2' ) { + if ( $instance['targets'] != 'use-v2' ) { echo ''; }; } diff --git a/web/app/plugins/mitlib-multisearch-widget/mitlib-multisearch-widget.php b/web/app/plugins/mitlib-multisearch-widget/mitlib-multisearch-widget.php index d11b56e5..e7256f60 100644 --- a/web/app/plugins/mitlib-multisearch-widget/mitlib-multisearch-widget.php +++ b/web/app/plugins/mitlib-multisearch-widget/mitlib-multisearch-widget.php @@ -18,7 +18,7 @@ } // Include the necessary classes. -include_once( 'class-multisearch-widget.php' ); +include_once 'class-multisearch-widget.php'; /** * Registers base widget. diff --git a/web/app/plugins/mitlib-multisearch-widget/templates/tab-all-use-v2.php b/web/app/plugins/mitlib-multisearch-widget/templates/tab-all-use-v2.php index 73d21879..2d652e86 100644 --- a/web/app/plugins/mitlib-multisearch-widget/templates/tab-all-use-v2.php +++ b/web/app/plugins/mitlib-multisearch-widget/templates/tab-all-use-v2.php @@ -1,7 +1,7 @@ Date: Mon, 17 Aug 2026 21:31:58 -0400 Subject: [PATCH 02/10] Remove EDS as search option We retired the EBSCO Discovery Service some years ago, but never removed it as an option from the multisearch plugin until now. As we are simplifying this plugin significantly, the first step is to get rid of these templates. --- .../class-multisearch-widget.php | 34 +---- .../mitlib-multisearch-widget.js | 2 - .../templates/tab-all-eds.php | 27 ---- .../templates/tab-articles-eds.php | 70 ----------- .../templates/tab-books-eds.php | 117 ------------------ .../templates/tab-more-eds.php | 53 -------- 6 files changed, 6 insertions(+), 297 deletions(-) delete mode 100644 web/app/plugins/mitlib-multisearch-widget/templates/tab-all-eds.php delete mode 100644 web/app/plugins/mitlib-multisearch-widget/templates/tab-articles-eds.php delete mode 100644 web/app/plugins/mitlib-multisearch-widget/templates/tab-books-eds.php delete mode 100644 web/app/plugins/mitlib-multisearch-widget/templates/tab-more-eds.php diff --git a/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php b/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php index c5e21c2e..b8bee4f7 100644 --- a/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php +++ b/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php @@ -33,18 +33,11 @@ public function __construct() { */ public function widget( $args, $instance ) { // Identify which templates are needed based on instance variable. - $all_template = 'templates/tab-all-eds.php'; - $books_template = 'templates/tab-books-eds.php'; - $articles_template = 'templates/tab-articles-eds.php'; - $articles_tab_name = 'Journals + articles'; - $more_template = 'templates/tab-more-eds.php'; - if ( 'alma' == $instance['targets'] ) { - $all_template = 'templates/tab-all-alma.php'; - $books_template = 'templates/tab-books-alma.php'; - $articles_template = 'templates/tab-articles-alma.php'; - $articles_tab_name = 'Articles + chapters'; - $more_template = 'templates/tab-more-alma.php'; - } + $all_template = 'templates/tab-all-alma.php'; + $books_template = 'templates/tab-books-alma.php'; + $articles_template = 'templates/tab-articles-alma.php'; + $articles_tab_name = 'Articles + chapters'; + $more_template = 'templates/tab-more-alma.php'; if ( 'use' == $instance['targets'] ) { $all_template = 'templates/tab-all-use.php'; } @@ -183,7 +176,7 @@ public function form( $instance ) { $banner_text = $instance['banner_text']; $targets = $instance['targets']; if ( '' == $instance['targets'] ) { - $targets = 'eds'; + $targets = 'alma'; } $bento_url = $instance['bento_url']; if ( '' == $instance['bento_url'] ) { @@ -208,21 +201,6 @@ class="widefat"

Which set of search targets should be shown?