本文整理汇总了PHP中avia_pagination函数的典型用法代码示例。如果您正苦于以下问题:PHP avia_pagination函数的具体用法?PHP avia_pagination怎么用?PHP avia_pagination使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了avia_pagination函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: avia_woocommerce_after_shop_loop
function avia_woocommerce_after_shop_loop()
{
global $avia_config;
if (isset($avia_config['dynamic_template'])) {
return;
}
if (isset($avia_config['overview'])) {
echo avia_pagination('', 'nav');
}
echo "</div></main>";
//end content
}
开发者ID:Jiersone,项目名称:mac,代码行数:12,代码来源:config.php
示例2: html
public function html()
{
global $woocommerce, $woocommerce_loop;
$output = "";
global $avia_config;
$output = "";
avia_post_slider::$slide++;
extract($this->atts);
$extraClass = 'first';
$grid = 'one_third';
$image_size = 'portfolio';
$post_loop_count = 1;
$loop_counter = 1;
$autoplay = $autoplay == "no" ? false : true;
$total = $columns % 2 ? "odd" : "even";
$woocommerce_loop['columns'] = $columns;
switch ($columns) {
case "1":
$grid = 'av_fullwidth';
$image_size = 'large';
break;
case "2":
$grid = 'av_one_half';
break;
case "3":
$grid = 'av_one_third';
break;
case "4":
$grid = 'av_one_fourth';
$image_size = 'portfolio_small';
break;
case "5":
$grid = 'av_one_fifth';
$image_size = 'portfolio_small';
break;
}
$data = AviaHelper::create_data_string(array('autoplay' => $autoplay, 'interval' => $interval, 'animation' => $animation, 'hoverpause' => 1));
ob_start();
if (have_posts()) {
echo "<div {$data} class='template-shop avia-content-slider avia-content-{$type}-active avia-content-slider" . avia_post_slider::$slide . " avia-content-slider-{$total} {$class} shop_columns_{$columns}' >";
if ($sort == "dropdown") {
avia_woocommerce_frontend_search_params();
}
echo "<div class='avia-content-slider-inner'>";
if ($type == 'grid') {
echo '<ul class="products">';
}
while (have_posts()) {
the_post();
if ($loop_counter == 1 && $type == 'slider') {
echo '<ul class="products slide-entry-wrap">';
}
woocommerce_get_template_part('content', 'product');
$loop_counter++;
$post_loop_count++;
if ($loop_counter > $columns) {
$loop_counter = 1;
}
if ($loop_counter == 1 && $type == 'slider') {
echo '</ul>';
}
}
// end of the loop.
if ($loop_counter != 1 || $type == 'grid') {
echo '</ul>';
}
echo "</div>";
if ($post_loop_count - 1 > $columns && $type == 'slider') {
echo $this->slide_navigation_arrows();
}
echo "</div>";
} else {
if (!woocommerce_product_subcategories(array('before' => '<ul class="products">', 'after' => '</ul>'))) {
echo "<p>" . __('No products found which match your selection.', 'woocommerce') . "</p>";
}
}
echo '<div class="clear"></div>';
$products = ob_get_clean();
$output .= $products;
if ($paginate == "yes" && ($avia_pagination = avia_pagination('', 'nav'))) {
$output .= "<div class='pagination-wrap pagination-slider'>{$avia_pagination}</div>";
}
wp_reset_query();
return $output;
}
开发者ID:DylanPeti,项目名称:socialize,代码行数:85,代码来源:productslider.php
示例3: html
//.........这里部分代码省略.........
case "excerpt":
$excerpt = $prepare_excerpt;
$title = $entry->post_title;
break;
case "excerpt_read_more":
$excerpt = $prepare_excerpt;
$excerpt .= $permalink;
$title = $entry->post_title;
break;
case "title":
$excerpt = '';
$title = $entry->post_title;
break;
case "title_read_more":
$excerpt = $permalink;
$title = $entry->post_title;
break;
case "only_excerpt":
$excerpt = $prepare_excerpt;
$title = '';
break;
case "only_excerpt_read_more":
$excerpt = $prepare_excerpt;
$excerpt .= $permalink;
$title = '';
break;
case "no":
$excerpt = '';
$title = '';
break;
}
if ($loop_counter == 1) {
$output .= "<div class='slide-entry-wrap'>";
}
$post_format = get_post_format($the_id) ? get_post_format($the_id) : 'standard';
$markup = avia_markup_helper(array('context' => 'entry', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup));
$output .= "<article class='slide-entry flex_column {$style} {$post_class} {$grid} {$extraClass} {$thumb_class}' {$markup}>";
$output .= $thumbnail ? "<a href='{$link}' data-rel='slide-" . avia_post_slider::$slide . "' class='slide-image' title=''>{$thumbnail}</a>" : "";
if ($post_format == "audio") {
$current_post = array();
$current_post['content'] = $entry->post_content;
$current_post['title'] = $entry->post_title;
$current_post = apply_filters('post-format-' . $post_format, $current_post);
if (!empty($current_post['before_content'])) {
$output .= '<div class="big-preview single-big audio-preview">' . $current_post['before_content'] . '</div>';
}
}
$output .= "<div class='slide-content'>";
$markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup));
$output .= '<header class="entry-content-header">';
$output .= !empty($title) ? "<h3 class='slide-entry-title entry-title' {$markup}><a href='{$link}' title='" . esc_attr(strip_tags($title)) . "'>" . $title . "</a></h3>" : '';
$output .= '</header>';
if ($show_meta && !empty($excerpt)) {
$output .= "<div class='slide-meta'>";
if ($commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio') {
$link_add = $commentCount === "0" ? "#respond" : "#comments";
$text_add = $commentCount === "1" ? __('Comment', 'avia_framework') : __('Comments', 'avia_framework');
$output .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a></div><div class='slide-meta-del'>/</div>";
}
$markup = avia_markup_helper(array('context' => 'entry_time', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup));
$output .= "<time class='slide-meta-time updated' {$markup}>" . get_the_time(get_option('date_format'), $the_id) . "</time>";
$output .= "</div>";
}
$markup = avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup));
$excerpt = apply_filters('avf_post_slider_entry_excerpt', $excerpt, $prepare_excerpt, $permalink, $entry);
$output .= !empty($excerpt) ? "<div class='slide-entry-excerpt entry-content' {$markup}>" . $excerpt . "</div>" : "";
$output .= "</div>";
$output .= '<footer class="entry-footer"></footer>';
$output .= "</article>";
$loop_counter++;
$post_loop_count++;
$extraClass = "";
if ($loop_counter > $columns) {
$loop_counter = 1;
$extraClass = 'first';
}
if ($loop_counter == 1 || !empty($last)) {
$output .= "</div>";
}
}
$output .= "</div>";
if ($post_loop_count - 1 > $columns && $type == 'slider') {
$output .= $this->slide_navigation_arrows();
}
if ($use_main_query_pagination == 'yes' && $paginate == "yes") {
global $wp_query;
$avia_pagination = avia_pagination($wp_query->max_num_pages, 'nav');
} else {
if ($paginate == "yes") {
$avia_pagination = avia_pagination($this->entries->max_num_pages, 'nav');
}
}
if (!empty($avia_pagination)) {
$output .= "<div class='pagination-wrap pagination-slider'>{$avia_pagination}</div>";
}
$output .= "</div>";
$output = str_replace('{{thumbnail}}', $thumb_fallback, $output);
wp_reset_query();
return $output;
}
开发者ID:erikdukker,项目名称:medisom,代码行数:101,代码来源:postslider.php
示例4: wp_link_pages
wp_link_pages(array('before' => '<div class="pagination_split_post">', 'after' => '</div>', 'pagelink' => '<span>%</span>'));
if (has_tag() && is_single()) {
echo '<span class="blog-tags minor-meta">';
the_tags('<strong>' . __('Tags:', 'avia_framework') . '</strong><span> ');
echo '</span></span>';
}
echo "<div class='post_delimiter'></div>";
echo "</div>";
echo "<div class='post_author_timeline'></div>";
echo "</div>";
$post_loop_count++;
}
} else {
?>
<div class="entry">
<h2 class='post-title'><?php
_e('Nothing Found', 'avia_framework');
?>
</h2>
<p><?php
_e('Sorry, no posts matched your criteria', 'avia_framework');
?>
</p>
</div>
<?php
}
if (empty($avia_config['remove_pagination'])) {
echo "<div class='{$blog_style}'>" . avia_pagination() . "</div>";
}
开发者ID:bluedrone,项目名称:plugins,代码行数:31,代码来源:loop-index.php
示例5: html
function html()
{
if (empty($this->loop)) {
return;
}
$output = "";
$items = "";
$size = strpos($this->atts['size'], 'fixed') !== false ? 'fixed' : "flex";
$auto = strpos($this->atts['size'], 'masonry') !== false ? true : false;
$manually = strpos($this->atts['size'], 'manually') !== false ? true : false;
$defaults = array('ID' => '', 'thumb_ID' => '', 'title' => '', 'url' => '', 'class' => array(), 'date' => '', 'excerpt' => '', 'data' => '', 'attachment' => array(), 'attachment_overlay' => array(), 'bg' => "", 'before_content' => '', 'text_before' => '', 'text_after' => '', 'img_before' => '');
$output .= "<div id='av-masonry-" . self::$element . "' class='av-masonry noHover av-{$size}-size av-{$this->atts['gap']}-gap av-hover-overlay-{$this->atts['overlay_fx']} av-masonry-col-{$this->atts['columns']} av-caption-{$this->atts['caption_display']} {$this->atts['container_class']}' >";
$output .= $this->atts['sort'] != "no" ? $this->sort_buttons() : "";
$output .= "<div class='av-masonry-container isotope av-js-disabled ' >";
$all_sorts = array();
$sort_array = array();
foreach ($this->loop as $entry) {
extract(array_merge($defaults, $entry));
$img_html = "";
$img_style = "";
if ($this->atts['sort'] != "no") {
$sort_array = $this->sort_array($entry['ID']);
}
$class_string = implode(' ', $class) . ' ' . implode(' ', $sort_array);
$all_sorts = array_merge($all_sorts, $sort_array);
if (!empty($attachment)) {
$alt = get_post_meta($thumb_ID, '_wp_attachment_image_alt', true);
$alt = !empty($alt) ? esc_attr($alt) : '';
$title = esc_attr(get_the_title($thumb_ID));
if (isset($attachment[0])) {
$img_html = '<img src="' . $attachment[0] . '" title="' . $title . '" alt="' . $alt . '" />';
$img_style = 'style="background-image: url(' . $attachment[0] . ');"';
$class_string .= " av-masonry-item-with-image";
}
if (isset($attachment_overlay[0])) {
$over_html = '<img src="' . $attachment_overlay[0] . '" title="' . $title . '" alt="' . $alt . '" />';
$over_style = 'style="background-image: url(' . $attachment_overlay[0] . ');"';
$img_before = '<div class="av-masonry-image-container av-masonry-overlay" ' . $over_style . '>' . $over_html . '</div>';
}
$bg = '<div class="av-masonry-outerimage-container">' . $img_before . '<div class="av-masonry-image-container" ' . $img_style . '>' . $img_html . '</div></div>';
} else {
$class_string .= " av-masonry-item-no-image";
}
if ($size == 'fixed') {
if (!empty($attachment) || !empty($before_content)) {
if ($auto) {
$class_string .= $this->ratio_check_by_image_size($attachment);
}
if ($manually) {
$class_string .= $this->ratio_check_by_tag($entry['tags']);
}
}
}
$linktitle = "";
if ($post_type == 'attachment' && strpos($html_tags[0], 'a href=') !== false) {
$linktitle = 'title="' . esc_attr($description) . '"';
} else {
if (strpos($html_tags[0], 'a href=') !== false) {
$linktitle = 'title="' . esc_attr($the_title) . '"';
}
}
$markup = $post_type == 'attachment' ? avia_markup_helper(array('context' => 'image_url', 'echo' => false, 'id' => $entry['ID'], 'custom_markup' => $this->atts['custom_markup'])) : avia_markup_helper(array('context' => 'entry', 'echo' => false, 'id' => $entry['ID'], 'custom_markup' => $this->atts['custom_markup']));
$items .= "<{$html_tags[0]} class='{$class_string}' {$linktitle} {$markup}>";
$items .= "<div class='av-inner-masonry-sizer'></div>";
//responsible for the size
$items .= "<figure class='av-inner-masonry main_color'>";
$items .= $bg;
//title and excerpt
if ($this->atts['caption_elements'] != 'none' || !empty($text_add)) {
$items .= "<figcaption class='av-inner-masonry-content site-background'><div class='av-inner-masonry-content-pos'><div class='avia-arrow'></div>" . $text_before;
if (strpos($this->atts['caption_elements'], 'title') !== false) {
$markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'id' => $entry['ID'], 'custom_markup' => $this->atts['custom_markup']));
$items .= "<h3 class='av-masonry-entry-title entry-title' {$markup}>{$the_title}</h3>";
}
if (strpos($this->atts['caption_elements'], 'excerpt') !== false && !empty($content)) {
$markup = avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'id' => $entry['ID'], 'custom_markup' => $this->atts['custom_markup']));
$items .= "<div class='av-masonry-entry-content entry-content' {$markup}>{$content}</div>";
}
$items .= $text_after . "</div></figcaption>";
}
$items .= "</figure>";
$items .= "</{$html_tags[1]}><!--end av-masonry entry-->";
}
//if its an ajax call return the items only without container
if (isset($this->atts['action']) && $this->atts['action'] == 'avia_ajax_masonry_more') {
return $items;
}
// if its no ajax load prepend an empty invisible element as the first element. this is used for calculating the correct width of a default element.
// in theory this is not necessary because the masonry can detect that with an extra js parameter but sorting becomes slugish if that param is set
$all_sort_string = implode(' ', array_unique($all_sorts));
$items = "<div class='av-masonry-entry isotope-item av-masonry-item-no-image {$all_sort_string}'></div>" . $items;
$output .= $items;
$output .= "</div>";
//append pagination
if ($this->atts['paginate'] == "pagination" && ($avia_pagination = avia_pagination($this->entries->max_num_pages, 'nav'))) {
$output .= "<div class='av-masonry-pagination av-masonry-pagination-{$this->atts['paginate']}'>{$avia_pagination}</div>";
} else {
if ($this->atts['paginate'] == "load_more" && $this->entries->max_num_pages > count($this->entries)) {
$output .= $this->load_more_button();
}
//.........这里部分代码省略.........
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:101,代码来源:masonry_entries.php
示例6: html
//.........这里部分代码省略.........
case "lightbox":
$link = wp_get_attachment_image_src(get_post_thumbnail_id($the_id), 'large');
$link = $link[0];
break;
default:
$link = get_permalink($the_id);
break;
}
$title_link = get_permalink($the_id);
$custom_link = get_post_meta($the_id, '_portfolio_custom_link', true) != "" ? get_post_meta($the_id, '_portfolio_custom_link_url', true) : false;
if ($custom_link) {
$title_link = $link = $custom_link;
}
$excerpt = '';
$title = '';
switch ($contents) {
case "excerpt":
$excerpt = $entry->post_excerpt;
$title = $entry->post_title;
break;
case "title":
$excerpt = '';
$title = $entry->post_title;
break;
case "only_excerpt":
$excerpt = $entry->post_excerpt;
$title = '';
break;
case "no":
$excerpt = '';
$title = '';
break;
}
$custom_overlay = apply_filters('avf_portfolio_custom_overlay', "", $entry);
$link_markup = apply_filters('avf_portfolio_custom_image_container', array("a href='{$link}' title='" . esc_attr(strip_tags($title)) . "' ", 'a'), $entry);
$title = apply_filters('avf_portfolio_title', $title, $entry);
$title_link = apply_filters('avf_portfolio_title_link', $title_link, $entry);
if ($columns == "1" && $one_column_template == 'special') {
$extraClass .= ' special_av_fullwidth ';
$output .= "<div data-ajax-id='{$the_id}' class=' grid-entry flex_column isotope-item all_sort {$style_class} {$post_class} {$sort_class} {$grid} {$extraClass}'>";
$output .= "<article class='main_color inner-entry' " . avia_markup_helper(array('context' => 'entry', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup)) . ">";
$output .= apply_filters('avf_portfolio_extra', "", $entry);
$output .= "<div class='av_table_col first portfolio-entry grid-content'>";
if (!empty($title)) {
$markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup));
$output .= '<header class="entry-content-header">';
$output .= "<h2 class='portfolio-grid-title entry-title' {$markup}><a href='{$title_link}'>" . $title . "</a></h2>";
$output .= '</header>';
}
if (!empty($excerpt)) {
$markup = avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup));
$output .= "<div class='entry-content-wrapper'>";
$output .= "<div class='grid-entry-excerpt entry-content' {$markup}>" . $excerpt . "</div>";
$output .= "</div>";
}
$output .= '<div class="avia-arrow"></div>';
$output .= "</div>";
$image = get_the_post_thumbnail($the_id, $image_size);
if (!empty($image)) {
$output .= "<div class='av_table_col portfolio-grid-image'>";
$output .= "<" . $link_markup[0] . " data-rel='grid-" . avia_post_grid::$grid . "' class='grid-image avia-hover-fx'>" . $custom_overlay . $image . "</" . $link_markup[1] . ">";
$output .= "</div>";
}
$output .= '<footer class="entry-footer"></footer>';
$output .= "</article>";
$output .= "</div>";
} else {
$extraClass .= ' default_av_fullwidth ';
$output .= "<div data-ajax-id='{$the_id}' class=' grid-entry flex_column isotope-item all_sort {$style_class} {$post_class} {$sort_class} {$grid} {$extraClass}'>";
$output .= "<article class='main_color inner-entry' " . avia_markup_helper(array('context' => 'entry', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup)) . ">";
$output .= apply_filters('avf_portfolio_extra', "", $entry);
$output .= "<" . $link_markup[0] . " data-rel='grid-" . avia_post_grid::$grid . "' class='grid-image avia-hover-fx'>" . $custom_overlay . get_the_post_thumbnail($the_id, $image_size) . "</" . $link_markup[1] . ">";
$output .= !empty($title) || !empty($excerpt) ? "<div class='grid-content'><div class='avia-arrow'></div>" : '';
if (!empty($title)) {
$markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup));
$output .= '<header class="entry-content-header">';
$output .= "<h3 class='grid-entry-title entry-title' {$markup}><a href='{$title_link}' title='" . esc_attr(strip_tags($title)) . "'>" . $title . "</a></h3>";
$output .= '</header>';
}
$output .= !empty($excerpt) ? "<div class='grid-entry-excerpt entry-content' " . avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup)) . ">" . $excerpt . "</div>" : '';
$output .= !empty($title) || !empty($excerpt) ? "</div>" : '';
$output .= '<footer class="entry-footer"></footer>';
$output .= "</article>";
$output .= "</div>";
}
$loop_counter++;
$post_loop_count++;
$extraClass = "";
if ($loop_counter > $columns) {
$loop_counter = 1;
$extraClass = 'first';
}
}
$output .= "</div>";
//append pagination
if ($paginate == "yes" && ($avia_pagination = avia_pagination($this->entries->max_num_pages, 'nav'))) {
$output .= "<div class='pagination-wrap pagination-{$post_type}'>{$avia_pagination}</div>";
}
return $output;
}
开发者ID:DylanPeti,项目名称:socialize,代码行数:101,代码来源:portfolio.php
示例7: shop
/**
* This function creates the html code necessary for a woocommerce shop section. It uses the woocommerce shop loop to do that
*
* @param array $element is an array with all the data necessary for creating the html code (it contains the element data and the saved values for the element)
* @return string $output the string returned contains the html code generated within the method
*/
function shop($element)
{
$output = "";
//check if the plugin is enabled
if (!avia_woocommerce_enabled()) {
$url = network_site_url('wp-admin/plugin-install.php?tab=search&type=term&s=WooCommerce&plugin-search-input=Search+Plugins');
$output = "<p><strong>You need to install and activate the <a href='{$url}'>WooCommerce Shop Plugin</a> to display Products</strong></p>";
return $output;
}
extract($element['saved_value'][0]);
global $avia_config, $more, $woocommerce_loop;
if ($shop_columns == 5 && strpos($avia_config['layout'], 'dual') !== false) {
$shop_columns = 4;
}
if ($shop_text == 'yes') {
$avia_config['shop_overview_excerpt'] = 'active';
}
$woocommerce_loop['columns'] = $avia_config['shop_overview_column'] = $shop_columns;
$order = get_option('woocommerce_default_catalog_orderby');
if (!$order) {
$order = "menu_order";
}
$avia_config['new_query'] = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, "paged" => get_query_var('paged'), 'posts_per_page' => $shop_item_count, 'orderby' => $order, 'order' => 'desc', 'meta_query' => array(array('key' => '_visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN')));
if (empty($shop_cats_dynamic) || $shop_cats_dynamic == 'null') {
$avia_config['new_query']['post_type'] = "product";
} else {
$avia_config['new_query']['tax_query'] = array(array('taxonomy' => 'product_cat', 'field' => 'id', 'terms' => explode(',', $shop_cats_dynamic), 'operator' => 'IN'));
}
query_posts($avia_config['new_query']);
ob_start();
if (have_posts()) {
do_action('woocommerce_before_shop_loop');
echo '<ul class="products">';
woocommerce_product_subcategories();
while (have_posts()) {
the_post();
woocommerce_get_template_part('content', 'product');
}
// end of the loop.
echo '</ul>';
do_action('woocommerce_after_shop_loop');
} else {
if (!woocommerce_product_subcategories(array('before' => '<ul class="products">', 'after' => '</ul>'))) {
echo "<p>" . __('No products found which match your selection.', 'woocommerce') . "</p>";
}
}
echo '<div class="clear"></div>';
$products = ob_get_clean();
$output .= "<div class='container_wrap " . $avia_config['layout'] . " template-shop shop_columns_" . $avia_config['shop_overview_column'] . "'>";
$output .= "<div class='template-shop content shop_slider_{$shop_slider}' data-interval='{$shop_autorotate}'>";
$output .= $products;
if ($shop_pagination == 'yes') {
$output .= avia_pagination();
}
$output .= "</div>";
$output .= "</div>";
wp_reset_query();
return $output;
}
开发者ID:eddiewilson,项目名称:new-ke,代码行数:65,代码来源:helper-templates.php
示例8: shortcode_handler
/**
* Frontend Shortcode Handler
*
* @param array $atts array of attributes
* @param string $content text within enclosing form of shortcode element
* @param string $shortcodename the shortcode found, when == callback name
* @return string $output returns the modified html string
*/
function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
{
$atts = shortcode_atts(array('categories' => "", 'items' => "3", 'paginate' => "no"), $atts, $this->config['shortcode']);
$output = "";
$posts = $this->query_entries($atts);
$entries = $posts->posts;
if (class_exists('Tribe__Events__Pro__Main')) {
$ecp = Tribe__Events__Pro__Main::instance();
$ecp->disable_recurring_info_tooltip();
}
if (!empty($entries)) {
global $post;
$default_id = $post->ID;
$output .= "<div class='av-upcoming-events " . $meta['el_class'] . "'>";
foreach ($entries as $entry) {
$class = "av-upcoming-event-entry";
$image = get_the_post_thumbnail($entry->ID, 'square', array('class' => 'av-upcoming-event-image'));
$class .= !empty($image) ? " av-upcoming-event-with-image" : " av-upcoming-event-without-image";
$title = get_the_title($entry->ID);
$link = get_permalink($entry->ID);
$post->ID = $entry->ID;
//temp set of the post id so that tribe fetches the correct price symbol
$price = tribe_get_cost($entry->ID, true);
$venue = tribe_get_venue($entry->ID);
$post->ID = $default_id;
$output .= "<a href='{$link}' class='{$class}'>";
if ($image) {
$output .= $image;
}
$output .= "<span class='av-upcoming-event-data'>";
$output .= "<h4 title='av-upcoming-event-title'>{$title}</h4>";
$output .= "<span class='av-upcoming-event-meta'>";
$output .= "<span class='av-upcoming-event-schedule'>" . tribe_events_event_schedule_details($entry) . "</span>";
if ($price) {
$output .= "<span class='av-upcoming-event-cost'>{$price}</span>";
}
if ($price && $venue) {
$output .= " - ";
}
if ($venue) {
$output .= "<span class='av-upcoming-event-venue'>{$venue}</span>";
}
$output .= apply_filters('avf_upcoming_event_extra_data', "", $entry);
$output .= "</span>";
$output .= "</span>";
$output .= "</a>";
}
if ($atts['paginate'] == "yes" && ($avia_pagination = avia_pagination($posts->max_num_pages, 'nav'))) {
$output .= "<div class='pagination-wrap pagination-" . Tribe__Events__Main::POSTTYPE . "'>{$avia_pagination}</div>";
}
$output .= "</div>";
}
if (class_exists('Tribe__Events__Pro__Main')) {
// Re-enable recurring event info
$ecp->enable_recurring_info_tooltip();
}
return $output;
}
开发者ID:erikdukker,项目名称:medisom,代码行数:66,代码来源:events_upcoming.php
示例9: _e
_e('You might want to consider some of our suggestions to get better results:', 'avia_framework');
?>
</p>
<ul>
<li><?php
_e('Check your spelling.', 'avia_framework');
?>
</li>
<li><?php
_e('Try a similar keyword, for example: tablet instead of laptop.', 'avia_framework');
?>
</li>
<li><?php
_e('Try using more than one keyword.', 'avia_framework');
?>
</li>
</ul>
<div class='hr_invisible'></div>
<h3 class=''><?php
_e('Feel like browsing some posts instead?', 'avia_framework');
?>
</h3>
<?php
the_widget('avia_combo_widget', 'error404widget', array('widget_id' => 'arbitrary-instance-' . $id, 'before_widget' => '<div class="widget avia_combo_widget">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>'));
echo '</section>';
echo "</article>";
}
echo avia_pagination('', 'nav');
开发者ID:gbaumgart,项目名称:enfold-wordpress-theme,代码行数:30,代码来源:loop-search.php
示例10: html_list
public function html_list()
{
global $woocommerce, $avia_config, $wp_query;
$output = "";
avia_post_slider::$slide++;
extract($this->atts);
$extraClass = 'first';
$grid = 'av_fullwidth';
$post_loop_count = 0;
$loop_counter = 0;
$total = $columns % 2 ? "odd" : "even";
$posts_per_col = ceil($wp_query->post_count / $columns);
switch ($columns) {
case "1":
$grid = 'av_fullwidth';
break;
case "2":
$grid = 'av_one_half';
break;
case "3":
$grid = 'av_one_third';
break;
case "4":
$grid = 'av_one_fourth';
break;
case "5":
$grid = 'av_one_fifth';
break;
}
ob_start();
if (have_posts()) {
while (have_posts()) {
the_post();
$post_loop_count++;
$loop_counter++;
if ($loop_counter === 1) {
echo "<div class='{$grid} {$extraClass} flex_column av-catalogue-column'>";
echo "<div class='av-catalogue-container av-catalogue-container-woo' >";
echo "<ul class='av-catalogue-list'>";
$extraClass = "";
}
global $product;
$link = $product->add_to_cart_url();
$ajax_class = 'add_to_cart_button product_type_simple';
$text = "";
$title = get_the_title();
$content = get_the_excerpt();
$price = $product->get_price_html();
$rel = "";
if (empty($link_behavior)) {
$cart_url = get_the_permalink();
$ajax_class = "";
} else {
$cart_url = $product->add_to_cart_url();
$ajax_class = $product->is_purchasable() ? "add_to_cart_button" : "";
$rel = $product->is_purchasable() ? "rel='nofollow'" : "";
}
$image = get_the_post_thumbnail($product->id, 'square', array('class' => "av-catalogue-image av-cart-update-image av-catalogue-image-{$show_images}"));
$text .= $image;
$text .= "<div class='av-catalogue-item-inner'>";
$text .= "<div class='av-catalogue-title-container'><div class='av-catalogue-title av-cart-update-title'>{$title}</div><div class='av-catalogue-price av-cart-update-price'>{$price}</div></div>";
$text .= "<div class='av-catalogue-content'>{$content}</div>";
$text .= "</div>";
echo "<li>";
//coppied from templates/loop/add-to-cart.php - class and rel attr changed, as well as text
echo apply_filters('woocommerce_loop_add_to_cart_link', sprintf('<a %s href="%s" data-product_id="%s" data-product_sku="%s" class="av-catalogue-item %s product_type_%s">%s</a>', $rel, esc_url($cart_url), esc_attr($product->id), esc_attr($product->get_sku()), $ajax_class, esc_attr($product->product_type), $text), $product);
echo "</li>";
if ($loop_counter == $posts_per_col || $post_loop_count == $wp_query->post_count) {
echo "</ul>";
echo "</div>";
echo "</div>";
$loop_counter = 0;
}
}
// end of the loop.
}
$products = ob_get_clean();
$output .= $products;
if ($paginate == "yes" && ($avia_pagination = avia_pagination('', 'nav'))) {
$output .= "<div class='pagination-wrap pagination-slider'>{$avia_pagination}</div>";
}
wp_reset_query();
return $output;
}
开发者ID:erikdukker,项目名称:medisom,代码行数:84,代码来源:productslider.php
示例11: shortcode_handler
/**
* Frontend Shortcode Handler
*
* @param array $atts array of attributes
* @param string $content text within enclosing form of shortcode element
* @param string $shortcodename the shortcode found, when == callback name
* @return string $output returns the modified html string
*/
function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
{
$atts = shortcode_atts(array('categories' => "", 'items' => "3", 'paginate' => "no"), $atts, $this->config['shortcode']);
$output = "";
$posts = $this->query_entries($atts);
$entries = $posts->posts;
if (!empty($entries)) {
$output .= "<div class='av-upcoming-events " . $meta['el_class'] . "'>";
foreach ($entries as $entry) {
$class = "av-upcoming-event-entry";
$image = get_the_post_thumbnail($entry->ID, 'square', array('class' => 'av-upcoming-event-image'));
$class .= empty($image) ? " av-upcoming-event-with-image" : " av-upcoming-event-without-image";
$title = get_the_title($entry->ID);
$link = get_permalink($entry->ID);
$price = tribe_get_cost($entry->ID, true);
$venue = tribe_get_venue($entry->ID);
$output .= "<a href='{$link}' class='{$class}'>";
if ($image) {
$output .= $image;
}
$output .= "<div class='av-upcoming-event-data'>";
$output .= "<h4 title='av-upcoming-event-title'>{$title}</h4>";
$output .= "<div class='av-upcoming-event-meta'>";
$output .= "<span class='av-upcoming-event-schedule'>" . tribe_events_event_schedule_details($entry) . "</span>";
if ($price) {
$output .= "<span class='av-upcoming-event-cost'>{$price}</span>";
}
if ($price && $venue) {
$output .= " - ";
}
if ($venue) {
$output .= "<span class='av-upcoming-event-venue'>{$venue}</span>";
}
$output .= apply_filters('avf_upcoming_event_extra_data', "", $entry);
$output .= "</div>";
$output .= "</div>";
$output .= "</a>";
}
if ($atts['paginate'] == "yes" && ($avia_pagination = avia_pagination($posts->max_num_pages, 'nav'))) {
$output .= "<div class='pagination-wrap pagination-" . TribeEvents::POSTTYPE . "'>{$avia_pagination}</div>";
}
$output .= "</div>";
}
return $output;
}
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:53,代码来源:events_upcoming.php
示例12: the_content
the_content(__('Read more →', 'avia_framework'));
?>
</div>
</div><!--end post-entry-->
<?php
}
} else {
?>
<div class="entry">
<h1 class='post-title'><?php
_e('Nothing Found', 'avia_framework');
?>
</h1>
<p><?php
_e('Sorry, no posts matched your criteria', 'avia_framework');
?>
</p>
</div>
<?php
}
if (!isset($avia_config['remove_pagination'])) {
echo avia_pagination();
}
开发者ID:eddiewilson,项目名称:new-ke,代码行数:31,代码来源:loop-archive.php
注:本文中的avia_pagination函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论