?> "><?php the_title(); ?> </a></h2> <div class="rehub_catalog_desc"> <?php kama_excerpt('maxchar=' . $exerpt_count . ''); ?> </div> <?php if ($enable_btn) { ?> <?php rehub_create_btn('yes'); ?> <?php } ?> </div> </article> <?php $i++; } } ?> <div class="clearfix"></div> <?php if ($enable_pagination != '') { ?>
function rehub_affbtn_function($atts, $content = null) { extract(shortcode_atts(array('btn_text' => '', 'btn_url' => '', 'btn_price' => '', 'meta_btn_url' => '', 'meta_btn_price' => '', 'button_from_review' => ''), $atts)); if ($button_from_review == '1') { ob_start(); rehub_create_btn(''); $out = ob_get_contents(); ob_end_clean(); } else { $button_url = !empty($meta_btn_url) ? get_post_meta(get_the_ID(), esc_html($meta_btn_url), true) : $btn_url; if (empty($button_url)) { $button_url = get_the_permalink(); } $button_price = !empty($meta_btn_price) ? get_post_meta(get_the_ID(), esc_html($meta_btn_price), true) : $btn_price; $out = '<div class="re_thing_btn clearfix">'; $out .= '<a href="' . esc_url($button_url) . '" class="btn_offer_block" target="_blank" rel="nofollow">'; $out .= '<span class="btn_text">'; if (!empty($btn_text)) { $out .= $btn_text; } elseif (rehub_option('rehub_btn_text') != '') { $out .= rehub_option("rehub_btn_text"); } else { $out .= __("Buy this item", "rehub_framework"); } $out .= '</span>'; if (!empty($button_price)) { $out .= ' / <span class="btn_price">' . esc_html($button_price) . '</span>'; } $out .= '</a></div>'; } return $out; }
function wpsm_toptable_shortcode($atts, $content = null) { extract(shortcode_atts(array('id' => '', 'full_width' => '0'), $atts)); if (isset($atts['id']) && $atts['id']) { $toppost = get_post($atts['id']); $module_cats = get_post_meta($toppost->ID, 'top_review_cat', true); $module_tag = get_post_meta($toppost->ID, 'top_review_tag', true); $module_fetch = intval(get_post_meta($toppost->ID, 'top_review_fetch', true)); $module_ids = get_post_meta($toppost->ID, 'manual_ids', true); $order_choose = get_post_meta($toppost->ID, 'top_review_choose', true); $module_field_sorting = get_post_meta($toppost->ID, 'top_review_field_sort', true); $module_order = get_post_meta($toppost->ID, 'top_review_order', true); $first_column_enable = get_post_meta($toppost->ID, 'first_column_enable', true); $first_column_rank = get_post_meta($toppost->ID, 'first_column_rank', true); $last_column_enable = get_post_meta($toppost->ID, 'last_column_enable', true); $first_column_name = get_post_meta($toppost->ID, 'first_column_name', true) != '' ? esc_html(get_post_meta($toppost->ID, 'first_column_name', true)) : __('Product', 'rehub_framework'); $last_column_name = get_post_meta($toppost->ID, 'last_column_name', true) != '' ? esc_html(get_post_meta($toppost->ID, 'last_column_name', true)) : ''; $affiliate_link = get_post_meta($toppost->ID, 'first_column_link', true); $rows = get_post_meta($toppost->ID, 'columncontents', true); //Get the rows if ($module_fetch == '') { $module_fetch = '10'; } ob_start(); ?> <div class="clearfix"></div> <?php if ($order_choose == 'cat_choose') { ?> <?php $query = array('cat' => $module_cats, 'tag' => $module_tag, 'posts_per_page' => $module_fetch, 'nopaging' => 0, 'post_status' => 'publish', 'ignore_sticky_posts' => 1); ?> <?php if (!empty($module_field_sorting)) { $query['meta_key'] = $module_field_sorting; $query['orderby'] = 'meta_value_num'; } ?> <?php if ($module_order == 'asc') { $query['order'] = 'ASC'; } ?> <?php } elseif ($order_choose == 'manual_choose' && $module_ids != '') { ?> <?php $query = array('post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'orderby' => 'post__in', 'post__in' => $module_ids); ?> <?php } else { ?> <?php $query = array('posts_per_page' => $module_fetch, 'nopaging' => 0, 'post_status' => 'publish', 'ignore_sticky_posts' => 1); ?> <?php if (!empty($module_field_sorting)) { $query['meta_key'] = $module_field_sorting; $query['orderby'] = 'meta_value_num'; } ?> <?php if ($module_order == 'asc') { $query['order'] = 'ASC'; } ?> <?php } ?> <?php $loop = new WP_Query($query); $i = 0; if ($loop->have_posts()) { ?> <?php wp_enqueue_script('tablesorter'); wp_enqueue_style('tabletoggle'); ?> <div class="scrollable_table"> <table data-tablesaw-mode="columntoggle" data-tablesaw-minimap class="tablesaw top_table_block<?php if ($full_width == '1') { ?> full_width_rating<?php } else { ?> with_sidebar_rating<?php } ?> tablesorter" cellspacing="0"> <thead> <tr class="top_rating_heading"> <?php if ($first_column_enable) { ?> <th class="product_col_name" data-tablesaw-sortable-col data-tablesaw-priority="persist"><?php echo $first_column_name; ?> </th><?php } ?> <?php if (!empty($rows)) { $nameid = 0; foreach ($rows as $row) { $col_name = $row['column_name']; echo '<th class="col_name" data-tablesaw-sortable-col data-tablesaw-priority="1">' . esc_html($col_name) . '</th>'; $nameid++; } } ?> <?php if ($last_column_enable) { ?> <th class="buttons_col_name" data-tablesaw-sortable-col data-tablesaw-priority="1"><?php echo $last_column_name; ?> </th><?php } ?> </tr> </thead> <tbody> <?php while ($loop->have_posts()) { $loop->the_post(); $i++; ?> <tr class="top_rating_item" id='rank_<?php echo $i; ?> '> <?php if ($first_column_enable) { ?> <td class="product_image_col"> <?php if (vp_metabox('rehub_post_side.is_editor_choice') == '1') { ?> <div class="ed_choice_label"><img src="<?php echo get_template_directory_uri(); ?> /images/editor_hor_badge.png" width="115" height="36" alt=""></div><?php } ?> <figure> <?php if (!is_paged() && $first_column_rank) { ?> <span class="rank_count"><?php if ($i == '1') { ?> <i class="fa fa-trophy"></i><?php } else { echo $i; } ?> </span><?php } ?> <?php $link_on_thumb = $affiliate_link != '' ? rehub_create_affiliate_link() : get_the_permalink(); ?> <?php $link_on_thumb_target = $affiliate_link != '' ? ' class="btn_offer_block"' : ''; ?> <a href="<?php echo $link_on_thumb; ?> " target="_blank"<?php echo $link_on_thumb_target; ?> > <?php $img = get_post_thumb(); $nothumb = get_template_directory_uri() . '/images/default/noimage_100_70.png'; if (rehub_option('aq_resize_crop') == '1') { $params = array('width' => 100); } else { $params = array('width' => 100, 'height' => 100, 'crop' => true); } ?> <?php if (!empty($img)) { ?> <img src="<?php echo bfi_thumb($img, $params); ?> " alt="<?php the_title_attribute(); ?> " /> <?php } else { ?> <img src="<?php echo $nothumb; ?> " alt="<?php the_title_attribute(); ?> " /> <?php } ?> </a> </figure> </td> <?php } ?> <?php if (!empty($rows)) { $pbid = 0; foreach ($rows as $row) { $centered = $row['column_center'] == '1' ? ' centered_content' : ''; echo '<td class="column_' . $pbid . ' column_content' . $centered . '">'; echo do_shortcode(wp_kses_post($row['column_html'])); $element = $row['column_type']; if ($element == 'meta_value') { include locate_template('inc/top/metacolumn.php'); } else { if ($element == 'review_function') { include locate_template('inc/top/reviewcolumn.php'); } else { if ($element == 'user_review_function') { include locate_template('inc/top/userreviewcolumn.php'); } else { } } } echo '</td>'; $pbid++; } } ?> <?php if ($last_column_enable) { ?> <td class="buttons_col"> <?php rehub_create_btn(''); ?> </td> <?php } ?> </tr> <?php } ?> </tbody> </table> </div> <?php } else { _e('No posts for this criteria.', 'rehub_framework'); ?> <?php } ?> <?php wp_reset_query(); ?> <?php $output = ob_get_contents(); ob_end_clean(); return $output; } }
?> </span></div> <?php } else { ?> <div class="score"> <span class="it_score"><?php echo rehub_get_overall_score(); ?> </span></div> <?php } ?> </div> <div class="buttons_col"> <?php rehub_create_btn(''); ?> <a href="<?php the_permalink(); ?> " class="read_full"><?php if (rehub_option('rehub_review_text') != '') { echo rehub_option('rehub_review_text'); } else { _e('Read full review', 'rehub_child'); } ?> </a> </div> </div> <?php
?> <?php } ?> </div> <?php } ?> <?php if ($catalog_readmore == 'buybutton') { ?> <div class="rehub_catalog_readmore"> <?php rehub_create_btn('no'); ?> </div> <?php } elseif ($catalog_readmore == 'read') { ?> <div class="rehub_catalog_readmore"> <?php if (vp_metabox('rehub_post_side.read_more_custom')) { ?> <a href="<?php the_permalink(); ?> " class="btn_more btn_more_custom"><?php echo strip_tags(vp_metabox('rehub_post_side.read_more_custom'));