/**
  * Callback-method for registered static.
  * @since 4.0.0
  */
 public function callback()
 {
     $footer_text = cherry_get_option('footer-text');
     if (!empty($footer_text)) {
         $footer_text = preg_replace_callback('/%%([a-zA-Z0-9-_]+)%%/', array($this, 'texturize_links'), $footer_text);
         printf('<div class="site-info">%s</div>', $footer_text);
         return;
     }
     $format = apply_filters('cherry_default_footer_info_format', '%2$s &copy; %1$s. %3$s');
     $output = '<div class="site-info">';
     $output .= sprintf($format, date_i18n('Y'), cherry_get_site_link('footer-site-link'), cherry_get_link_by_slug('privacy-policy'));
     $output .= '</div>';
     echo $output;
 }
/**
 * Returns the linked site logo wrapped in an '<h1>' tag.
 *
 * @since  4.0.0
 * @return string
 */
function cherry_get_site_logo($location = 'header')
{
    $logo_class = array();
    switch ($location) {
        case 'header':
            $type = cherry_get_option('logo-type', 'text');
            $logo_img_ids = cherry_get_option('logo-image-path', false);
            $tag = is_front_page() ? 'h1' : 'h2';
            $logo_class[] = 'site-title';
            $logo_class[] = $type . '-logo';
            $link_class = '';
            break;
        case 'footer':
            $type = cherry_get_option('footer-logo-type', 'text');
            $logo_img_ids = cherry_get_option('footer-logo-image-path', false);
            $tag = 'div';
            $logo_class[] = 'cherry-footer-logo';
            $logo_class[] = $type . '-logo';
            $link_class = 'footer-logo-link';
            break;
        default:
            $tag = 'div';
            $logo_class[] = $location . '-logo';
            $link_class = '';
            break;
    }
    $logo_class = apply_filters('cherry_logo_classes', $logo_class, $location);
    $logo_class = array_unique($logo_class);
    $logo_class = array_map('sanitize_html_class', $logo_class);
    if ('image' == $type && false != $logo_img_ids) {
        $images = explode(',', $logo_img_ids);
        if (count($images) > 1) {
            $logo_content = cherry_get_retina_logo($images);
        } else {
            $img = wp_get_attachment_url($images[0]);
            $logo_image_format = apply_filters('cherry_logo_image_format', '<a href="%1$s" rel="home"><img src="%2$s" alt="%3$s"></a>', $location);
            $logo_content = sprintf($logo_image_format, home_url('/'), esc_url($img), get_bloginfo('title'));
        }
    } else {
        $logo_content = cherry_get_site_link($link_class);
    }
    $logo = $logo_content ? sprintf('<%3$s class="%1$s">%2$s</%3$s>', join(' ', $logo_class), $logo_content, $tag) : '';
    return apply_filters('cherry_get_site_logo', $logo, $location);
}