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
22 changes: 22 additions & 0 deletions web/app/themes/mitlib-news/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,28 @@ function remove_parent_widgets() {
}
add_action( 'widgets_init', 'Mitlib\News\remove_parent_widgets', 11 );

/**
* Expands the category display, for categories that are not Bibliotech issues,
* to include content from all post types (Spotlights and Bibliotech articles,
* in addition to Posts).
*
* @param object $request A request object.
*/
function expand_category_scope( $request ) {
$vars = $request->query_vars;
if ( is_category() && ! is_category( 'bibliotech' ) && ! array_key_exists( 'post_type', $vars ) ) :
$vars = array_merge(
$vars,
array(
'post_type' => 'any',
)
);
$request->query_vars = $vars;
endif;
return $request;
}
add_filter( 'pre_get_posts', 'Mitlib\News\expand_category_scope' );

/**
* ============================================================================
* ============================================================================
Expand Down
39 changes: 0 additions & 39 deletions web/app/themes/mitlib-news/lib/classes/nav-menu-dropdown.php

This file was deleted.