";
//}
return $markup;
}
/************************************************************************************************************
*
*
*
* [ markup parts - post title]
*
*
* return @array
************************************************************************************************************/
function wppizza_filter_menu_loop_title($markup, $post , $txt, $additives, $parameters, $is_rtl, $category, $articlecount){
/********************
parameters for convenience
*********************/
global $wppizza_options;
/* classes filter parameters */
$filter_parameters = $this->set_post_classes_filter_parameters($post, $parameters, $articlecount) ;
/*single category, provided item does actually belong to one */
if(!empty($post->wppizza_data['category'])){
$category = $post->wppizza_data['category'];
}else{
/* we need a category, lets just get the first one else use first available */
$category = wppizza_force_first_category();
}
/*********************
get style
*********************/
$style = $filter_parameters['layout']['style'];
/*********************
set title
*********************/
$post_title = apply_filters('wppizza_filter_post_title', $post->post_title , $post->ID);
/********************
set id's
*********************/
/* title id: including postid, sizes id, +zero to trigger first if set */
$post_title_id = ''.WPPIZZA_SLUG.'-article-'.$post->blog_id.'-'.$category['id'].'-'.$post->ID.'-'.$post->wppizza_data['sizes'].'-0';
/* additives id */
$post_additives_id = ''.WPPIZZA_SLUG.'-article-additives-'.$post->ID.'';
/* foodtype id */
$post_foodtype_id = ''.WPPIZZA_SLUG.'-article-ftypes-'.$post->ID.'';
/********************
set h2 elemnt
********************/
$post_title_element = apply_filters('wppizza_filter_post_title_element', 'h2');
/*********************
set title classes
*********************/
$post_title_class = array();
/*
h2
*/
$post_title_class['elm'] = array();
$post_title_class['elm'][] = ''.WPPIZZA_POST_TYPE.'-article-'.$post_title_element.'';
/**
if selected in admin, make click on title add to cart or
show alert when there are more than one size
**/
if(!empty($wppizza_options['layout']['add_to_cart_on_title_click'])){
/*no of prices/sizes*/
$numberOfPrices=count($post->wppizza_data['prices']);
/*trigger add to cart**/
if($numberOfPrices==1){
$post_title_class['elm'][]=' '.WPPIZZA_SLUG.'-trigger-click';
}
/*more than one size available, show alert**/
if($numberOfPrices>1){
$post_title_class['elm'][]=' '.WPPIZZA_SLUG.'-trigger-choose';
}
}
/*
title
*/
$post_title_class['title'] = array();
$post_title_class['title'][] = ''.WPPIZZA_POST_TYPE.'-article-title';
/*
additives
*/
$post_title_class['additives'] = array();
$post_title_class['additives'][] = ''.WPPIZZA_POST_TYPE.'-article-additives';
/*
foodtype
*/
$post_title_class['foodtype'] = array();
$post_title_class['foodtype'][] = ''.WPPIZZA_POST_TYPE.'-article-ftypes';
/*
add "has_icons" class - although not used in the title by default - if icons are associated with any allergen or foodtype
to allow for
*/
if(!empty($post->wppizza_data['allergens_icon']) || !empty($post->wppizza_data['foodtype_icon'])){
$post_title_class['additives'][] = ''.WPPIZZA_POST_TYPE.'-article-additives-icons';
$post_title_class['foodtype'][] = ''.WPPIZZA_POST_TYPE.'-article-ftypes-icons';
}
/**
allow filtering
**/
$post_title_class= apply_filters('wppizza_filter_post_title_class', $post_title_class, $filter_parameters['post_data'], $filter_parameters['layout'], $filter_parameters['parameters'], $filter_parameters['articlecount'], $filter_parameters['session']);
/*
implode for output
*/
$post_title_class['elm']= implode(' ', $post_title_class['elm']);
$post_title_class['title']= implode(' ', $post_title_class['title']);
$post_title_class['additives']= implode(' ', $post_title_class['additives']);
$post_title_class['foodtype']= implode(' ', $post_title_class['foodtype']);
/*
food types
$map to full food types vars
*/
$post_foodtype = $this->get_post_aaf($post, 'foodtype', 'ftype');
/*
allergens
$map to full allergens vars
*/
$post_allergens = $this->get_post_aaf($post, 'allergens', 'allergen');
/*
additives
$map to full additives vars
*/
$post_additives = $this->get_post_aaf($post, 'additives', 'article-additive');
/*************************
markup
*************************/
if(file_exists( WPPIZZA_TEMPLATE_DIR . '/markup/loop/posts.title.php')){
require(WPPIZZA_TEMPLATE_DIR.'/markup/loop/posts.title.php');
}else{
require(WPPIZZA_PATH.'templates/markup/loop/posts.title.php');
}
/*********************
apply filter if required
*********************/
$markup = apply_filters('wppizza_filter_post_title_markup', $markup, $style);
return $markup;
}
/************************************************************************************************************
*
*
*
* [ markup parts - foodtype - only used when using elements='foodtype' attribute in shortcode]
*
*
* return @array
************************************************************************************************************/
function wppizza_filter_menu_loop_foodtype($markup, $post , $txt, $additives, $parameters, $is_rtl, $category, $articlecount){
/********************
parameters for convenience
*********************/
global $wppizza_options;
/* classes filter parameters */
$filter_parameters = $this->set_post_classes_filter_parameters($post, $parameters, $articlecount) ;
/*********************
get style
*********************/
$style = $filter_parameters['layout']['style'];
/********************
set id's
*********************/
/* foodtype id */
$foodtype_loop_id = ''.WPPIZZA_SLUG.'-post-ftypes-'.$post->ID.'';
/********************
set span elemnt
********************/
$foodtype_loop_element = apply_filters('wppizza_filter_post_foodtype_element', 'span');
/*********************
set classes
*********************/
$foodtype_loop_class = array();
/*
additives wrapper classes
*/
$foodtype_loop_class['foodtype'] = array();
$foodtype_loop_class['foodtype'][] = ''.WPPIZZA_POST_TYPE.'-post-ftypes';
/*
add "has_icons" class - although not used by default - if icons are associated with any allergen or foodtype
to allow for
*/
if(!empty($post->wppizza_data['foodtype_icon'])){
$foodtype_loop_class['foodtype'][] = ''.WPPIZZA_POST_TYPE.'-post-ftypes-icons';
}
/**
allow filtering
**/
$foodtype_loop_class= apply_filters('wppizza_filter_post_foodtype_class', $foodtype_loop_class, $filter_parameters['post_data'], $filter_parameters['layout'], $filter_parameters['parameters'], $filter_parameters['articlecount'], $filter_parameters['session']);
/*
implode for output
*/
$foodtype_loop_class['additives']= implode(' ', $foodtype_loop_class['foodtype']);
/*
foodtype
$map to full allergens vars
*/
$post_foodtype = $this->get_post_aaf($post, 'foodtype', 'ftype');
/*************************
markup
*************************/
if(file_exists( WPPIZZA_TEMPLATE_DIR . '/markup/loop/posts.foodtype.php')){
require(WPPIZZA_TEMPLATE_DIR.'/markup/loop/posts.foodtype.php');
}else{
require(WPPIZZA_PATH.'templates/markup/loop/posts.foodtype.php');
}
/*********************
apply filter if required
*********************/
$markup = apply_filters('wppizza_filter_post_foodtype_markup', $markup, $style);
return $markup;
}
/************************************************************************************************************
*
*
*
* [ markup parts - additives - only used when using elements='additives' attribute in shortcode]
*
*
* return @array
************************************************************************************************************/
function wppizza_filter_menu_loop_additives($markup, $post , $txt, $additives, $parameters, $is_rtl, $category, $articlecount){
/********************
parameters for convenience
*********************/
global $wppizza_options;
/* classes filter parameters */
$filter_parameters = $this->set_post_classes_filter_parameters($post, $parameters, $articlecount) ;
/*********************
get style
*********************/
$style = $filter_parameters['layout']['style'];
/********************
set id's
*********************/
/* additives id */
$additives_loop_id = ''.WPPIZZA_SLUG.'-post-additives-'.$post->ID.'';
/********************
set span elemnt
********************/
$additive_loop_element = apply_filters('wppizza_filter_post_additives_element', 'span');
/*********************
set classes
*********************/
$additives_loop_class = array();
/*
additives wrapper classes
*/
$additives_loop_class['additives'] = array();
$additives_loop_class['additives'][] = ''.WPPIZZA_POST_TYPE.'-post-additives';
/*
add "has_icons" class - although not used by default - if icons are associated with any allergen
to allow for
*/
if(!empty($post->wppizza_data['allergens_icon'])){
$additives_loop_class['additives'][] = ''.WPPIZZA_POST_TYPE.'-post-additives-icons';
}
/**
allow filtering
**/
$additives_loop_class= apply_filters('wppizza_filter_post_additives_class', $additives_loop_class, $filter_parameters['post_data'], $filter_parameters['layout'], $filter_parameters['parameters'], $filter_parameters['articlecount'], $filter_parameters['session']);
/*
implode for output
*/
$additives_loop_class['additives']= implode(' ', $additives_loop_class['additives']);
/*
allergens
$map to full allergens vars
*/
$post_allergens = $this->get_post_aaf($post, 'allergens', 'allergen');
/*
additives
$map to full additives vars
*/
$post_additives = $this->get_post_aaf($post, 'additives', 'article-additive');
/*************************
markup
*************************/
if(file_exists( WPPIZZA_TEMPLATE_DIR . '/markup/loop/posts.additives.php')){
require(WPPIZZA_TEMPLATE_DIR.'/markup/loop/posts.additives.php');
}else{
require(WPPIZZA_PATH.'templates/markup/loop/posts.additives.php');
}
/*********************
apply filter if required
*********************/
$markup = apply_filters('wppizza_filter_post_additives_markup', $markup, $style);
return $markup;
}
/************************************************************************************************************
*
*
*
* [ markup parts - thumbnail/placeholder]
*
*
* return @array
************************************************************************************************************/
function wppizza_filter_menu_loop_thumbnail($markup, $post , $txt, $additives, $parameters, $is_rtl, $category, $articlecount){
/********************
parameters for convenience
*********************/
global $wppizza_options;
/* classes filter parameters */
$filter_parameters = $this->set_post_classes_filter_parameters($post, $parameters, $articlecount) ;
$image_placeholder = $parameters['global']['template']['attributes']['image_placeholder'];
$image_prettyphoto = $parameters['global']['template']['attributes']['image_prettyphoto'];
/* check if string or array of 2 int (w/h in pixels) */
$xfImgSize = explode('x', $wppizza_options['layout']['featured_image_size']);
if(count($xfImgSize) == 2 && is_int($xfImgSize[0]) && is_int($xfImgSize[1])){
$featured_image_size = array($xfImgSize[0], $xfImgSize[1]);
}else{
$featured_image_size = $wppizza_options['layout']['featured_image_size'];
}
/*********************
get style
*********************/
$style = $filter_parameters['layout']['style'];
/********************
set id's
*********************/
$post_thumbnail_id = ''.WPPIZZA_SLUG.'-article-img-'.$post->ID.'';
/*********************
set thumbmail classes
*********************/
$post_thumbnail_class = array();
$post_thumbnail_class['div'][] = ''.WPPIZZA_SLUG.'-article-image';
$post_thumbnail_class['placeholder'][] = ''.WPPIZZA_SLUG.'-article-image-placeholder';
/*
allow filtering
*/
$post_thumbnail_class= apply_filters('wppizza_filter_post_thumbnail_class', $post_thumbnail_class, $filter_parameters['post_data'], $filter_parameters['layout'], $filter_parameters['parameters'], $filter_parameters['articlecount'], $filter_parameters['session']);
/*
implode for output
*/
$post_thumbnail_class['div']= implode(' ', $post_thumbnail_class['div']);
$post_thumbnail_class['placeholder']= implode(' ', $post_thumbnail_class['placeholder']);
/**********************
create image/thumbnail elements for output
**********************/
$has_thumbnail = !empty($post->has_post_thumbnail) ? true : false ;
$has_placeholder = (empty($post->has_post_thumbnail) && !empty($image_placeholder) ) ? true : false ;
/**create the actual image markup */
if(!empty($has_thumbnail)){
$featured_image = '';
if(!empty($image_prettyphoto)){
$full_image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full' );
$featured_image .= '
';
}
$featured_image .= get_the_post_thumbnail($post->ID, apply_filters('wppizza_filter_featured_image_size', $featured_image_size), array('class' => ''.WPPIZZA_SLUG.'-article-image-thumb', 'title'=>$post->the_title_attribute));
if(!empty($image_prettyphoto)){
$featured_image.= "";
}
}
/*************************
markup
*************************/
if(file_exists( WPPIZZA_TEMPLATE_DIR . '/markup/loop/posts.thumbnail.php')){
require(WPPIZZA_TEMPLATE_DIR.'/markup/loop/posts.thumbnail.php');
}else{
require(WPPIZZA_PATH.'templates/markup/loop/posts.thumbnail.php');
}
/*********************
apply filter if required
*********************/
$markup = apply_filters('wppizza_filter_post_thumbnail_markup', $markup, $style, $has_thumbnail, $has_placeholder);
return $markup;
}
/************************************************************************************************************
*
*
*
* [ markup parts - category]
*
*
* return @array
************************************************************************************************************/
function wppizza_filter_menu_loop_category($markup, $post , $txt, $additives, $parameters, $is_rtl, $category, $articlecount){
/********************
parameters for convenience
*********************/
/* classes filter parameters */
$filter_parameters = $this->set_post_classes_filter_parameters($post, $parameters, $articlecount) ;
$post_category = $category;
/*********************
get style
*********************/
$style = $filter_parameters['layout']['style'];
/*********************
set category classes
*********************/
$post_category_class = array();
/*general class*/
$post_category_class[] = ''.WPPIZZA_SLUG.'-category';
$post_category_class[] = ''.WPPIZZA_SLUG.'-category-'.$post_category['id'].'';
$post_category_class[] = ''.WPPIZZA_SLUG.'-category-'.$post_category['slug'].'';
/*
allow filtering
*/
$post_category_class = apply_filters('wppizza_filter_post_category_class', $post_category_class, $filter_parameters['post_data'], $filter_parameters['layout'], $filter_parameters['parameters'], $filter_parameters['articlecount'], $filter_parameters['session']);
/*
implode for output
*/
$post_category_class = implode(' ', $post_category_class);
/*************************
markup
*************************/
if(file_exists( WPPIZZA_TEMPLATE_DIR . '/markup/loop/posts.category.php')){
require(WPPIZZA_TEMPLATE_DIR.'/markup/loop/posts.category.php');
}else{
require(WPPIZZA_PATH.'templates/markup/loop/posts.category.php');
}
/*********************
apply filter if required
*********************/
$markup = apply_filters('wppizza_filter_post_category_markup', $markup, $style);
return $markup;
}
/************************************************************************************************************
*
*
*
* [ markup parts - prices, sizes, currency symbols]
*
*
* return @array
************************************************************************************************************/
function wppizza_filter_menu_loop_prices($markup, $post , $txt, $additives, $parameters, $is_rtl, $category, $articlecount){
/********************
parameters for convenience
*********************/
global $wppizza_options;
$prices = $post->wppizza_data['prices'];
$sizes_id = $post->wppizza_data['sizes'];
/* classes filter parameters */
$filter_parameters = $this->set_post_classes_filter_parameters($post, $parameters, $articlecount) ;
/*symbol*/
$currency=$wppizza_options['order_settings']['currency_symbol'];
/*position or omit main currency symbol*/
$currency_display = $parameters['global']['template']['attributes']['currency_main'];
/*single category, provided item does actually belong to one , else use first available*/
if(!empty($post->wppizza_data['category'])){
$category = $post->wppizza_data['category'];
}else{
/* we need a category, lets just get the first one else use first available */
$category = wppizza_force_first_category();
}
/* add to cart trigger class if set */
$addtocarttriggerclass = 'add-to-cart';
/********************
main, large currency symbol position
********************/
$currency_left = ($currency_display==='left' ) ? true : false ;
$currency_right = ($currency_display==='right' ) ? true : false ;
/*********************
get style
*********************/
$style = $filter_parameters['layout']['style'];
/********************
set sizes/prices id's
*********************/
$post_sizes_id = ''.WPPIZZA_SLUG.'-article-sizes-'.$post->ID.'';
$post_prices_id = ''.WPPIZZA_SLUG.'-article-prices-'.$post->ID.'';
/*********************
set sizes/prices classes
*********************/
$post_prices_class = array();
/*wrapper outer class*/
$post_prices_class['sizes'][] = ''.WPPIZZA_SLUG.'-article-sizes';
$post_prices_class['sizes'][] = ''.WPPIZZA_SLUG.'-article-prices-'.$sizes_id.'';
/*wrapper inner class*/
$post_prices_class['prices'][] = ''.WPPIZZA_SLUG.'-article-prices';
/*class currency*/
$post_prices_class['currency'][] = ''.WPPIZZA_SLUG.'-article-price-currency';
$post_prices_class['currency'][] = (!empty($currency_left)) ? ''.WPPIZZA_SLUG.'-article-price-right' : ''.WPPIZZA_SLUG.'-article-price-left';
/*
allow filtering
*/
$post_prices_class = apply_filters('wppizza_filter_post_prices_class', $post_prices_class, $filter_parameters['post_data'], $filter_parameters['layout'], $filter_parameters['parameters'], $filter_parameters['articlecount'], $filter_parameters['session']);
/*
implode for output
*/
$post_prices_class['sizes']= implode(' ', $post_prices_class['sizes']);
$post_prices_class['prices']= implode(' ', $post_prices_class['prices']);
$post_prices_class['currency']= implode(' ', $post_prices_class['currency']);
/*
individual prices
add id's, classes, titels
*/
foreach($prices as $key=>$price){
$idComponents = array($post->blog_id, $category['id'], $post->ID, $sizes_id, $key);
/*id consists of prefix - blogid - category id - post id - selected sizes - seleted size*/
$prices[$key]['id'] = ''.WPPIZZA_SLUG.'-'.implode('-', $idComponents).'';
/*class price, allow add to cart if enabled and not viewonly in shortcode*/
$prices[$key]['class_price'] = ''.WPPIZZA_SLUG.'-article-price '.WPPIZZA_SLUG.'-article-price-'.$sizes_id.'-'.$key.' '.WPPIZZA_SLUG.'-price-'.$post->ID.'-'.$key.'';
$prices[$key]['class_price'] .= ( empty($wppizza_options['layout']['disable_online_order']) && empty($parameters['global']['include']['viewonly']) ) ? ' '.WPPIZZA_SLUG.'-'.$addtocarttriggerclass.'' : '' ;
$prices[$key]['class_price'] .= (!empty($wppizza_options['layout']['disable_online_order']) || !empty($parameters['global']['include']['viewonly'])) ? ' '.WPPIZZA_SLUG.'-article-price-viewonly' : '' ;
/* class for span surrounding price - empty by default,but filterable !*/
$prices[$key]['class_price_span'] = '';
/*tile attribute - if applicable*/
$prices[$key]['title'] = !empty($wppizza_options['layout']['disable_online_order']) || !empty($parameters['global']['include']['viewonly']) ? '' : ' title="'.$txt['add_to_cart'].'"' ;
/*class size, add nocart class if required*/
$prices[$key]['class_size'] = ''.WPPIZZA_SLUG.'-article-size';
$prices[$key]['class_size'] .= !empty($wppizza_options['layout']['hide_cart_icon']) || !empty($wppizza_options['layout']['disable_online_order']) || !empty($parameters['global']['include']['viewonly']) ? ' '.WPPIZZA_SLUG.'-no-cart' : '' ;
/**no label - hide pricetiers if only one and set to hide*/
$prices[$key]['no_label'] = (!empty($wppizza_options['layout']['hide_single_pricetier']) && count($prices)<=1) ? true : false ;
/**set to "free" if zero */
$prices[$key]['price'] = (empty($price['value']) && !empty($wppizza_options['prices_format']['localize_zero_price']) && !empty($wppizza_options['localization']['localize_zero_price']) ) ? $wppizza_options['localization']['localize_zero_price'] : $price['price'] ;
/**
data-attributes since v3.19.3
currently id only, but can be expanded by adding to this array
by filter here or with the wppizza_filter_post_prices if we need to in the future
**/
$data_attributes = apply_filters( 'wppizza_filter_loop_data_attributes', array(
/* raw id without any prefixes, dot separated */
'id' => implode('.', $idComponents),
), $idComponents );
$attributes = array();
foreach($data_attributes as $attKey => $attribute){
$attributes[$attKey] = 'data-'.wppizza_alpha_only($attKey).'="'.esc_html($attribute).'"';
}
$prices[$key]['data'] = ' '.implode(' ', $attributes).' ';
}
/* allow filtering */
$prices = apply_filters('wppizza_filter_post_prices', $prices, $post, $style);
/*************************
markup
*************************/
if(file_exists( WPPIZZA_TEMPLATE_DIR . '/markup/loop/posts.prices.php')){
require(WPPIZZA_TEMPLATE_DIR.'/markup/loop/posts.prices.php');
}else{
require(WPPIZZA_PATH.'templates/markup/loop/posts.prices.php');
}
/*********************
apply filter if required
*********************/
$markup = apply_filters('wppizza_filter_post_prices_markup', $markup, $style, $post, $prices);
return $markup;
}
/************************************************************************************************************
*
*
*
* [ markup parts - post content]
*
*
* return @array
************************************************************************************************************/
function wppizza_filter_menu_loop_content($markup, $post , $txt, $additives, $parameters, $is_rtl, $category, $articlecount){
global $wppizza_options;
/********************
parameters for convenience
*********************/
/* classes filter parameters */
$filter_parameters = $this->set_post_classes_filter_parameters($post, $parameters, $articlecount) ;
/*********************
get style
*********************/
$style = $filter_parameters['layout']['style'];
/********************
set content id
*********************/
$post_content_id = ''.WPPIZZA_SLUG.'-article-content-'.$post->ID.'';
/*********************
set content classes
*********************/
$post_content_class = array();
/*general class*/
$post_content_class[] = ''.WPPIZZA_SLUG.'-article-content';
/*
allow filtering
*/
$post_content_class = apply_filters('wppizza_filter_post_content_class', $post_content_class, $filter_parameters['post_data'], $filter_parameters['layout'], $filter_parameters['parameters'], $filter_parameters['articlecount'], $filter_parameters['session']);
/*
implode for output
*/
$post_content_class = implode(' ', $post_content_class);
/*
allow read more link
*/
if(!empty($wppizza_options['layout']['allow_read_more_link'])){
$post->post_content = get_the_content( null, false, $post);
}
/*
allow shortcodes and other filters
*/
$post_content_element = 'p';
if(!empty($wppizza_options['layout']['apply_menu_items_content_filter'])){
$post_content_element = 'div';
$post->post_content = apply_filters('the_content', $post->post_content);
}
/*
allow wppizza specific post content filter
*/
$post->post_content = apply_filters('wppizza_filter_post_content', $post->post_content , $post->ID);
/*************************
markup
*************************/
if(file_exists( WPPIZZA_TEMPLATE_DIR . '/markup/loop/posts.content.php')){
require(WPPIZZA_TEMPLATE_DIR.'/markup/loop/posts.content.php');
}else{
require(WPPIZZA_PATH.'templates/markup/loop/posts.content.php');
}
/*********************
apply filter if required
*********************/
$markup = apply_filters('wppizza_filter_post_content_markup', $markup, $style, $post->ID);
return $markup;
}
/************************************************************************************************************
*
*
*
* [ markup parts - permalink]
*
*
* return @array
************************************************************************************************************/
function wppizza_filter_menu_loop_permalink($markup, $post , $txt, $additives, $parameters, $is_rtl, $category, $articlecount){
/********************
parameters for convenience
*********************/
/* classes filter parameters */
$filter_parameters = $this->set_post_classes_filter_parameters($post, $parameters, $articlecount) ;
/*********************
get style
*********************/
$style = $filter_parameters['layout']['style'];
/********************
set permalink id
*********************/
$post_permalink_id = ''.WPPIZZA_SLUG.'-permalink-'.$post->ID.'';
/*********************
set permalink classes
*********************/
$post_permalink_class = array();
/*general class*/
$post_permalink_class[] = ''.WPPIZZA_SLUG.'-permalink';
/*
allow filtering
*/
$post_permalink_class = apply_filters('wppizza_filter_post_permalink_class', $post_permalink_class, $filter_parameters['post_data'], $filter_parameters['layout'], $filter_parameters['parameters'], $filter_parameters['articlecount'], $filter_parameters['session']);
/*
implode for output
*/
$post_permalink_class = implode(' ', $post_permalink_class);
/*************************
markup
*************************/
if(file_exists( WPPIZZA_TEMPLATE_DIR . '/markup/loop/posts.permalink.php')){
require(WPPIZZA_TEMPLATE_DIR.'/markup/loop/posts.permalink.php');
}else{
require(WPPIZZA_PATH.'templates/markup/loop/posts.permalink.php');
}
/*********************
apply filter if required
*********************/
$markup = apply_filters('wppizza_filter_post_permalink_markup', $markup, $style);
return $markup;
}
/************************************************************************************************************
*
*
*
* [ markup parts - comments todo perhaps one day when we are really bored]
*
*
* return @array
************************************************************************************************************/
function wppizza_filter_menu_loop_comments($markup, $post , $txt, $additives, $parameters, $is_rtl, $category, $articlecount){
// if(is_single()){
// comments_template( '', true );
// }
/***********TODO COMMENTS***********************************************************************/
//Gather comments for a specific page/post
// $comments = get_comments(array(
// 'post_id' => $post->ID,
// 'status' => 'approve' //Change this to the type of comments to be displayed
// ));
// ob_start();
// //Display the list of comments
// wp_list_comments(array(
// 'per_page' => 10, //Allow comment pagination
// 'reverse_top_level' => false //Show the latest comments at the top of the list
// ), $comments);
// $wppizza_loop_markup .= ob_get_clean();
// /**should only disply on single posts*/
// ob_start();
// comments_template( '', true );
// comment_form();
// $wppizza_loop_markup .= ob_get_clean();
//ob_start();
//$wppizza_loop_markup = wp_list_comments( array( 'post_id' => $post->ID ) ));
//$wppizza_loop_markup .= ob_get_clean();
// ob_start();
// comments_template( '', true );
// $wppizza_loop_markup .= ob_get_clean();
return $markup;
}
/************************************************************************************************************
*
*
*
* [ markup parts - article close - does/should not exist as editable template]
*
*
* return @array
************************************************************************************************************/
function wppizza_filter_menu_loop_article_close($markup, $post , $txt, $additives, $parameters, $is_rtl, $category, $articlecount){
/********************
parameters for convenience
*********************/
global $wppizza_options;
$style = $parameters['global']['template']['style'];
$post_count = $parameters['global']['post_count'];
/**is this required/uesful actually as class added to article??*/
//if(is_single()){
//$markup .= "
";
//}
/*************************
markup
*************************/
$markup['_article'] = '