예제 #1
0
        if (get_query_var('paged')) {
            $paged = get_query_var('paged');
        } elseif (get_query_var('page')) {
            $paged = get_query_var('page');
        } else {
            $paged = 1;
        }
        $curpage = $paged ? $paged : 1;
        ?>
			
			<ul class="page-numbers">
					
				<?php 
        for ($p = 1; $p <= $loop->max_num_pages; $p++) {
            echo '<li>' . ($p == $curpage ? '<span ' : '<a ') . ' class="' . ($p == $curpage ? 'current ' : '') . 'page-numbers" href="' . get_pagenum_link($p) . '">' . $p . '</' . ($p == $curpage ? 'span ' : 'a ') . '></li>';
        }
        ?>
					
			</ul>

		</nav>
			
	<?php 
    }
} else {
    // loads the no deals found message template
    wps_deals_get_template('global/no-deals.php');
}
wp_reset_query();
?>
	
예제 #2
0
 * @hooked wps_deals_breadcrumb - 20
 */
do_action('wps_deals_before_main_content');
?>

	<?php 
if (have_posts()) {
    ?>

		<?php 
    while (have_posts()) {
        the_post();
        ?>

			<?php 
        wps_deals_get_template('content-single-deal.php');
        ?>

			<?php 
        comments_template('', true);
        ?>
			
		<?php 
    }
    // end of the loop.
    ?>
		
	<?php 
}
?>
/**
 * Load Checkout Credit Card Form
 * 
 * Handles to show checkout credit card form
 * 
 * @package Social Deals Engine
 * @since 1.0.0
 */
function wps_deals_cart_cc_form()
{
    //load facebook button template
    wps_deals_get_template('checkout/checkout-footer/cc-form.php');
}
 /**
  * Output Deals content.
  * 
  * This function is only used in the optional 'deals-engine.php' template
  * which people can add to their themes to add basic deals support
  * without hooks or modifying core templates.
  * 
  * @package Social Deals Engine
  * @since 2.0.6
  **/
 function deals_content()
 {
     global $wps_deals_options;
     // get deal size
     $deal_size = $wps_deals_options['deals_size_archive'];
     if (is_single() && get_post_type() == WPS_DEALS_POST_TYPE) {
         //do_action( 'wps_deals_before_main_content' );
         do_action('wps_deals_theme_before_main_content');
         if (have_posts()) {
             while (have_posts()) {
                 the_post();
                 wps_deals_get_template('content-single-deal.php');
                 comments_template('', true);
             }
         }
         //do_action( 'wps_deals_after_main_content' );
     } elseif (is_post_type_archive(WPS_DEALS_POST_TYPE) || is_tax(WPS_DEALS_POST_TAXONOMY) || is_tax(WPS_DEALS_POST_TAGS)) {
         if (apply_filters('wps_deals_show_page_title', true)) {
             echo '<h1 class="page-title">' . wps_deals_page_title() . '</h1>';
         }
         echo '<div class="deals-archive ' . $deal_size . ' deals-row">';
         do_action('wps_deals_theme_before_main_content');
         do_action('wps_deals_archive_description');
         do_action('wps_deals_archive_deals');
         echo '</div>';
     }
 }
 /**
  * Display Multiple Deals from shortcode
  * 
  * Handles to display multiple deals from shortcode
  * 
  * @package Social Deals Engine
  * @since 1.0.0
  */
 public function wps_deals_multiple_deals($atts)
 {
     global $post, $wps_deals_options;
     extract(shortcode_atts(array('ids' => '', 'disable_price' => '', 'disable_timer' => ''), $atts));
     $html = '';
     if (!empty($ids)) {
         // Check ids are not empty
         $ids = explode(',', $ids);
         $prefix = WPS_DEALS_META_PREFIX;
         //current date and time
         $today = wps_deals_current_date('Y-m-d H:i:s');
         /* all active deals listing start */
         $dealsmetaquery = array(array('key' => $prefix . 'start_date', 'value' => $today, 'compare' => '<=', 'type' => 'STRING'), array('key' => $prefix . 'end_date', 'value' => $today, 'compare' => '>=', 'type' => 'STRING'));
         $argssrcd = array('post_type' => WPS_DEALS_POST_TYPE, 'post__in' => $ids, 'meta_query' => $dealsmetaquery, 'posts_per_page' => '-1');
         ob_start();
         //active deals template
         wps_deals_get_template('home-deals/more-deals/more-deals.php', array('args' => $argssrcd, 'tab' => '', 'options' => array('disable_price' => $disable_price, 'disable_timer' => $disable_timer)));
         $html .= ob_get_clean();
     }
     echo $html;
 }
 /**
  * Lost Password Page
  * 
  * Handles to lost password page for
  * deals
  * 
  * @package Social Deals engine
  * @since 1.0.0
  **/
 public function wps_deals_lost_password($atts, $content)
 {
     ob_start();
     wps_deals_get_template('lost-password.php');
     $content .= ob_get_clean();
     return $content;
 }