Skip to content

Commit 4241fe7

Browse files
Respond to code review feedback
1 parent ea151ba commit 4241fe7

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

config/theme.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ theme_link = "https://github.com/MITLibraries/mitlibraries-theme-omeka"
77
author_link = "https://libraries.mit.edu"
88
omeka_version_constraint = "^4.0.0"
99

10+
# Helpers are described in the Omeka documentation at
11+
# https://omeka.org/s/docs/developer/themes/theme_functions/
1012
helpers[] = ResourceClasses
1113

14+
# Settings are described in the Omeka documentation at
15+
# https://omeka.org/s/docs/developer/themes/theme_settings/
1216
[config]
1317
element_groups.branding = "Site branding settings"
1418
element_groups.browse = "Site browse settings"
@@ -79,6 +83,8 @@ elements.sites_page.options.element_group = "homepage"
7983
elements.sites_page.options.label = "Page slug that displays filterable site list"
8084
elements.sites_page.options.info = "Optional. If provided, this is where the filterable list of sites across the network should be displayed."
8185

86+
# Resource page blocks are described in the Omeka documentation at
87+
# https://omeka.org/s/docs/developer/themes/theme_use_resource_page_blocks/
8288
resource_page_blocks.items.main[] = "values"
8389
resource_page_blocks.items.main[] = "itemSets"
8490
resource_page_blocks.items.main[] = "sitePages"

helper/ResourceClasses.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ class ResourceClasses extends AbstractHelper
77
{
88

99
/**
10-
* Returns a representation of resource classes in HTML.
10+
* Returns a representation of resource classes in HTML. If this helper
11+
* receives anything other than a resource, with a class, which itself has
12+
* an ID, then it returns an empty string.
1113
*
1214
* @param object $resource The resource to add tags to.
1315
* @return string This is a set of HTML.

0 commit comments

Comments
 (0)