function foundation_featured_slider($manual = false, $manual_html = false) { global $foundation_featured_posts; $settings = foundation_get_settings(); $args = foundation_featured_get_args(); if ($manual == false && $settings->featured_enabled) { $slides = new WP_Query(array('post__in' => $foundation_featured_posts)); if ($slides->post_count > 0) { echo $args['before']; echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n"; echo "<div class='swipe-wrap'>\n"; while ($slides->have_posts()) { $slides->the_post(); $image = foundation_featured_has_image(); if ($image) { get_template_part('featured-slider'); } } echo "</div>\n"; echo "</div>\n"; echo $args['after']; } } else { // Private for now, we'll improve manual mode for customer use in 3.2 echo $args['before']; echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n"; echo "<div class='swipe-wrap'>\n"; echo $manual_html; echo "</div>\n"; echo "</div>\n"; echo $args['after']; } }
function foundation_featured_slider() { global $foundation_featured_posts; $settings = foundation_get_settings(); $args = foundation_featured_get_args(); if (featured_should_show_slider()) { if (function_exists('wptouch_custom_posts_add_to_search')) { $post_types = wptouch_custom_posts_add_to_search(array('post', 'page')); } else { $post_types = array('post', 'page'); } $slides = new WP_Query(array('ignore_sticky_posts' => 1, 'post__in' => $foundation_featured_posts, 'post_type' => $post_types, 'posts_per_page' => $settings->featured_max_number_of_posts)); if ($slides->post_count > 0) { foundation_featured_prefix($args); while ($slides->have_posts()) { $slides->the_post(); $image = foundation_featured_has_image(); if (apply_filters('wptouch_has_post_thumbnail', $image)) { get_template_part('featured-slider'); } } foundation_featured_postfix($args); } } }
function foundation_featured_slider($manual = false, $manual_html = false) { global $foundation_featured_data; $args = foundation_featured_get_args(); $settings = foundation_get_settings(); if ($manual == false && count($foundation_featured_data) >= FOUNDATION_FEATURED_MIN_NUM && $settings->featured_enabled) { echo $args['before']; echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n"; echo "<div class='swipe-wrap'>\n"; foreach ($foundation_featured_data as $image_data) { echo "<div class='one-swipe-image' style='visibility: hidden;'>"; echo "<a href='" . $image_data->link . "' class='needsclick'>"; echo "<div class='comments-number'><span>" . $image_data->comments_number . "</span></div>"; echo "<img src='" . $image_data->image . "' alt='" . $image_data->title . "' / >"; if ($settings->featured_title_date) { echo "<p class='featured-date'>" . $image_data->date . "</p>"; echo "<p class='featured-title'><span>" . $image_data->title . "</span></p>"; } echo "</a>"; echo "</div>"; } echo "</div>\n"; echo "</div>\n"; echo $args['after']; // Private for now, we'll improve manual mode for customer use in 3.2 } elseif ($manual == true) { echo $args['before']; echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n"; echo "<div class='swipe-wrap'>\n"; echo $manual_html; echo "</div>\n"; echo "</div>\n"; echo $args['after']; } }
function foundation_featured_slider($manual = false, $manual_html = false) { global $foundation_featured_posts; $args = foundation_featured_get_args(); if (featured_should_show_slider()) { if ($manual == false) { if (function_exists('wptouch_custom_posts_add_to_search')) { $post_types = wptouch_custom_posts_add_to_search(array('post', 'page')); } else { $post_types = array('post', 'page'); } $slides = new WP_Query(array('ignore_sticky_posts' => 1, 'post__in' => $foundation_featured_posts, 'post_type' => $post_types)); if ($slides->post_count > 0) { echo $args['before']; echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n"; echo "<div class='swipe-wrap'>\n"; while ($slides->have_posts()) { $slides->the_post(); $image = foundation_featured_has_image(); if (apply_filters('wptouch_has_post_thumbnail', $image)) { get_template_part('featured-slider'); } } echo "</div>\n"; echo "</div>\n"; echo $args['after']; } } else { // Private for now, we'll improve manual mode for customer use in 3.2 echo $args['before']; echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n"; echo "<div class='swipe-wrap'>\n"; echo $manual_html; echo "</div>\n"; echo "</div>\n"; echo $args['after']; } wp_reset_query(); } }
function foundation_featured_slider() { global $foundation_featured_data; $args = foundation_featured_get_args(); $settings = foundation_get_settings(); if (count($foundation_featured_data) >= FOUNDATION_FEATURED_MIN_NUM) { echo $args['before']; echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n"; echo "<div class='swipe-wrap'>\n"; foreach ($foundation_featured_data as $image_data) { echo "<div class='one-swipe-image' style='visibility: hidden;'>"; echo "<a href='" . $image_data->link . "' class='needsclick'>"; echo "<div class='comments-number'><span>" . $image_data->comments_number . "</span></div>"; echo "<img src='" . $image_data->image . "' alt='" . $image_data->title . "' / >"; if ($settings->featured_title_date) { echo "<p class='featured-date'>" . $image_data->date . "</p>"; echo "<p class='featured-title'><span>" . $image_data->title . "</span></p>"; } echo "</a>"; echo "</div>"; } echo "</div>\n"; echo "</div>\n"; echo $args['after']; } }