Commit ffebcd11 authored by imac's avatar imac

[merge]function.php

parents 61b1d672 4ca6c2df
......@@ -428,11 +428,11 @@ function nap_distinct_format_variations($variations) {
}
function nap_image_resize($image,$size){
/*function nap_image_resize($image,$size){
$ext = substr($image, strrpos($image, "."));
$url = substr($image, 0, strrpos($image, "."));
return $newimage = $url . "-".$size."x".$size. $ext;
}
}*/
......@@ -500,13 +500,13 @@ function nap_get_item($post_ID, $args = null, $current_page = '', $options = nul
if (!in_array($color, $temp_colors)) {
$temp_colors[] = $color;
$nap_article.='<li data-link = "' . get_permalink($post_ID) . nap_variation_url($value->ID) . '" data-image = "' . nap_image_resize(get_the_post_thumbnail_url($value->ID),'200') . '" data-color = "' . $color . '" data-format = "' . $format . '"></li> ';
$nap_article.='<li data-link = "' . get_permalink($post_ID) . nap_variation_url($value->ID) . '" data-image = "' . get_the_post_thumbnail_url($value->ID,'thumbnail') . '" data-color = "' . $color . '" data-format = "' . $format . '"></li> ';
}
}
}
else
{
$nap_article.='<li data-link = "' . get_permalink($post_ID). '" data-image = "' . nap_image_resize(get_the_post_thumbnail_url($value->ID),'200') . '" data-color = "' . get_post_thumbnail_id( $post_ID ) . '" data-format = ""></li> ';
$nap_article.='<li data-link = "' . get_permalink($post_ID). '" data-image = "' . get_the_post_thumbnail_url($value->ID,'thumbnail') . '" data-color = "' . get_post_thumbnail_id( $post_ID ) . '" data-format = ""></li> ';
}
$nap_article.='</ul>';
endif;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment