Exemplo n.º 1
0
function wpv_shortcode_icon($atts, $content = null)
{
    extract(shortcode_atts(array('name' => '', 'style' => '', 'color' => '', 'size' => '', 'lheight' => 1), $atts));
    $size_int = array('small' => 16, 'medium' => 24, 'large' => 32);
    $icon_char = wpv_get_icon($name);
    $theme = '';
    if (strpos($name, 'theme-') === 0) {
        $theme = 'theme';
    } elseif (strpos($name, 'custom-') === 0) {
        $theme = 'custom';
    }
    $color = wpv_sanitize_accent($color);
    if (isset($size_int[$size])) {
        $size = $size_int[$size];
    }
    $style_slug = $style;
    if (!empty($color)) {
        $style = "color:{$color};";
        if ($style_slug == 'inverted-colors' || $style_slug == 'box') {
            $l = new WpvLessc();
            $l->importDir = '.';
            $l->setFormatter("compressed");
            $style = $l->compile("\n\t\t\t\t.readable-color(@bgcolor:#FFF, @treshold:70, @diff:50%) when (iscolor(@bgcolor)) and ( lightness(@bgcolor) >= @treshold ) {\n\t\t\t\t\tcolor: darken(@bgcolor, @diff);\n\t\t\t\t}\n\t\t\t\t.readable-color(@bgcolor:#FFF, @treshold:70, @diff:50%) when (iscolor(@bgcolor)) and ( lightness(@bgcolor) < @treshold ) {\n\t\t\t\t\tcolor: lighten(@bgcolor, @diff);\n\t\t\t\t}\n\n\n\t\t\t\t\t.readable-color({$color});\n\t\t\t\t\tbackground: {$color};\n\t\t\t");
        }
    }
    $lheight = (int) $lheight != 1 && (int) $lheight != (int) $size ? "line-height:{$lheight};" : '';
    if (!empty($size)) {
        $size = "font-size:{$size}px !important;";
    }
    return "<span class='icon shortcode {$theme} {$style_slug}' style='{$lheight}{$size}{$style}'>{$icon_char}</span>";
}
Exemplo n.º 2
0
function wpv_shortcode_list($atts, $content = null, $code)
{
    extract(shortcode_atts(array('style' => false, 'color' => ''), $atts));
    if ($color) {
        $color = ' icon-' . $color;
    }
    $icon_font = wpv_get_icon_type($style);
    $content = str_replace('<li>', '<li class="">', do_shortcode($content));
    $content = preg_replace('/(<li .*?class="[^"]*)"/', '$1 icon-b ' . $icon_font . '" data-icon="' . wpv_get_icon($style) . '"', $content);
    return str_replace('<ul>', '<ul class="styled-list ' . $color . '">', $content);
}
Exemplo n.º 3
0
	<?php 
include locate_template('templates/post/content.php');
?>

	<?php 
if ($meta_tax) {
    ?>
		<div class="meta-bottom clearfix">
			<div><span class="icon"><?php 
    wpv_icon('folder1');
    ?>
</span><span class="visuallyhidden"><?php 
    _e('Category', 'church-event');
    ?>
</span><?php 
    the_category(', ');
    ?>
</div>
			<?php 
    the_tags('<div class="the-tags"><span class="icon">' . wpv_get_icon('tag') . '</span><span class="visuallyhidden">' . __('Tags', 'church-event') . '</span>', ', ', '</div>');
    ?>
		</div>
	<?php 
}
?>

	<?php 
WpvTemplates::share('post');
?>

</div>
Exemplo n.º 4
0
		<?php 
if (!post_password_required()) {
    ?>
			<?php 
    if (wpv_get_optionb('meta_posted_in')) {
        ?>
				<div><span class="icon"><?php 
        wpv_icon('folder1');
        ?>
</span><span class="visuallyhidden"><?php 
        _e('Category', 'honeymoon');
        ?>
</span><?php 
        the_category(', ');
        ?>
</div>
				<?php 
        // Tags
        the_tags('<div class="the-tags"><span class="icon">' . wpv_get_icon('tag') . '</span><span class="visuallyhidden">' . __('Category', 'honeymoon') . '</span>', ', ', '</div>');
        ?>
			<?php 
    }
    ?>
		<?php 
}
?>
		<?php 
include locate_template('templates/post/main/part-actions.php');
?>
	</nav>
</div>
Exemplo n.º 5
0
        // Tags
        the_tags('<div class="the-tags"><span class="icon">' . wpv_get_icon('tag') . '</span><span class="visuallyhidden">' . __('Tags', 'honeymoon') . '</span>', ', ', '</div>');
        ?>
			<?php 
    }
    ?>
		<?php 
}
?>

		<?php 
if (!is_single()) {
    ?>
			<div class="blog-buttons">
				<?php 
    edit_post_link('<span class="icon">' . wpv_get_icon('pencil') . '</span><span>' . __('Edit', 'honeymoon') . '</span>');
    ?>
			</div>
		<?php 
}
?>

		<?php 
if (function_exists('wpv_li_love_link')) {
    ?>
			<?php 
    echo wpv_li_love_link('<span class="visuallyhidden">' . __('Love it', 'honeymoon') . '</span>', '<span class="visuallyhidden">' . __('You have loved this.', 'honeymoon') . '</span>');
    ?>
		<?php 
}
?>
 * Prev/next/view all buttons for posts and portfolio items
 *
 * @package wpv
 * @subpackage church-event
 */
global $post;
$same_cat = count(wp_get_object_terms($post->ID, 'category', array('fields' => 'ids'))) > 0;
if ($post->post_type == 'portfolio') {
    $same_cat = false;
}
$view_all = wpv_get_option($post->post_type . '-all-items');
if (is_singular(array('tribe_events', 'tribe_organizer', 'tribe_venue')) && function_exists('tribe_get_events_link')) {
    $view_all = tribe_get_events_link();
}
$prev_anchor = '<span class="icon theme">' . wpv_get_icon('theme-arrow-left3') . '</span>';
$next_anchor = '<span class="icon theme">' . wpv_get_icon('theme-arrow-right3') . '</span>';
?>
<span class="post-siblings">
	<?php 
if (is_singular('tribe_events') && function_exists('tribe_the_prev_event_link')) {
    tribe_the_prev_event_link($prev_anchor);
} else {
    previous_post_link('%link', $prev_anchor, $same_cat);
}
?>

	<?php 
if (!empty($view_all)) {
    ?>
		<a href="<?php 
    echo $view_all;
		<?php 
    if (wpv_get_optionb('meta_comment_count') && comments_open()) {
        ?>
			<div class="comment-count">
				<?php 
        comments_popup_link(__('0 <span class="comment-word">Comments</span>', 'church-event'), __('1 <span class="comment-word">Comment</span>', 'church-event'), __('% <span class="comment-word">Comments</span>', 'church-event'));
        ?>
			</div>
		<?php 
    }
    ?>

		<?php 
    if (function_exists('wpv_li_love_link')) {
        ?>
			<div class="love-count-outer">
				<?php 
        echo wpv_li_love_link('<span class="visuallyhidden">' . __('Love it', 'church-event') . '</span>', '<span class="visuallyhidden">' . __('You have loved this.', 'church-event') . '</span>');
        ?>
			</div>
		<?php 
    }
    ?>

		<?php 
    edit_post_link('<span class="icon">' . wpv_get_icon('pencil') . '</span><span class="visuallyhidden">' . __('Edit', 'church-event') . '</span>');
    ?>
	<?php 
}
?>
</div>
Exemplo n.º 8
0
function wpv_icon($key)
{
    echo wpv_get_icon($key);
    // xss ok
}