Created
April 24, 2012 17:51
-
-
Save mattonomics/2481989 to your computer and use it in GitHub Desktop.
Get Thesis Header URL
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
<?php | |
// use thesis_header_url() to echo the URL and thesis_header_url(false) to simply return it | |
function thesis_get_header_url($echo = true) { | |
if (! $option = get_option('thesis_header') || ! is_array($option) || ! isset($option['url']) || empty($option['url'])) | |
return; | |
if ($echo) | |
echo esc_url($option['url']); | |
else | |
return $option['url']; // please escape this with esc_url() before you echo it | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment