function rehub_format_score($size = 'small', $type = 'star') { if (vp_metabox('rehub_post.rehub_framework_post_type') == 'review') { $overall_score_icon = rehub_get_overall_score(); $total = $overall_score_icon * 10; if ($overall_score_icon != '0') { if ($type == 'star') { echo '<div class="star-' . $size . '"><span class="stars-rate"><span style="width: ' . $total . '%;"></span></span></div>'; } elseif ($type == 'square') { echo '<span class="overlay_post_formats review_formats_score">' . $overall_score_icon . '</span>'; } elseif ($type == 'line') { ?> <div class="rate-line rate-line-inner<?php if (rehub_option('color_type_review') == 'multicolor') { echo ' colored_rate_bar'; } ?> "> <div class="line" data-percent="<?php echo $total; ?> %"> <span class="filled r_score_<?php echo round($overall_score_icon); ?> "><?php echo $overall_score_icon; ?> </span> </div> </div> <?php } } } }
function hb_testimonial_quote($post_id) { $testimonial_post = get_post($post_id); if ($testimonial_post) { setup_postdata($testimonial_post); $author_name = vp_metabox('testimonial_type_settings.hb_testimonial_author'); $author_desc = vp_metabox('testimonial_type_settings.hb_testimonial_description'); $author_desc_link = vp_metabox('testimonial_type_settings.hb_testimonial_description_link'); ?> <p><?php the_content(); ?> </p> <div class="testimonial-quote-meta"> <span><?php if ($author_name) { echo $author_name; } if ($author_desc) { if ($author_desc_link) { echo ', <a href="' . $author_desc_link . '">' . $author_desc . '</a>'; } else { echo ', ' . $author_desc; } } ?> </span> </div> <?php wp_reset_postdata(); } }
function charity_event_media_view() { $image = vp_metabox('charity_event.event_video_image'); $youtube = vp_metabox('charity_event.event_you_tube_url'); $viemo = vp_metabox('charity_event.event_vimeo_url'); $width = 600; $height = 400; if (!empty($image)) { ?> <figure class="charity-event-video"> <?php $videoUrl = ""; if (!empty($youtube)) { $videoUrl = $youtube; } if (!empty($viemo)) { $videoUrl = $viemo; } ?> <img src="<?php echo esc_url($image); ?> " alt="<?php the_title(); ?> " data-video='<?php echo esc_html($videoUrl); ?> '/> </figure> <?php } }
/** * Returns badge settings for specific tour. * * @param integer $tour_id * @param boolean $ignore_inactive * @return assoc */ public function get_tour_badge($tour_id, $ignore_inactive = true) { $bid = $tour_id ? vp_metabox('tour_tabs_meta.tour_badge', null, $tour_id) : null; if ($this->is_active($bid)) { return array('title' => $this->get_title($bid), 'color' => $this->get_color($bid)); } return null; }
function charity_vc_home_become_volunteer($atts, $content = null) { extract(shortcode_atts(array('home_page_volunteer' => '', 'page_volunteer' => ''), $atts, 'volunteer')); $pageid = $page_volunteer; function getTitleID($str) { $arr = array(); $regx1 = '/[\\{\\d\\}]+/'; preg_match_all($regx1, $str, $all); if (!empty($all[0]) && $all[0][count($all[0]) - 1]) { $regx2 = '/[\\d]+/'; preg_match($regx2, $all[0][count($all[0]) - 1], $ids); if (!empty($ids[0])) { $arr['title'] = str_replace($all[0][count($all[0]) - 1], "", $str); $arr['id'] = $ids[0]; } } return $arr; } $selectedpage = getTitleID($pageid); //echo $selectedpage['id']; query_posts(array("page_id" => $selectedpage['id'])); if (have_posts()) { the_post(); $title = vp_metabox('volunteer.volunteer-title'); $image = vp_metabox('volunteer.volunteer-image'); $content = vp_metabox('volunteer.volunteer-content'); //$url = wp_get_attachment_image_src( get_post_thumbnail_id($pageid), array( 1143,479 ) ); ?> <section class="parallax-section parallax" style="background-image: url('<?php echo esc_url($image); ?> ')"> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-7 col-md-5"> <h2><?php print $title; ?> </h2> <p><?php print $content; ?> </p> </div> </div> </div> </section> <?php } wp_reset_query(); }
function add_criteria_raitings_comment_fields($fields) { $reviewType = vp_metabox('rehub_post.rehub_framework_post_type'); $reviewCriteria = vp_metabox('rehub_post.review_post.0.review_post_criteria'); $firstcriteria = $reviewCriteria[0]['review_post_name']; if ($reviewType == 'review' && $firstcriteria != '') { wp_enqueue_style('jquery.nouislider'); wp_enqueue_script('jquery.nouislider'); $criteriaNamesArray = array(); $criteriaInputs = '<div id="user_reviews_in_comment"><div class="user_rating_left_com">'; for ($i = 0; $i < count($reviewCriteria); $i++) { $criteriaNamesArray[$i] = $reviewCriteria[$i]['review_post_name']; $criteriaInputs .= '<label for="criteria_input_' . $i . '">' . $reviewCriteria[$i]['review_post_name'] . '</label>'; $criteriaInputs .= '<input id="criteria_input_' . $i . '" type="hidden" name="user_criteria[]" value="0" class="criteria_hidden_input' . $i . '" /><span class="criteria_visible_input' . $i . '">0</span><div class="user_rating_slider_criteria"></div>'; } $criteriaInputs .= '<div class="your_total_score">' . __('Your total score', 'rehub_framework') . ' <span>0</span></div></div><input type="hidden" name="criteria_names" value="' . base64_encode(serialize($criteriaNamesArray)) . '" />'; $criteriaInputs .= '<div class="user_rating_right_com"><textarea id="pros_review" name="pros_review" rows="5" placeholder="' . __('PROS', 'rehub_framework') . '"></textarea><br /><textarea id="cons_review" name="cons_review" rows="5" placeholder="' . __('CONS', 'rehub_framework') . '"></textarea></div>'; $criteriaInputs .= '</div>'; // check if rated post already $current_user_id = get_current_user_id(); if ($current_user_id) { $rated_posts = get_user_meta($current_user_id, 'rated_posts', true); if ($rated_posts) { $current_post_id = get_the_ID(); if (in_array($current_post_id, $rated_posts)) { $criteriaInputs = ''; wp_dequeue_style('jquery.nouislider'); wp_dequeue_script('jquery.nouislider'); } } } else { if (isset($_COOKIE['rated_posts'])) { $rated_posts = explode(',', $_COOKIE['rated_posts']); if ($rated_posts) { $criteriaInputs = ''; wp_dequeue_style('jquery.nouislider'); wp_dequeue_script('jquery.nouislider'); } } } if (is_user_logged_in()) { $fields .= $criteriaInputs; } else { $fields['criteria'] = $criteriaInputs; } return $fields; } else { return $fields; } }
function bgImage($args) { if (!empty($args['template_file'])) { $id = charity_get_page_template($args['template_file'], $by = "ID"); } else { global $post; $id = $post->ID; } $bgImage = vp_metabox('breadcrumb.image', '', $id); $bgDefaultImage = vp_option('vpt_option.img_404'); if (!empty($bgImage)) { printf('style="background-image:url(%s)"', $bgImage); } else { printf('style="background-image:url(%s)"', $bgDefaultImage); //default image } }
function charity_causes_row($column_name, $post_id) { //$custom_fields = get_post_custom( $post_id ); switch ($column_name) { case 'donation-target': echo vp_metabox('doantion-settings.donation-target'); break; case 'doantion-achivement': echo vp_metabox('doantion-settings.donation-achivement'); break; case 'doantion-status': $status = vp_metabox('doantion-settings.doantion-status'); echo $status == 0 ? "off" : "on"; break; default: } }
function video() { global $post; $videoMeta = vp_metabox('cahrity-meta-type-settings.charity-meta-video'); if (!empty($videoMeta[0])): $src = (!empty($videoMeta[0]['upload-video-image'])) ? $videoMeta[0]['upload-video-image'] : false; if ($src): $videoURL = ""; if (!empty($videoMeta[0]['txt-youtube-video-url'])) { $videoURL = $videoMeta[0]['txt-youtube-video-url']; } elseif (!empty($videoMeta[0]['txt-vimeo-video-url'])) { $videoURL = $videoMeta[0]['txt-vimeo-video-url']; } ?> <div class="embed-responsive embed-responsive-16by9"> <img src="<?php echo esc_url(charity_resize($src, 600, 400)); ?>" alt="<?php esc_attr_e("Click to play", "charity"); ?>" data-video='<?php print($videoURL); ?>'/> </div> <?php endif; endif; }
<?php /** * Charity - causes single fullwidth * * @package charity * @version v.1.0 */ if (have_posts()) { while (have_posts()) { the_post(); $shortCodeMeta = vp_metabox('causes-short-code.causesshortcode'); ?> <div class="col-xs-12"> <div class="row article-list-large progressbar"> <div class="col-xs-12 anim-section"> <div class="text-center section-header"> <h2 class="h4"><?php the_title(); ?> </h2> <?php do_action("charity_causes_details_attribute"); ?> </div> <?php if (has_post_thumbnail()) { ?> <figure class="article-pic"><?php the_post_thumbnail("charity_causes_details"); ?>
?> </div> </div> </div> <div class="clean-blog-meta"> <div class="clean-blog-meta-wrapper"> <div class="clean-meta-top"><a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> "><?php echo get_the_author(); ?> </a>, <?php echo get_the_date(); ?> </div> <?php if (!vp_metabox('jkreativ_page_share.hide_share_button', null, JEG_PAGE_ID) && !post_password_required()) { ?> <div class="article-sharing"> <?php jeg_get_template_part('template/blogpost/article-sharing-clean'); ?> </div> <!-- article sharing --> <?php } ?> </div> </div> </div>
<div class="js-portfolio-details-floating"> <h1 class="portfolio-title heading"><?php the_title(); ?> </h1> <div class="portfolio-content"> <?php the_content(); ?> </div> <dl class="portfolio-metadata"> <?php foreach (vp_metabox('_vp_portfolio_info.info') as $info) { ?> <dt><?php echo $info['title']; ?> </dt> <dd><?php echo apply_filters('meta_content', $info['content']); ?> </dd> <?php } ?> </dl> </div>
$statement = array('post_type' => "post", 'orderby' => "date", 'order' => "DESC", 'paged' => $paged, 'posts_per_page' => vp_metabox('jkreativ_page_blogcontent.post_perpage')); if (vp_metabox('jkreativ_page_blogcontent.toggle_filtering') === '1') { $filter = vp_metabox('jkreativ_page_blogcontent.filtering_group.0'); if ($filter['filter_type'] === 'category') { $statement['category__in'] = $filter['filter_category']; } else { if ($filter['filter_type'] === 'tags') { $statement['tag__in'] = $filter['filter_tags']; } } } $query = new WP_Query($statement); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); $blogitemtype = vp_metabox('jkreativ_blog_format.format'); jeg_get_template_part('template/blogpost/clean', $blogitemtype); } } else { } if ($query->max_num_pages > 1) { ?> <div class="blogcleanpaging"> <div class="pagination-wrapper clearfix"> <div class="nav-prev"><?php previous_posts_link('← Older Entries', $query->max_num_pages); ?> </div> <div class="nav-next"><?php next_posts_link('Next Entries →', $query->max_num_pages);
_e('Course Title', 'kazaz'); ?> </th> </tr> </thead> <tbody> <?php while (have_posts()) { the_post(); ?> <tr> <td> <?php $course_id = vp_metabox('course.course_id'); if ($course_id) { echo esc_attr($course_id); } else { echo _x('-----', 'non-existing table value', 'kazaz'); } ?> </td> <td> <a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php the_title_attribute(array('before' => 'Permalink to: ', 'after' => '')); ?> ">
/images/skyi-icon.png"/></a> <?php if ($header_layout_class == 'nav-type-2' || $header_layout_class == 'nav-type-2 centered-nav') { ?> <!-- BEGIN .container or .container-wide --> <div class="<?php echo $main_header_container; ?> "> <?php } ?> <?php if (vp_metabox('misc_settings.hb_onepage') && has_nav_menu('one-page-menu')) { wp_nav_menu(array('theme_location' => 'one-page-menu', 'menu_class' => 'sf-menu ', 'menu_id' => 'main-nav', 'container' => '', 'link_before' => '<span>', 'link_after' => '</span>', 'walker' => new hb_custom_walker())); } else { if (has_nav_menu('main-menu')) { // User has assigned menu to this location wp_nav_menu(array('theme_location' => 'main-menu', 'menu_class' => 'sf-menu ', 'menu_id' => 'main-nav', 'container' => '', 'link_before' => '<span>', 'link_after' => '</span>', 'walker' => new hb_custom_walker())); } else { ?> <ul id="main-nav" class="empty-menu"> <li> <?php _e('Please attach a menu to this menu location in Appearance > Menu.', 'hbthemes'); ?> </li> </ul> <?php
?> <section class="testimonial parallax" style="background-image: url('<?php echo $testimonial_bg; ?> ')"> <div class="overlay"></div> <div class="container"> <div class="row"> <div class="col-xs-12"> <div class="testimonial-slider flexslider"> <ul class="slides"> <?php while (have_posts()) { the_post(); $company = vp_metabox('testimonial.companey_name'); ?> <li> <div class="slide"> <h2><?php echo vp_option('vpt_option.ch_hOne_testimonial_title'); ?> </h2> <blockquote> <?php the_content(); ?> <footer> <span><?php the_title();
<div class="clearfix"></div> </div> <?php } } ?> </div> </div> </div> </div> <script> (function($) { $(document).ready(function() { $(".halfpage").jnormalblog(); $(".halfpage").jfsmap({ zoomfactor : <?php echo vp_metabox('jkreativ_page_fsmap.mapzoom', 14); ?> }); }); })(jQuery); </script> <?php } else { jeg_get_template_part('template/password-form'); } get_footer();
<div class="post_slider media_slider<?php if ($resizer == '1') { ?> blog_slider<?php } else { ?> gallery_top_slider<?php } ?> loading"> <ul class="slides"> <?php foreach ($gallery_images as $gallery_img) { ?> <?php if (vp_metabox('rehub_post_side.post_size') == 'full_post') { ?> <?php if (!empty($gallery_img['gallery_post_video'])) { ?> <li data-thumb="<?php echo parse_video_url($gallery_img['gallery_post_video'], 'hqthumb'); ?> " class="play3"> <?php echo parse_video_url($gallery_img['gallery_post_video'], 'embed', '1130', '604'); ?> </li> <?php } else { ?>
?> </div> </div> </div> </div> </div> </div> <div class="portfolioloader bigloader"></div> <script> (function($){ $(document).ready(function(){ $(".portfoliocontent").jportfoliosingle({ adminurl : '<?php echo admin_url("admin-ajax.php"); ?> ', imgfsmode : '<?php echo vp_metabox("jkreativ_portfolio_ajax.single_scale_mode", "fit"); ?> ' }); }); })(jQuery); </script> <?php } else { jeg_get_template_part('template/password-form'); } get_footer();
<?php $sliderid = jeg_get_slider_id(); ?> <div class="landingslider"> <div class="splitslider"> <div id="slider" class="sl-slider-wrapper"> <div class="sl-slider"> <?php $slideritem = vp_metabox('jkreativ_slider_splitslider.slideritem', null, $sliderid); foreach ($slideritem as $id => $slider) { if ($id % 2 == 0) { echo '<div class="sl-slide" data-orientation="horizontal" data-slice1-rotation="-25" data-slice2-rotation="-25" data-slice1-scale="2" data-slice2-scale="2">'; } else { echo '<div class="sl-slide" data-orientation="vertical" data-slice1-rotation="10" data-slice2-rotation="-15" data-slice1-scale="1.5" data-slice2-scale="1.5">'; } $pos = ''; if ($slider['text_align'] == 'center') { $pos = 'center'; } else { if ($slider['text_align'] == 'left') { $pos = 'leftpos'; } else { if ($slider['text_align'] == 'right') { $pos = 'rightpos'; } } } $secondline = ''; if ($slider['show_secondline']) { $secondline = "<div class='text2'>{$slider['secondline']}</div>";
?> <ul data-speed="<?php echo vp_metabox('jkreativ_slider_fulltext.slide_speed', null, $sliderid); ?> "> <?php foreach ($slidingtext as $text) { echo "<li><h2 class='slider-header'>" . do_shortcode($text['textcontent']) . "</h2></li>"; } ?> </ul> <?php } else { if (vp_metabox('jkreativ_slider_fulltext.effect', null, $sliderid) === 'type') { ?> <?php $slidearea = array(); for ($i = 1; $i < sizeof($slidingtext); $i++) { $slidearea[] = $slidingtext[$i]['textcontent']; } $slidearea[] = $slidingtext[0]['textcontent']; ?> <h2 class="slider-header" data-typer-targets='<?php echo json_encode(array('targets' => $slidearea)); ?> '><?php echo $slidingtext[0]['textcontent']; ?>
?> " <?php if (vp_metabox('post_format_settings.hb_video_post_format.0.hb_video_format_link ')) { post_class('audio-post-format with-featured-image ' . $blog_grid_column_class); } else { post_class('image-post-type ' . $blog_grid_column_class); } ?> itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost"> <?php if (vp_metabox('post_format_settings.hb_video_post_format.0.hb_video_format_link')) { ?> <!-- BEGIN .featured-image --> <div class="featured-image fitVidsAjax"> <?php echo wp_oembed_get(vp_metabox('post_format_settings.hb_video_post_format.0.hb_video_format_link')); ?> </div> <!-- END .featured-image --> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#post-<?php the_ID(); ?> .fitVidsAjax').fitVids(); }); </script> <?php }
<?php $enable_project_link = vp_metabox('jkreativ_portfolio_meta.enable_project_link'); if ($enable_project_link) { ?> <span class="portfolio-meta-line" style=""></span> <div class="portfolio-link"> <span><?php echo vp_metabox('jkreativ_portfolio_meta.project_link.0.title'); ?> </span> <a class="slider-button" target="_blank" href="<?php echo vp_metabox('jkreativ_portfolio_meta.project_link.0.url'); ?> "> <span class="button-text"><?php echo vp_metabox('jkreativ_portfolio_meta.project_link.0.content'); ?> </span> </a> </div> <?php } ?> </div> </div> <!-- end slider content --> <?php } } ?>
<?php /* Template Name: Page for visual layout builder */ $header_disable = vp_metabox('vcr.header_disable'); $footer_disable = vp_metabox('vcr.footer_disable'); $content_type = vp_metabox('vcr.content_type'); if ($content_type == 'def') { $content_type = ''; } if ($header_disable == '1') { ?> <!DOCTYPE html> <!--[if IE 8]> <html class="ie8" <?php language_attributes(); ?> > <![endif]--> <!--[if IE 9]> <html class="ie9" <?php language_attributes(); ?> > <![endif]--> <!--[if (gt IE 9)|!(IE)] <?php language_attributes(); ?> ><![endif]--> <html <?php language_attributes(); ?> > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" />
if (has_post_format('gallery')) { _e("Archive for Gallery posts", "hbthemes"); } } } } } } } } } } } } else { if (vp_metabox('general_settings.hb_page_subtitle', null, $post_id)) { echo vp_metabox('general_settings.hb_page_subtitle', null, $post_id); } } } ?> </h2> <?php } ?> <?php } ?> </div> <!-- END .hb-page-title -->
"><div class="dashicons dashicons-no-alt"></div></li> </ul> </div> </div> <div class="clear"></div> <!-- ooooooooooooooooooooooooooooooooooooooooo IMAGE and MEDIA ooooooooooooooooooooooooooooooooooooooooooo --> <div class="<?php echo $mediawrap; ?> column "> <div class="zl_portimg"> <?php if (1 == vp_metabox('portfolio.additional', $postID)) { ?> <?php $islider = null; if (count($galls) === 1) { $islider = ''; } else { $islider = 'portfolioslide owl-carousel'; } ?> <div class="<?php echo $islider; ?> "> <?php foreach ($galls as $gall) {
if (!vp_metabox('jkreativ_page_meta_top.hide_top_meta', null, JEG_PAGE_ID) && !post_password_required()) { ?> <span class="meta-top">by <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> "><?php echo get_the_author(); ?> </a>, <?php echo get_the_date(); ?> </span> <?php } ?> </div> <div class="article-content"> <p class="post-excerpt"> <?php echo get_the_excerpt(); ?> </p> </div> <?php if (!vp_metabox('jkreativ_page_meta_btm.hide_bottom_meta', null, JEG_PAGE_ID) && !post_password_required()) { jeg_get_template_part('template/blogpost/article-bottom-meta'); } ?> <div class="clearfix"></div> </div>
</div> <?php echo '</li>'; } ?> </ul> </div><!-- /.experience-container --> <div class="experience-container"> <h3 class="educations-title"><?php _e('URL(s)', 'jobboard'); ?> </h3> <ul class="resume-lists"> <?php $urls = vp_metabox('jobboard_resume_mb.url_group_container.0.url_group'); foreach ($urls as $url) { echo '<li>'; ?> <div class="education-name"><strong><?php echo esc_attr($url['url_name']); ?> </strong></div> <span class="education-period"><i class="fa fa-fw fa-link"></i> <a href="<?php echo esc_url($url['url_address']); ?> " target="_blank"><?php echo esc_attr($url['url_address']); ?> </a></span> <?php
</div> <?php /** * woocommerce_after_main_content hook * * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content) */ do_action('woocommerce_after_main_content'); ?> <?php $title = vp_metabox('product_shop_banner.banner_title', '', $id); $sub_title = vp_metabox('product_shop_banner.banner_sub_title', '', $id); $desc = vp_metabox('product_shop_banner.banner_desc', '', $id); if (!empty($title)) { ?> <section class="shop-today"> <div class="container"> <div class="row"> <div class="col-sm-12"> <span class="glyphicon glyphicon-shopping-cart"></span> <h2><?php echo esc_attr($title); ?> <strong><?php echo esc_attr($sub_title); ?> </strong></h2> <p><?php
public function get_media() { global $post; $medias = vp_metabox(VP_PF_MB_MEDIAS_ID); if ($medias !== null and $medias->meta !== '') { $type = vp_metabox(VP_PF_MB_MEDIAS_ID . '.mode'); $medias = $medias->meta[$type]; } else { // pre version 0.2 fallback $type = 'image'; $medias = get_post_meta($post->ID, '_vp_portfolio_images', true); $medias = $medias[$type]; } return array('mode' => $type, 'media' => $medias); }