Created
March 11, 2019 16:28
-
-
Save jeremyboggs/73b6b65650bda57a01d91d76987dd197 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?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