예제 #1
0
 public static function shortcode($atts, $content = null, $code)
 {
     extract(shortcode_atts(array('layout' => 'horizontal', 'left_color' => 'accent8', 'right_color' => 'accent1', 'nav_color' => 'accent2'), $atts));
     if (!wpv_sub_shortcode('tab', $content, $params, $sub_contents)) {
         return 'error parsing slider shortcode';
     }
     wp_enqueue_script('jquery-ui-tabs');
     wp_enqueue_script('front-jquery.ui.tabs.rotate');
     global $wpv_tabs_shown;
     if (!isset($wpv_tabs_shown)) {
         $wpv_tabs_shown = 0;
     }
     $wpv_tabs_shown++;
     $id = 'tabs-' . $wpv_tabs_shown;
     $output = '<ul class="ui-tabs-nav">';
     if (isset($GLOBALS['wpv_last_column_title']) && !empty($GLOBALS['wpv_last_column_title']) && $layout == 'vertical') {
         $output .= '<li class="inactive-block-title"><h2>' . $GLOBALS['wpv_last_column_title'] . '</h2></li>';
     }
     foreach ($params as $i => $p) {
         $p = shortcode_atts(array('title' => '', 'class' => '', 'icon' => ''), $p);
         if (!empty($p['icon'])) {
             $p['icon'] = wpv_shortcode_icon(array('name' => $p['icon']));
             $p['class'] .= ' has-icon';
         }
         $class = empty($p['class']) ? '' : " class='{$p['class']}'";
         $output .= '<li' . $class . '><a href="#tab-' . $wpv_tabs_shown . '-' . $i . '-' . self::sanitize_id($params[$i]['title']) . '">' . $p['icon'] . ' <span class="title-text">' . $p['title'] . '</span></a></li>';
     }
     $output .= '</ul>';
     foreach ($sub_contents as $i => $c) {
         $class = isset($params[$i]['class']) ? ' tab-' . $params[$i]['class'] : '';
         $output .= '<div class="pane' . $class . '" id="tab-' . $wpv_tabs_shown . '-' . $i . '-' . self::sanitize_id($params[$i]['title']) . '">' . do_shortcode(trim($c)) . '</div>';
     }
     $l = new WpvLessc();
     $l->importDir = '.';
     $l->setFormatter("compressed");
     $left_color = wpv_sanitize_accent($left_color);
     $right_color = wpv_sanitize_accent($right_color);
     $nav_color = wpv_sanitize_accent($nav_color);
     $inner_style = '';
     if (!empty($left_color) && !empty($right_color)) {
         $readable = WpvTemplates::readable_color_mixin();
         $vertical_styles = $layout !== 'vertical' ? '' : "\n\t\t\t\t#{$id}.vertical {\n\t\t\t\t\t&,\n\t\t\t\t\t&:before {\n\t\t\t\t\t\tbackground: {$right_color};\n\t\t\t\t\t}\n\n\t\t\t\t\t.ui-tabs-nav {\n\t\t\t\t\t\t&:before {\n\t\t\t\t\t\t\tbackground: {$left_color};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t.pane:before {\n\t\t\t\t\t\tbackground: {$left_color};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t";
         $inner_style = $l->compile($readable . $vertical_styles . "\n\t\t\t\t#{$id} {\n\t\t\t\t\t.ui-tabs-nav {\n\t\t\t\t\t\t&,\n\t\t\t\t\t\tli {\n\t\t\t\t\t\t\tbackground: {$left_color};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t&, a, a .icon {\n\t\t\t\t\t\t\t\tcolor: {$nav_color};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.ui-state-active,\n\t\t\t\t\t\t.ui-state-selected,\n\t\t\t\t\t\t.ui-state-hover {\n\t\t\t\t\t\t\tbackground: {$right_color};\n\n\t\t\t\t\t\t\t&, a, a .icon {\n\t\t\t\t\t\t\t\t.readable-color({$right_color});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.inactive-block-title {\n\t\t\t\t\t\t\th1, h2, h3, h4, h5, h6 {\n\t\t\t\t\t\t\t\tcolor: {$nav_color};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t&.horizontal {\n\t\t\t\t\t\t.pane {\n\t\t\t\t\t\t\tbackground: {$right_color};\n\n\t\t\t\t\t\t\t&,\n\t\t\t\t\t\t\tp,\n\t\t\t\t\t\t\ta,\n\t\t\t\t\t\t\t.column-title,\n\t\t\t\t\t\t\t.sep-text h2.regular-title-wrapper,\n\t\t\t\t\t\t\t.text-divider-double,\n\t\t\t\t\t\t\t.sep-text .sep-text-line,\n\t\t\t\t\t\t\t.sep,\n\t\t\t\t\t\t\t.sep-2,\n\t\t\t\t\t\t\t.sep-3,\n\t\t\t\t\t\t\ttd,\n\t\t\t\t\t\t\tth,\n\t\t\t\t\t\t\tcaption {\n\t\t\t\t\t\t\t\t.readable-color({$right_color});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t");
     }
     $style = '<style>' . $inner_style . '</style>';
     return '<div class="wpv-tabs ' . $layout . '" id="' . $id . '">' . $output . '</div>' . $style;
 }
?>
					<?php 
if (class_exists('Tribe__Events__Pro__Templates__Single_Venue')) {
    tribe_get_venue_link($post->ID, true);
} else {
    echo tribe_get_venue($post->ID);
}
?>
					<br>
					<?php 
echo Tribe__Events__Main::instance()->fullAddress();
?>
				</div>
				<?php 
if (tribe_get_cost()) {
    ?>
					<div class="wpv-single-event-schedule-block cost">
						<?php 
    echo wpv_shortcode_icon(array('name' => 'exit3'));
    ?>
						<?php 
    echo tribe_get_cost(null, true);
    ?>
					</div>
				<?php 
}
?>
			</div>
		</div>
	</div>
</div>
예제 #3
0
<li id="comment-<?php 
comment_ID();
?>
" <?php 
comment_class('grid-1-3' . ($args['has_children'] ? 'has-children' : ''));
?>
>
	<div class="sep-text centered">
		<span class="sep-text-before"><div class="sep-text-line"></div></span>
		<div class="content">
			<?php 
echo wpv_shortcode_icon(array('name' => 'theme-quote'));
?>
		</div>
		<span class="sep-text-after"><div class="sep-text-line"></div></span>
	</div>
	<div class="comment-inner">
		<header class="comment-header">
			<h3 class="comment-author-link"><?php 
comment_author_link();
?>
</h3>
			<?php 
if ((!isset($args['reply_allowed']) || $args['reply_allowed']) && ($args['type'] == 'all' || get_comment_type() == 'comment')) {
    comment_reply_link(array_merge($args, array('reply_text' => __('Reply', 'shape'), 'login_text' => __('Log in to reply.', 'shape'), 'depth' => $depth, 'before' => '<h6 class="comment-reply-link">', 'after' => '</h6>')));
}
?>
		</header>
		<?php 
comment_text();
?>
예제 #4
0
            ?>
							<a href="<?php 
            echo $button_link;
            ?>
" title="<?php 
            echo esc_attr($button_text);
            ?>
">
						<?php 
        }
        ?>
						<?php 
        if (!$has_image && $has_icon) {
            ?>
							<?php 
            echo wpv_shortcode_icon(array('name' => $icon, 'color' => $icon_color));
            ?>
						<?php 
        }
        ?>
						<?php 
        if ($has_button) {
            ?>
							</a>
						<?php 
        }
        ?>
					</div>
				</div>
			<?php 
    }
">
	<div class="closed services-inside">
		<div class="services-content-wrapper clearfix">
			<?php 
if (!empty($image)) {
    ?>
				<div class="image-wrapper">
					<?php 
    wpv_lazy_load($image, '', array('class' => 'aligncenter'));
    ?>
				</div>
			<?php 
} elseif (!empty($icon)) {
    ?>
				<div class="image-wrapper"><?php 
    echo wpv_shortcode_icon(array('name' => $icon, 'size' => $icon_size, 'color' => wpv_sanitize_accent($icon_color)));
    ?>
</div>
			<?php 
}
?>

			<?php 
echo do_shortcode($before);
?>

		</div>
	</div>
	<div class="open services-inside">
		<div class="services-content-wrapper">
			<div class="row">
예제 #6
0
echo wpv_shortcode_icon(array('name' => 'theme-clock'));
?>
				<br>
				<?php 
echo $start_time;
?>
<br>
				<?php 
echo $end_time;
?>
			</div>
		</div>
		<div class="event-time-right">
			<div class="event-time-inner">
				<?php 
echo wpv_shortcode_icon(array('name' => 'theme-calendar'));
?>
				<br>
				<?php 
echo $date;
?>
			</div>
		</div>
		<?php 
include WPV_THEME_ASSETS_DIR . 'images/flower.svg';
?>
	</div>
	<div class="event-description"><?php 
echo wpautop(do_shortcode($content));
?>
</div>
예제 #7
0
        ?>
 <?php 
        echo $type;
        ?>
" <?php 
        if (isset($link_target)) {
            echo 'target="' . $link_target . '"';
        }
        ?>
 href="<?php 
        echo $href;
        ?>
" <?php 
        echo $rel . $width . $height . $iframe;
        ?>
>
								<?php 
        echo wpv_shortcode_icon(array('name' => 'theme-circle-search'));
        ?>
							</a>
						<?php 
    }
    ?>
					</div>
				</span>
			</span>
		<?php 
}
?>
	</div>
</li>
예제 #8
0
        $params .= ' target="_blank"';
    } else {
        $params .= ' class="vamtam-lightbox"';
        if (preg_match('/youtu\\.?be|dailymotion|vimeo/', $link)) {
            $params .= ' data-iframe="true"';
        }
    }
    ?>
	<a href="<?php 
    echo $link;
    ?>
" <?php 
    echo $params;
    ?>
><?php 
    echo wpv_shortcode_icon(array('name' => $media_icons[$slug]));
    ?>
</a>
<?php 
}
?>
<div class="hidden">
	<?php 
foreach ($media_inline as $id => $content) {
    ?>
		<div id="<?php 
    echo esc_attr($id);
    ?>
" class="wpv-sermon-inline-media">
			<?php 
    echo $content;
예제 #9
0
	<div class="thumbnail">
		<?php 
    if (has_post_format('image')) {
        ?>
			<a href="<?php 
        the_permalink();
        ?>
" title="<?php 
        the_title_attribute();
        ?>
">
				<?php 
        echo $post_data['media'];
        ?>
				<?php 
        echo wpv_shortcode_icon(array('name' => 'theme-circle-post'));
        ?>
			</a>
		<?php 
    } else {
        ?>
			<?php 
        echo $post_data['media'];
        ?>
		<?php 
    }
    ?>
	</div>
<?php 
}
?>
예제 #10
0
			<tbody id="the-list"><tr>
				<?php 
    $rewriteSlugSingular = TribeEvents::getOption('singleEventSlug', 'event');
    global $post;
    $old_post = $post;
    while ($events->have_posts()) {
        $e = $events->next_post();
        $post = $e;
        ?>

					<tr>

						<td><?php 
        if (isset($icons[$post->post_status])) {
            echo wpv_shortcode_icon(array('name' => $icons[$post->post_status], 'size' => 16));
        } else {
            echo TribeCommunityEvents::instance()->getEventStatusIcon($post->post_status);
        }
        ?>
</td>
						<td>
						<?php 
        $canEdit = current_user_can('edit_post', $post->ID);
        $canDelete = current_user_can('delete_post', $post->ID);
        if ($canEdit) {
            ?>
							<span class="title">
								<a href="<?php 
            echo esc_url(tribe_community_events_edit_event_link($post->ID));
            ?>
예제 #11
0
	<?php 
if (wpv_get_option("top-bar-social-lead") !== '') {
    ?>
		<span><?php 
    wpvge("top-bar-social-lead");
    ?>
</span>
	<?php 
}
?>
	<?php 
$map = array('fb' => 'theme-facebook', 'twitter' => 'twitter', 'linkedin' => 'linkedin', 'gplus' => 'googleplus', 'flickr' => 'flickr', 'pinterest' => 'pinterest1', 'dribbble' => 'dribbble2', 'instagram' => 'instagram', 'youtube' => 'youtube', 'vimeo' => 'vimeo');
foreach ($map as $option => $icon) {
    ?>
			<?php 
    if (wpv_get_option("top-bar-social-{$option}") !== '') {
        ?>
				<a href="<?php 
        echo esc_attr(wpv_get_option("top-bar-social-{$option}"));
        ?>
" target="_blank"><?php 
        echo wpv_shortcode_icon(array('name' => $icon));
        ?>
</a>
			<?php 
    }
    ?>
		<?php 
}
?>
</div>
예제 #12
0
<?php

$tag = (int) $count == 1 ? 'span' : 'div';
foreach ($events as $event) {
    ?>
	<div class="classic-event-wrapper">
		<div class="row">
			<div class="grid-1-3">
				<?php 
    if (!empty($lead_text)) {
        ?>
					<h4 class="lead-wrapper"><?php 
        echo wpv_shortcode_icon(array('name' => 'calendar2'));
        ?>
 <span class="lead"><?php 
        echo $lead_text;
        ?>
</span></h4>
				<?php 
    }
    ?>
				<h3 class="event-title"><a href="<?php 
    tribe_event_link($event);
    ?>
" title="<?php 
    esc_attr_e('Read More', 'church-event');
    ?>
"><?php 
    echo $event->post_title;
    ?>
</a></h3>