aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TyrianTemplate.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/TyrianTemplate.php b/TyrianTemplate.php
index a11fd4c..c515853 100644
--- a/TyrianTemplate.php
+++ b/TyrianTemplate.php
@@ -146,7 +146,21 @@ class TyrianTemplate extends BaseTemplate {
}
private function footer() {
- $validFooterIcons = $this->getFooterIcons( "icononly" );
+ $footericons = $this->get( 'footericons' );
+
+ // Unset any icons which don't have an image
+ foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) {
+ foreach ( $footerIconsBlock as $footerIconKey => $footerIcon ) {
+ if ( !is_string( $footerIcon ) && !isset( $footerIcon['src'] ) ) {
+ unset( $footerIconsBlock[$footerIconKey] );
+ }
+ }
+ if ( $footerIconsBlock === [] ) {
+ unset( $footericons[$footerIconsKey] );
+ }
+ }
+
+ $validFooterIcons = $footericons;
$validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
$currentYear = date('Y');
?>
@@ -189,7 +203,6 @@ class TyrianTemplate extends BaseTemplate {
</div>
</footer>
<?php
- echo $footerEnd;
}
/**