本文整理汇总了PHP中home_url函数的典型用法代码示例。如果您正苦于以下问题:PHP home_url函数的具体用法?PHP home_url怎么用?PHP home_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了home_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: genesis_404
/**
* This function outputs a 404 "Not Found" error message
*
* @since 1.6
*/
function genesis_404()
{
echo genesis_html5() ? '<article class="entry">' : '<div class="post hentry">';
printf('<h1 class="entry-title">%s</h1>', apply_filters('genesis_404_entry_title', __('Not found, error 404', 'genesis')));
echo '<div class="entry-content">';
if (genesis_html5()) {
echo apply_filters('genesis_404_entry_content', '<p>' . sprintf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it by using the search form below.', 'genesis'), trailingslashit(home_url())) . '</p>');
get_search_form();
} else {
?>
<p><?php
printf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it with the information below.', 'genesis'), trailingslashit(home_url()));
?>
</p>
<?php
}
if (!genesis_html5()) {
genesis_sitemap('h4');
} elseif (genesis_a11y('404-page')) {
echo '<h2>' . __('Sitemap', 'genesis') . '</h2>';
genesis_sitemap('h3');
}
echo '</div>';
echo genesis_html5() ? '</article>' : '</div>';
}
示例2: cp
/**
* s2Member's PayPal Auto-Return/PDT handler (inner processing routine).
*
* @package s2Member\PayPal
* @since 110720
*
* @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}.
* @return array|bool The original ``$paypal`` array passed in (extracted) from ``$vars``, or false when conditions do NOT apply.
*/
public static function cp($vars = array())
{
extract($vars);
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_paypal_return_before_no_return_data", get_defined_vars());
unset($__refs, $__v);
$paypal["s2member_log"][] = "No Return-Data. Customer MUST wait for Email Confirmation.";
$paypal["s2member_log"][] = "Note. This can sometimes happen when/if you are offering an Initial/Trial Period. There are times when a Payment Gateway will NOT supply s2Member with any data immediately after checkout. When/if this happens, s2Member must process the transaction via IPN only (i.e. behind-the-scene), and the Customer must wait for Email Confirmation in these cases.";
$paypal["s2member_log"][] = var_export($_REQUEST, true);
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_paypal_return_during_no_return_data", get_defined_vars());
unset($__refs, $__v);
if ($custom_success_redirection) {
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL: " . $custom_success_redirection . ".";
wp_redirect($custom_success_redirection);
} else {
$paypal["s2member_log"][] = "Redirecting Customer to the Home Page (after asking Customer to check their email).";
echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! (you MUST check your email before proceeding).</strong><br /><br />* Note: It can take <em>(up to 15 minutes)</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || c_ws_plugin__s2member_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), _x("Back To Home Page", "s2member-front", "s2member"), home_url("/"));
}
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_paypal_return_after_no_return_data", get_defined_vars());
unset($__refs, $__v);
return apply_filters("c_ws_plugin__s2member_paypal_return_in_no_tx_data", $paypal, get_defined_vars());
}
示例3: genesis_search_form
/**
* Replace the default search form with a Genesis-specific form.
*
* The exact output depends on whether the child theme supports HTML5 or not.
*
* Applies the `genesis_search_text`, `genesis_search_button_text`, `genesis_search_form_label` and
* `genesis_search_form` filters.
*
* @since 0.2.0
*
* @uses genesis_html5() Check for HTML5 support.
*
* @return string HTML markup.
*/
function genesis_search_form()
{
$search_text = get_search_query() ? apply_filters('the_search_query', get_search_query()) : apply_filters('genesis_search_text', __('Search this website', 'genesis') . ' …');
$button_text = apply_filters('genesis_search_button_text', esc_attr__('Search', 'genesis'));
$onfocus = "if ('" . esc_js($search_text) . "' === this.value) {this.value = '';}";
$onblur = "if ('' === this.value) {this.value = '" . esc_js($search_text) . "';}";
//* Empty label, by default. Filterable.
$label = apply_filters('genesis_search_form_label', '');
$value_or_placeholder = get_search_query() == '' ? 'placeholder' : 'value';
if (genesis_html5()) {
$form = sprintf('<form %s>', genesis_attr('search-form'));
if (genesis_a11y('search-form')) {
if ('' == $label) {
$label = apply_filters('genesis_search_text', __('Search this website', 'genesis'));
}
$form_id = uniqid('searchform-');
$form .= sprintf('<meta itemprop="target" content="%s"/><label class="search-form-label screen-reader-text" for="%s">%s</label><input itemprop="query-input" type="search" name="s" id="%s" %s="%s" /><input type="submit" value="%s" /></form>', home_url('/?s={s}'), esc_attr($form_id), esc_html($label), esc_attr($form_id), $value_or_placeholder, esc_attr($search_text), esc_attr($button_text));
} else {
$form .= sprintf('%s<meta itemprop="target" content="%s"/><input itemprop="query-input" type="search" name="s" %s="%s" /><input type="submit" value="%s" /></form>', esc_html($label), home_url('/?s={s}'), $value_or_placeholder, esc_attr($search_text), esc_attr($button_text));
}
} else {
$form = sprintf('<form method="get" class="searchform search-form" action="%s" role="search" >%s<input type="text" value="%s" name="s" class="s search-input" onfocus="%s" onblur="%s" /><input type="submit" class="searchsubmit search-submit" value="%s" /></form>', home_url('/'), esc_html($label), esc_attr($search_text), esc_attr($onfocus), esc_attr($onblur), esc_attr($button_text));
}
return apply_filters('genesis_search_form', $form, $search_text, $button_text, $label);
}
示例4: generatePayment
function generatePayment($data)
{
if (empty($data['amount'])) {
$data['amount'] = 10;
}
$return['result'] = true;
$donationOptions = get_theme_mod('donation_options');
$paypalEmail = $donationOptions['email'];
$donor_data['post_title'] = $data['first_name'] . ' ' . $data['last_name'];
$donor_data['post_type'] = 'donor';
$donor_id = wp_insert_post($donor_data);
update_post_meta($donor_id, 'donor_email', $data['email']);
update_post_meta($donor_id, 'donor_phone', $data['phone']);
update_post_meta($donor_id, 'donor_address', $data['address']);
update_post_meta($donor_id, 'donor_note', $data['notes']);
update_post_meta($donor_id, 'donor_amount', $data['amount']);
if (!empty($data['sign_up'])) {
update_post_meta($donor_id, 'donor_subscribe', $data['sign_up']);
}
if ($data['donation_id'] == 0) {
update_post_meta($donor_id, 'donor_donation', '');
$returnUrl = home_url();
$items['item_name'] = __('Site Donation', STM_DOMAIN);
} else {
update_post_meta($donor_id, 'donor_donation', get_the_title($data['donation_id']));
$returnUrl = get_permalink($data['donation_id']);
$items['item_name'] = get_the_title($data['donation_id']);
}
$items['item_number'] = $data['donation_id'];
$items['amount'] = $data['amount'];
$items = http_build_query($items);
$return = 'https://' . paypal_url() . '/cgi-bin/webscr?cmd=_xclick&business=' . $paypalEmail . '&' . $items . '&no_shipping=1&no_note=1¤cy_code=' . $donationOptions['currency'] . '&bn=PP%2dBuyNowBF&charset=UTF%2d8&invoice=' . $donor_id . '&return=' . $returnUrl . '&rm=2¬ify_url=' . $returnUrl;
return $return;
}
示例5: roots_nice_search_redirect
function roots_nice_search_redirect()
{
if (is_search() && strpos($_SERVER['REQUEST_URI'], '/wp-admin/') === false && strpos($_SERVER['REQUEST_URI'], '/search/') === false) {
wp_redirect(home_url('/search/' . str_replace(array(' ', '%20'), array('+', '+'), get_query_var('s'))));
exit;
}
}
示例6: output
/**
* Output the form
*
* @param array $atts
*/
public static function output($atts, $content = null)
{
global $post, $wp;
extract(shortcode_atts(self::options(), $atts));
if ($content == null) {
$content = self::content();
}
$current_url = add_query_arg($wp->query_string, '', home_url($wp->request));
if (!isset($_GET['sp-unsubscribe'])) {
?>
<form method="post" action="<?php
echo home_url();
?>
">
<input type="hidden" name="sendpress" value="post" />
<input type="hidden" name="sp-shortcode" value="SC-Unsubscribe-Form" />
<input type="hidden" name="sp-current-page" value="<?php
echo esc_url($current_url);
?>
" />
<input type="text" name="sp-email" class="sp-input" placeholder="<?php
echo $placeholder;
?>
"/>
<input type="submit" value="<?php
echo $btntxt;
?>
" />
</form><?php
} else {
echo do_shortcode($content);
}
}
示例7: gdlr_print_hotel_availability_item
function gdlr_print_hotel_availability_item($settings = array())
{
$item_id = empty($settings['page-item-id']) ? '' : ' id="' . $settings['page-item-id'] . '" ';
global $gdlr_spaces, $hotel_option;
$margin = !empty($settings['margin-bottom']) && $settings['margin-bottom'] != $gdlr_spaces['bottom-blog-item'] ? 'margin-bottom: ' . $settings['margin-bottom'] . ';' : '';
$margin_style = !empty($margin) ? ' style="' . $margin . '" ' : '';
$current_date = current_time('Y-m-d');
$next_date = date('Y-m-d', strtotime($current_date . "+1 days"));
$value = array('gdlr-check-in' => $current_date, 'gdlr-night' => 1, 'gdlr-check-out' => $next_date, 'gdlr-room-number' => 1, 'gdlr-adult-number' => 1, 'gdlr-children-number' => 0);
$ret = gdlr_get_item_title($settings);
$ret .= '<div class="gdlr-hotel-availability-wrapper';
if (!empty($hotel_option['enable-hotel-branch']) && $hotel_option['enable-hotel-branch'] == 'enable') {
$ret .= ' gdlr-hotel-branches-enable';
}
$ret .= '" ' . $margin_style . $item_id . ' >';
$ret .= '<form class="gdlr-hotel-availability gdlr-item" id="gdlr-hotel-availability" method="post" action="' . esc_url(add_query_arg(array($hotel_option['booking-slug'] => ''), home_url('/'))) . '" >';
if (!empty($hotel_option['enable-hotel-branch']) && $hotel_option['enable-hotel-branch'] == 'enable') {
$ret .= gdlr_get_reservation_branch_combobox(array('title' => __('Hotel Branches', 'gdlr-hotel'), 'slug' => 'gdlr-hotel-branches', 'id' => 'gdlr-hotel-branches', 'value' => ''));
}
$ret .= gdlr_get_reservation_datepicker(array('title' => __('Check In', 'gdlr-hotel'), 'slug' => 'gdlr-check-in', 'id' => 'gdlr-check-in', 'value' => $value['gdlr-check-in']));
$ret .= gdlr_get_reservation_combobox(array('title' => __('Night', 'gdlr-hotel'), 'slug' => 'gdlr-night', 'id' => 'gdlr-night', 'value' => $value['gdlr-night']));
$ret .= gdlr_get_reservation_datepicker(array('title' => __('Check Out', 'gdlr-hotel'), 'slug' => 'gdlr-check-out', 'id' => 'gdlr-check-out', 'value' => $value['gdlr-check-out']));
$ret .= gdlr_get_reservation_combobox(array('title' => __('Adults', 'gdlr-hotel'), 'slug' => 'gdlr-adult-number', 'id' => '', 'value' => $value['gdlr-adult-number'], 'multiple' => true));
$ret .= gdlr_get_reservation_combobox(array('title' => __('Children', 'gdlr-hotel'), 'slug' => 'gdlr-children-number', 'id' => '', 'value' => $value['gdlr-children-number'], 'multiple' => true));
$ret .= '<div class="gdlr-hotel-availability-submit" >';
$ret .= '<input type="hidden" name="hotel_data" value="1" >';
$ret .= '<input type="hidden" name="gdlr-room-number" value="1" />';
$ret .= '<input type="submit" class="gdlr-reservation-bar-button gdlr-button with-border" value="' . __('Check Availability', 'gdlr-hotel') . '" >';
$ret .= '</div>';
$ret .= '<div class="clear"></div>';
$ret .= '</form>';
$ret .= '</div>';
return $ret;
}
示例8: fa_cache_avatar
function fa_cache_avatar($avatar, $id_or_email, $size, $default, $alt)
{
$avatar = str_replace(array("www.gravatar.com", "0.gravatar.com", "1.gravatar.com", "2.gravatar.com"), "cn.gravatar.com", $avatar);
$tmp = strpos($avatar, 'http');
$url = get_avatar_url($id_or_email, $size);
$url = str_replace(array("www.gravatar.com", "0.gravatar.com", "1.gravatar.com", "2.gravatar.com"), "cn.gravatar.com", $url);
$avatar2x = get_avatar_url($id_or_email, $size * 2);
$avatar2x = str_replace(array("www.gravatar.com", "0.gravatar.com", "1.gravatar.com", "2.gravatar.com"), "cn.gravatar.com", $avatar2x);
$g = substr($avatar, $tmp, strpos($avatar, "'", $tmp) - $tmp);
$tmp = strpos($g, 'avatar/') + 7;
$f = substr($g, $tmp, strpos($g, "?", $tmp) - $tmp);
$w = home_url();
$e = ABSPATH . 'avatar/' . $size . '*' . $f . '.jpg';
$e2x = ABSPATH . 'avatar/' . $size * 2 . '*' . $f . '.jpg';
$t = 1209600;
if ((!is_file($e) || time() - filemtime($e) > $t) && (!is_file($e2x) || time() - filemtime($e2x) > $t)) {
copy(htmlspecialchars_decode($g), $e);
copy(htmlspecialchars_decode($avatar2x), $e2x);
} else {
$avatar = $w . '/avatar/' . $size . '*' . $f . '.jpg';
$avatar2x = $w . '/avatar/' . $size * 2 . '*' . $f . '.jpg';
if (filesize($e) < 1000) {
copy($w . '/avatar/default.jpg', $e);
}
if (filesize($e2x) < 1000) {
copy($w . '/avatar/default.jpg', $e2x);
}
$avatar = "<img alt='{$alt}' src='{$avatar}' srcset='{$avatar2x}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />";
}
return $avatar;
}
示例9: calibrefx_update_check
/**
* This function calibrefx_update_check is to ...
*/
function calibrefx_update_check()
{
global $wp_version;
/** Get time of last update check */
$calibrefx_update = get_transient('calibrefx-update');
/** If it has expired, do an update check */
if (!$calibrefx_update) {
$url = 'http://api.calibrefx.com/themes-update/';
$options = apply_filters('calibrefx_update_remote_post_options', array('body' => array('theme_name' => 'calibrefx', 'theme_version' => FRAMEWORK_VERSION, 'url' => home_url(), 'wp_version' => $wp_version, 'php_version' => phpversion(), 'user-agent' => "WordPress/{$wp_version};")));
$response = wp_remote_post($url, $options);
$calibrefx_update = wp_remote_retrieve_body($response);
/** If an error occurred, return FALSE, store for 48 hour */
if ('error' == $calibrefx_update || is_wp_error($calibrefx_update) || !is_serialized($calibrefx_update)) {
set_transient('calibrefx-update', array('new_version' => FRAMEWORK_VERSION), 60 * 60 * 48);
return false;
}
/** Else, unserialize */
$calibrefx_update = maybe_unserialize($calibrefx_update);
/** And store in transient for 48 hours */
set_transient('calibrefx-update', $calibrefx_update, 60 * 60 * 48);
}
/** If we're already using the latest version, return false */
if (version_compare(FRAMEWORK_VERSION, $calibrefx_update['new_version'], '>=')) {
return false;
}
return $calibrefx_update;
}
示例10: remote_viewing_section
/**
* Renders Remote Viewing portion of Plugin Settings Page
*
* @since 1.0
*
* @return void
*/
static function remote_viewing_section()
{
$value = get_option('simple_system_status_remote_url');
$url = home_url() . '/?simple_system_status=' . $value;
?>
<p><?php
_e('Users with this URL can view a plain-text version of your System Status.<br />This link can be handy in support forums, as access to this information can be removed after you receive the help you need.<br />Generating a new URL will safely void access to all who have the existing URL.', WC_QD_TXT);
?>
</p>
<p><input type="text" readonly="readonly" class="sss-url sss-url-text" onclick="this.focus();this.select()" value="<?php
echo esc_url($url);
?>
" title="<?php
_e('To copy the System Status, click below then press Ctrl + C (PC) or Cmd + C (Mac).', WC_QD_TXT);
?>
" /> <a href="<?php
echo esc_url($url);
?>
" target="_blank" class="sss-tiny sss-url-text-link"><?php
_e('test url', WC_QD_TXT);
?>
</a></p>
<p class="submit">
<input type="submit" onClick="return false;" class="button-secondary" name="generate-new-url" value="<?php
_e('Generate New URL', WC_QD_TXT);
?>
" />
</p>
<?php
}
示例11: comber_login_guest
function comber_login_guest()
{
if (isset($_POST['comber_user_login']) && wp_verify_nonce($_POST['comber_login_nonce'], 'comber-login-nonce')) {
// this returns the user ID and other info from the user name
$user = get_userdatabylogin($_POST['comber_user_login']);
if (!$user) {
// if the user name doesn't exist
comber_errors()->add('empty_username', __('Invalid username'));
}
if (!isset($_POST['comber_user_pass']) || $_POST['comber_user_pass'] == '') {
// if no password was entered
comber_errors()->add('empty_password', __('Please enter a password'));
}
// check the user's login with their password
if (!wp_check_password($_POST['comber_user_pass'], $user->user_pass, $user->ID)) {
// if the password is incorrect for the specified user
comber_errors()->add('empty_password', __('Incorrect password'));
}
// retrieve all error messages
$errors = comber_errors()->get_error_messages();
// only log the user in if there are no errors
if (empty($errors)) {
wp_setcookie($_POST['comber_user_login'], $_POST['comber_user_pass'], true);
wp_set_current_user($user->ID, $_POST['comber_user_login']);
do_action('wp_login', $_POST['comber_user_login']);
wp_redirect(home_url($_POST['current_page']));
exit;
} else {
wp_redirect(home_url($_POST['current_page'] . '/?login=true&fail=true'));
exit;
}
}
}
示例12: __construct
/**
* Instantiates Env Manager object
*
*/
protected function __construct()
{
$uploads_data = wp_upload_dir();
$template_url = get_bloginfo('template_url');
// Instantiate paths collection object
$this->__urls = new Collection(array('home' => home_url(), 'admin' => admin_url(), 'plugins' => plugins_url(), 'content' => content_url(), 'uploads' => $uploads_data['baseurl'], 'themes' => str_replace('/' . basename($template_url), '', $template_url), 'theme' => $template_url));
}
示例13: tb_link_custom_styles
/** Output custom styles CSS file **/
function tb_link_custom_styles()
{
$output = '';
if (apply_filters('tb_custom_styles', $output)) {
echo '<link rel="stylesheet" href="' . home_url() . '/tb-custom-styles.css?' . time() . '" type="text/css" media="screen" />' . "\n";
}
}
示例14: cp
/**
* s2Member's PayPal® Auto-Return/PDT handler ( inner processing routine ).
*
* @package s2Member\PayPal
* @since 110720
*
* @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}.
* @return array|bool The original ``$paypal`` array passed in ( extracted ) from ``$vars``, or false when conditions do NOT apply.
*/
public static function cp($vars = array())
{
extract($vars);
/* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
/**/
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
do_action("ws_plugin__s2member_during_paypal_return_before_explicit_ty_email", get_defined_vars());
unset($__refs, $__v);
/* Unset defined __refs, __v. */
/**/
$paypal["s2member_log"][] = "Customer must wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
/**/
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
do_action("ws_plugin__s2member_during_paypal_return_during_explicit_ty_email", get_defined_vars());
unset($__refs, $__v);
/* Unset defined __refs, __v. */
/**/
if ($custom_success_redirection) {
/* Using a custom success redirection URL? */
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . ". However, the Customer MUST wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
} else {
/* Else we use the default redirection URL for this scenario, which is the Home Page. */
$paypal["s2member_log"][] = "Redirecting Customer to the Home Page. Customer must wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
}
/**/
echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || c_ws_plugin__s2member_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), $custom_success_redirection ? _x("Check Your Email ( Then Click Here )", "s2member-front", "s2member") : esc_html("Back To Home Page", "s2member"), $custom_success_redirection ? $custom_success_redirection : home_url("/"));
/**/
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
do_action("ws_plugin__s2member_during_paypal_return_after_explicit_ty_email", get_defined_vars());
unset($__refs, $__v);
/* Unset defined __refs, __v. */
/**/
return apply_filters("c_ws_plugin__s2member_paypal_return_in_proxy_ty_email", $paypal, get_defined_vars());
}
示例15: siteorigin_north_display_logo
/**
* Display the logo or site title
*/
function siteorigin_north_display_logo()
{
$logo = siteorigin_setting('branding_logo');
if (!empty($logo)) {
$logo_id = attachment_url_to_postid($logo);
$attrs = apply_filters('siteorigin_north_logo_attributes', array());
?>
<a href="<?php
echo esc_url(home_url('/'));
?>
" rel="home"><?php
echo wp_get_attachment_image($logo_id, 'full', false, $attrs);
?>
</a><?php
} else {
?>
<h1 class="site-title"><a href="<?php
echo esc_url(home_url('/'));
?>
" rel="home"><?php
bloginfo('name');
?>
</a></h1><?php
}
}