'
: '')
);
if (lorem_ipsum_books_media_store_param_is_on($custom) && $content) {
$output .= do_shortcode($content);
} else {
global $post;
if (!empty($ids)) {
$posts = explode(',', $ids);
$count = count($posts);
}
$args = array(
'post_type' => 'testimonial',
'post_status' => 'publish',
'posts_per_page' => $count,
'ignore_sticky_posts' => true,
'order' => $order=='asc' ? 'asc' : 'desc',
);
if ($offset > 0 && empty($ids)) {
$args['offset'] = $offset;
}
$args = lorem_ipsum_books_media_store_query_add_sort_order($args, $orderby, $order);
$args = lorem_ipsum_books_media_store_query_add_posts_and_cats($args, $ids, 'testimonial', $cat, 'testimonial_group');
$query = new WP_Query( $args );
$post_number = 0;
while ( $query->have_posts() ) {
$query->the_post();
$post_number++;
$args = array(
'layout' => $style,
'show' => false,
'number' => $post_number,
'posts_on_page' => ($count > 0 ? $count : $query->found_posts),
"descr" => lorem_ipsum_books_media_store_get_custom_option('post_excerpt_maxlength'.($columns > 1 ? '_masonry' : '')),
"orderby" => $orderby,
'content' => false,
'terms_list' => false,
'columns_count' => $columns,
'slider' => $slider,
'tag_id' => $id ? $id . '_' . $post_number : '',
'tag_class' => '',
'tag_animation' => '',
'tag_css' => '',
'tag_css_wh' => $ws . $hs
);
$post_data = lorem_ipsum_books_media_store_get_post_data($args);
$post_data['post_content'] = wpautop($post_data['post_content']); // Add
around text and paragraphs. Need separate call because 'content'=>false (see above)
$post_meta = get_post_meta($post_data['post_id'], lorem_ipsum_books_media_store_storage_get('options_prefix').'_testimonial_data', true);
$thumb_sizes = lorem_ipsum_books_media_store_get_thumb_sizes(array('layout' => $style));
$args['author'] = $post_meta['testimonial_author'];
$args['position'] = $post_meta['testimonial_position'];
$args['link'] = !empty($post_meta['testimonial_link']) ? $post_meta['testimonial_link'] : ''; $args['email'] = $post_meta['testimonial_email'];
$args['photo'] = $post_data['post_thumb'];
$mult = lorem_ipsum_books_media_store_get_retina_multiplier();
if (empty($args['photo']) && !empty($args['email'])) $args['photo'] = get_avatar($args['email'], $thumb_sizes['w']*$mult);
$output .= lorem_ipsum_books_media_store_show_post_layout($args, $post_data);
}
wp_reset_postdata();
}
if (lorem_ipsum_books_media_store_param_is_on($slider)) {
$output .= '
'
. '
'
. ''
. '