Exemplo n.º 1
0
function hocwp_get_footer_logo_url()
{
    $result = hocwp_theme_get_option('footer_logo');
    $result = hocwp_sanitize_media_value($result);
    $result = $result['url'];
    return $result;
}
Exemplo n.º 2
0
function hocwp_comments_template($args = array())
{
    $post_id = hocwp_get_value_by_key($args, 'post_id', get_the_ID());
    $cpost = get_post($post_id);
    if (!is_a($cpost, 'WP_Post')) {
        return;
    }
    if (comments_open($post_id) || get_comments_number($post_id)) {
        $comment_system = hocwp_theme_get_option('comment_system', 'discussion');
        $tabs = hocwp_get_value_by_key($args, 'tabs');
        if ('tabs' == $comment_system || hocwp_array_has_value($tabs)) {
            if (!isset($args['callback'])) {
                $args['callback'] = 'hocwp_comment_tabs_callback';
            }
            if ('tabs' == $comment_system && !isset($args['tabs'])) {
                $tabs = array(array('href' => 'facebook', 'text' => 'Facebook'), array('href' => 'google', 'text' => 'Google+'), array('href' => 'wordpress', 'text' => 'WordPress'), array('href' => 'disqus', 'text' => 'Disqus'));
                $tabs = apply_filters('hocwp_comment_tabs', $tabs);
                $args['tabs'] = $tabs;
            }
            hocwp_tab_content_bootstrap($args);
        } else {
            if ('facebook' == $comment_system) {
                hocwp_facebook_comment();
            } else {
                if ('default_and_facebook' == $comment_system) {
                    hocwp_facebook_comment();
                }
                comments_template();
            }
        }
    }
}
function hocwp_setup_theme_add_favicon()
{
    $favicon = hocwp_theme_get_option('favicon');
    $favicon = hocwp_sanitize_media_value($favicon);
    if (!empty($favicon['url'])) {
        echo '<link type="image/x-icon" href="' . $favicon['url'] . '" rel="shortcut icon">';
    }
}
Exemplo n.º 4
0
function hocwp_theme_get_footer_text()
{
    $text = hocwp_theme_get_option('footer_text');
    if (function_exists('pll__')) {
        $text = pll__($text);
    }
    $text = apply_filters('hocwp_replace_text_placeholder', $text);
    return $text;
}