-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2042 from CityOfPhiladelphia/resource-group-icons…
…-fix Resource group icons fix
- Loading branch information
Showing
1 changed file
with
14 additions
and
23 deletions.
There are no files selected for viewing
37 changes: 14 additions & 23 deletions
37
wp/wp-content/themes/phila.gov-theme/inc/resource-list-switch.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,16 @@ | ||
<?php | ||
function phila_resource_list_switch( $item_resource_type ){ | ||
|
||
switch ($item_resource_type) { | ||
case ('phila_resource_document'): | ||
return 'fas fa-file-alt'; | ||
break; | ||
|
||
case ('phila_resource_map'): | ||
return 'fas fa-map-marker-alt'; | ||
break; | ||
|
||
case ('phila_resource_link'): | ||
return 'far fa-link'; | ||
break; | ||
|
||
case ('phila_resource_video'): | ||
return 'fas fa-video'; | ||
break; | ||
|
||
default: | ||
return 'fas fa-file-alt'; | ||
} | ||
<?php | ||
function phila_resource_list_switch($item_resource_type) { | ||
if ($item_resource_type === 'document' || $item_resource_type === 'phila_resource_document') { | ||
return 'fas fa-file-alt'; | ||
} elseif ($item_resource_type === 'map' || $item_resource_type === 'phila_resource_map') { | ||
return 'fas fa-map-marker-alt'; | ||
} elseif ($item_resource_type === 'link' || $item_resource_type === 'phila_resource_link') { | ||
return 'far fa-link'; | ||
} elseif ($item_resource_type === 'video' || $item_resource_type === 'phila_resource_video') { | ||
return 'fas fa-video'; | ||
} else { | ||
return 'fas fa-file-alt'; | ||
} | ||
|
||
} | ||
?> |