Skip to content

Instantly share code, notes, and snippets.

@jeremyboggs
Created March 11, 2019 16:28
Show Gist options
  • Save jeremyboggs/73b6b65650bda57a01d91d76987dd197 to your computer and use it in GitHub Desktop.
Save jeremyboggs/73b6b65650bda57a01d91d76987dd197 to your computer and use it in GitHub Desktop.
<?php
/**
* Get the theme's header background image style.
*
* @package Omeka\Function\View\Head
* @uses get_theme_option()
* @return string|null
*/
function cville_theme_header_background()
{
$headerBg = get_theme_option('Header Background');
if ($headerBg) {
$storage = Zend_Registry::get('storage');
$headerBg = $storage->getUri($storage->getPathByType($headerBg, 'theme_uploads'));
return '<style type="text/css" media="screen">header {'
. 'background:transparent url("' . $headerBg . '") center left no-repeat;'
. '}</style>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment