function iva_post_fslider($atts, $content = null) { extract(shortcode_atts(array('id' => '1', 'width' => '300', 'height' => '150', 'effect' => 'fade', 'speed' => '500', 'limits' => '', 'navigation' => 'true', 'cat' => ''), $atts)); wp_print_scripts('jquery_flex'); wp_enqueue_style('flexslider-style'); $pausetime = ''; $id = rand(20, 200); post_postflex_scripts($height, $speed, $width, $id, $effect, $pausetime, $navigation); $out = '<div class="flexslider' . $id . ' flexslider">'; $out .= '<ul class="slides">'; global $post; $pid = $post->ID; $attachments = get_children("post_parent={$post->ID}&post_type=attachment&post_mime_type=image&numberposts={$limits}&orderby=menu_order ASC, ID ASC"); $img_alt_title = get_the_title(); $width = (int) $width; $height = (int) $height; foreach ($attachments as $id => $attachment) { $full_attachment = wp_get_attachment_image_src($attachment->ID, 'full'); $out .= '<li>'; $out .= atp_resize('', $full_attachment[0], $width, $height, '', $img_alt_title); $out .= '</li>'; } $out .= '</ul></div>'; return $out; wp_reset_query(); }
function sys_recent_posts($atts, $content = null) { extract(shortcode_atts(array('limit' => '2', 'description' => '40', 'cat_id' => '23', 'thumb' => 'true', 'postdate' => ''), $atts)); $out = '<div class="widget_postslist sc">'; $out .= '<ul>'; global $wpdb; $myposts = get_posts("numberposts={$limit}&offset=0&cat={$cat_id}"); foreach ($myposts as $post) { $post_date = $post->post_date; $post_date = mysql2date('F j, Y', $post_date, false); $out .= "<li>"; if ($thumb == "true") { $thumbid = get_post_thumbnail_id($post->ID); $imgsrc = wp_get_attachment_image_src($thumbid, array(9999, 9999)); $out .= '<div class="thumb"><a href="' . get_permalink($post->ID) . '" title="' . $post->post_title . '">'; if ($thumbid) { $out .= atp_resize('', $imgsrc['0'], '50', '50', 'imgborder', ''); } else { //$out .= '<img class="imgborder" src="'.THEME_URI.'/images/no-image.jpg'.'" alt="' .$post->post_title. '" />'; } $out .= '</a></div>'; } $out .= '<div class="pdesc"><a href="' . get_permalink($post->ID) . '" rel="bookmark">' . $post->post_title . '</a>'; if ($postdate == "true") { $out .= '<div class="w-postmeta"><span>' . $post_date . '</span></div>'; } else { $out .= '<p>' . wp_html_excerpt($post->post_content, $description, '...') . '</p>'; } $out .= '</div></li>'; } $out .= '</ul></div>'; return $out; wp_reset_query(); }
function iva_image($atts, $content = null) { extract(shortcode_atts(array('link' => '', 'lightbox' => 'false', 'title' => '', 'class' => '', 'align' => false, 'width' => false, 'height' => false, 'caption' => '', 'target' => '', 'src' => '', 'animation' => ''), $atts)); if (!$width || !$height) { if (!$width) { $width = ''; } if (!$height) { $height = ''; } } $no_link = $rel = $out = ''; $content = atp_resize('', $src, $width, $height, '', $title); if ($lightbox == 'true') { if (preg_match_all('!http://.+\\.(?:jpe?g|png|gif)!Ui', $link, $matches)) { $src = $link; } $rel = ' data-rel="prettyPhoto[mixed]"'; $link = $src; } else { if ($link == '') { $no_link = 'image_no_link'; } $target = ' target="' . $target . '"'; } //If Lightbox is Enabled //----------------------- // Animation Effects //-------------------------------------------------------- $animation = $animation ? ' data-id="' . $animation . '"' : ''; if ($lightbox == "true") { $out .= '<div ' . $animation . ' class="iva_anim imageframe ' . ($align ? ' align' . $align : '') . '" ><figure><a ' . $target . '' . $rel . ' ' . ($no_link ? ' class="' . $no_link . '"' : '') . ' title="' . $title . '" href="' . $link . '">' . $content; $out .= '</a></figure>'; if ($caption) { $out .= '<span class="image_caption">' . $caption . '</span>'; } $out .= '</div>'; } else { //If Lightbox is Disabled //----------------------- $out .= '<div ' . $animation . ' class="iva_anim imageframe ' . ($align ? ' align' . $align : '') . '" >'; if ($link != '') { if (preg_match_all('!http://.+\\.(?:jpe?g|png|gif)!Ui', $link, $matches)) { $link = ""; } $out .= '<a ' . $target . '' . $rel . ' ' . ($no_link ? ' class="' . $no_link . '"' : '') . ' title="' . $title . '" href="' . esc_url($link) . '">'; } $out .= '<figure>' . $content . '</figure>'; if ($link != '') { $out .= '</a>'; } if ($caption) { $out .= '<span class="image_caption">' . $caption . '</span>'; } $out .= '</div>'; } return $out; }
function widget($args, $instance) { extract($args); $title = $instance['latestvideo_title']; $post_id = $instance['post_id']; global $post; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } $postid_array = array(); $postid_array = explode(',', $post_id); $post_args = array('post_type' => 'video', 'post__in' => $postid_array); $query = new WP_Query($post_args); while ($query->have_posts()) { $query->the_post(); $varb = $query->post->ID; $video_list = get_post_meta($varb, 'video_youtube_link', true); $video_vimeolist = get_post_meta($varb, 'video_vimeo_link', true); $video_selfhost_video = get_post_meta($varb, 'video_selfhost_video', true); $video_type_option = get_post_meta($varb, 'video_type_option', true); $video_venue = get_post_meta($post->ID, 'video_venue', true); $alt = get_the_title($varb); // Generate Output $out = '<div class="video-list">'; $out .= '<div class="custompost_thumb port_img">'; $out .= '<figure>' . atp_resize($varb, '', '470', '470', '', $alt) . '</figure>'; $out .= '<div class="hover_type">'; if ($video_type_option != '') { switch ($video_type_option) { case 'youtubelink': $out .= '<a class="hovervideo" href="http://www.youtube.com/watch?v=' . $video_list . '" data-rel="prettyPhoto[video]">'; break; case 'vimeolink': $out .= '<a class="hovervideo" href="http://vimeo.com/' . $video_vimeolist . '" data-rel="prettyPhoto[video]">'; break; case 'selfvideo': $out .= '<a class="hovervideo" href="' . $video_selfhost_video . '" data-rel="prettyPhoto[custom]">'; break; } $out .= '</a>'; } $out .= '</div>'; $out .= '</div>'; $out .= '<div class="video-desc"><h2 class="entry-title">' . $alt . '</h2><span>' . $video_venue . '</span>'; $out .= '</div>'; echo $out; } echo $after_widget; }
function iva_staff($atts, $content = null) { extract(shortcode_atts(array('photo' => '', 'title' => '', 'role' => '', 'blogger' => '', 'delicious' => '', 'digg' => '', 'facebook' => '', 'flickr' => '', 'forrst' => '', 'google' => '', 'linkedin' => '', 'pinterest' => '', 'skype' => '', 'stumbleupon' => '', 'twitter' => '', 'dribbble' => '', 'yahoo' => '', 'youtube' => '', 'animation' => ''), $atts)); global $staff_social; $before_staff = $after_staff = $out = ''; // Animation Effects //-------------------------------------------------------- $animation = $animation ? ' data-id="' . $animation . '"' : ''; $out .= '<div ' . $animation . ' class="bio iva_anim">'; if ($photo != '') { $image_photo = atp_resize('', $photo, '450', '', '', ''); $out .= $image_photo; } $out .= '<div class="details bio_meta">'; if ($title != '') { $out .= '<hgroup>'; $out .= '<h4>' . $title . '</h4>'; if ($role != '') { $out .= '<span class="staff-role">' . $role . '</span>'; } $out .= '</hgroup>'; } if ($content != '') { $out .= do_shortcode($content); } $out .= '</div>'; $count = 0; foreach ($staff_social as $key => $value) { if ($key != '') { if (${$key} != '') { if ($count < 1) { $before_staff = '<div class="sociables"><ul class="atpsocials">'; $after_staff = '</ul></div>'; } $count++; } } } $out .= $before_staff; foreach ($staff_social as $key => $value) { if ($key != '') { if (${$key} != '') { $out .= '<li><a class="' . $key . '" href="' . ${$key} . '"></a><span class="ttip">' . ucfirst($key) . '</span></li>'; } } } $out .= $after_staff; $out .= '</div><div class="clear"></div>'; return $out; }
function sys_popular_posts($atts, $content = null) { extract(shortcode_atts(array('limit' => '2', 'description' => '40', 'thumb' => 'true', 'popular_select' => 'time'), $atts)); $out = '<div class="widget_postslist sc">'; $out .= '<ul>'; global $wpdb; $popular_limits = $limit; $show_pass_post = false; $duration = ''; $request = "SELECT ID, post_title,post_date,post_content, COUNT({$wpdb->comments}.comment_post_ID) AS 'comment_count' FROM {$wpdb->posts}, {$wpdb->comments}"; $request .= " WHERE comment_approved = '1' AND {$wpdb->posts}.ID={$wpdb->comments}.comment_post_ID AND post_status = 'publish'"; if (!$show_pass_post) { $request .= " AND post_password =''"; } if ($duration != "") { $request .= " AND DATE_SUB(CURDATE(),INTERVAL " . $duration . " DAY) < post_date "; } $request .= " GROUP BY {$wpdb->comments}.comment_post_ID ORDER BY comment_count DESC LIMIT {$popular_limits}"; $popular_posts = $wpdb->get_results($request); foreach ($popular_posts as $post) { if ($post) { $post_date = $post->post_date; $post_date = mysql2date('F j, Y', $post_date, false); $out .= "<li>"; if ($thumb == "true") { $thumbid = get_post_thumbnail_id($post->ID); $imgesc = wp_get_attachment_image_src($thumbid, array(9999, 9999)); $out .= '<div class="thumb"><a href="' . get_permalink($post->ID) . '" title="' . $post->post_title . '">'; if ($thumbid) { $out .= atp_resize('', $imgesc['0'], '50', '50', 'imgborder', ''); } else { //$out .= '<img class="imgborder" src="'. THEME_URI.'/images/no-image.jpg" title="'.$post->post_title.'" alt="" />'; } $out .= '</a></div>'; } $out .= '<div class="pdesc"><a href="' . get_permalink($post->ID) . '" rel="bookmark">' . $post->post_title . '</a>'; if ($popular_select == 'time') { $out .= '<div class="w-postmeta"><span>' . $post_date . '</span></div>'; } else { $out .= '<p>' . wp_html_excerpt($post->post_content, $description, '...') . '</p>'; } $out .= '</div></li>'; } } $out .= '</ul></div>'; return $out; wp_reset_query(); }
function widget($args, $instance) { extract($args); $title = $instance['gallery_title']; $gallery_postid = $instance['gallery_postid']; $number_of_photos = $instance['number_of_photos'] ? $instance['number_of_photos'] : '9'; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } $gallery = new WP_Query(); $gallery->query('post_type=gallery&p=' . $gallery_postid); if ($gallery->have_posts()) { echo '<div class="gallery-wrap">'; while ($gallery->have_posts()) { $gallery->the_post(); $gallery_photos = get_post_meta($gallery_postid, 'gallery_upload', true); $gallery_upload_img = array(); $gallery_upload_img = explode(',', $gallery_photos); $out = ''; $out .= '<div class="label_space"></div>'; if ($gallery_photos) { global $wpdb; $gallery_photos = $wpdb->get_col("\n\t\t\t\t\t\t\tSELECT ID FROM {$wpdb->posts}\n\t\t\t\t\t\t\tWHERE post_type = 'attachment'\n\t\t\t\t\t\t\tAND ID in ({$gallery_photos})\n\t\t\t\t\t\t\tORDER BY ID ASC\n\t\t\t\t\t\t"); } if ($gallery_photos != '') { $count = 0; foreach ($gallery_photos as $attachment_id) { $count++; if ($number_of_photos >= $count) { $attachment = get_post($attachment_id); $image_attributes = wp_get_attachment_image_src($attachment_id, 'full'); // returns an array $alt = get_the_title($attachment->post_title); $out = '<div class="gallery-postimg">'; $out .= '<a href="' . $image_attributes['0'] . '" data-rel="prettyPhoto[gallery]">'; $out .= atp_resize('', $image_attributes[0], '80', '80', '', $alt); $out .= '</a>'; $out .= '</div>'; echo $out; } } } } echo '</div>'; } echo $after_widget; }
?> <?php if (atp_generator('sidebaroption', $post->ID) != "fullwidth") { $width = '670'; } else { $width = '960'; } ?> <?php if (has_post_thumbnail()) { ?> <div class="event_thumb"> <?php echo atp_resize($post->ID, '', $width, '', '', ''); ?> </div><!-- .event_thumb --> <?php } ?> <h2 class="entry-title title-large"><?php the_title(); ?> </h2> <div class="event_details_wrap"> <div class="col_half"> <div class="event_info"> <?php
} else { $width = '960'; } ?> <div class="custompost_entry"> <div class="custompost_details"> <div class="col_fourth"> <?php if (has_post_thumbnail()) { ?> <div class="custompost_thumb port_img"> <?php echo '<figure>' . atp_resize($post->ID, '', '470', '470', '', $img_alt_title) . '</figure>'; echo '<div class="hover_type">'; echo '<a data-rel="prettyPhoto" class="hoverimage" href="' . $imagesrc[0] . '" title="' . get_the_title() . '"></a>'; echo '</div>'; ?> </div> <?php } ?> <div class="album-details"> <?php if ($audio_release_date != '') { ?> <div class="album-meta"><?php
function iva_offers_shortcode($atts) { extract(shortcode_atts(array('offers_postid' => '', 'offers_orderby' => 'title', 'offers_order' => 'ASC', 'offers_pagination' => '', 'offers_limits' => '1'), $atts)); global $post, $pagination, $atp_theme; $iva_ofr_btn_color = get_option('iva_ofr_btn_color') ? get_option('iva_ofr_btn_color') : __('blue', 'iva_theme_front'); $iva_ofr_btn_txt = get_option('iva_ofr_btn_txt') ? get_option('iva_ofr_btn_txt') : __('Book This Offer', 'iva_theme_front'); if (get_query_var('paged')) { $paged = get_query_var('paged'); } elseif (get_query_var('page')) { $paged = get_query_var('page'); } else { $paged = 1; } if ($offers_postid != '') { $postid_array = array(); $postid_array = explode(',', $offers_postid); $args = array('post_type' => 'offers', 'posts_per_page' => $offers_limits, 'post__in' => $postid_array, 'paged' => $paged, 'orderby' => $offers_orderby, 'order' => $offers_order); } else { $args = array('post_type' => 'offers', 'posts_per_page' => $offers_limits, 'paged' => $paged, 'orderby' => $offers_orderby, 'order' => $offers_order); } $iva_ofrs_query = query_posts($args); // $wp_query = new WP_Query( $args ); // if ( $wp_query->have_posts()) : while ( $wp_query->have_posts()) : $wp_query->the_post(); $out = ''; if (have_posts()) { while (have_posts()) { the_post(); global $post; $img_alt_title = get_the_title($post->ID); $out .= '<div class="special_offers_item">'; $out .= '<div class="one_third nomargin">'; $out .= '<div class="offer-photo">'; if (has_post_thumbnail()) { $out .= '<div class="offer-img"><figure>' . atp_resize($post->ID, '', '480', '566', '') . '</figure></div>'; } $out .= '</div>'; // End photo div $out .= '</div>'; // End Of one_third $out .= '<div class="two_third nomargin">'; $out .= '<div class="offers-content">'; $out .= '<h2>' . get_the_title() . '</h2>'; $out .= '<h2><a href="' . get_permalink() . '"></a></h2>'; // $out .= the_excerpt(); $out .= substr($post->post_content, 0, 150); $out .= '<div class="offer-btn">'; $out .= '<a href="' . get_permalink() . '" class=" btn medium dark border ' . $iva_ofr_btn_color . ' ">'; $out .= '<span>' . $iva_ofr_btn_txt . '</span>'; $out .= '</a>'; $out .= '</div>'; // offer-btn $out .= '</div>'; // offers-content $out .= '</div>'; // End of two_third $out .= '</div>'; // special_offers_item } $out .= '<div class="clear"></div>'; // if ($offers_pagination == 'yes') { if (function_exists('iva_pagination')) { $out .= iva_pagination(); } } wp_reset_query(); } return $out; }
$djmix_list = get_post_meta($post->ID, 'djmix_upload_mix', true) ? get_post_meta($post->ID, 'djmix_upload_mix', true) : ''; if ($djmix_list) { global $wpdb; $djmix_list = $wpdb->get_col("\n\t\t\t\t\t\tSELECT ID FROM {$wpdb->posts}\n\t\t\t\t\t\tWHERE post_type = 'attachment'\n\t\t\t\t\t\tAND ID in ({$djmix_list})\n\t\t\t\t\t\tORDER BY menu_order ASC"); } ?> <div id="post-<?php the_ID(); ?> " class="djmix-list clearfix"> <div class="djmix_thumb"> <?php if (has_post_thumbnail()) { echo atp_resize($post->ID, '', '60', '60', '', $djtitle); } ?> </div> <div class="djmix-content"> <div class="djmix-details"> <?php if ($audio_posttype_option == 'player') { if (!empty($djmix_list)) { foreach ($djmix_list as $attachment_id) { $attachment = get_post($attachment_id); $title = $attachment->post_title; echo '<span class="single-player-meta" id="single-player-meta' . $start . '">' . $djtitle . '<div>' . $djmix_genre . ' | ' . $post_date . '</div></span>'; ?>
<?php if (has_post_thumbnail()) { global $post_id; ?> <!-- .postimg --> <div class="postimg"> <figure> <a href="#"><?php if (atp_generator('sidebaroption', get_the_id()) != "fullwidth") { $width = '630'; } else { $width = '1000'; } $post_thumbnail_id = get_post_thumbnail_id(get_the_id()); echo atp_resize($post_id, '', $width, '', 'imgborder', ''); ?> </a> </figure> </div> <!-- .postimg --> <?php }
function iva_blog_carousel($atts, $content = null) { extract(shortcode_atts(array('cat' => '', 'limit' => '', 'title' => '', 'charlimits' => '200', 'items' => '', 'style' => 'style1'), $atts)); global $readmoretxt, $post; $blogcarousel_id = rand(10, 99); $events_order = get_option('atp_eventsorder') ? get_option('atp_eventsorder') : 'id'; $blogstyle = $style == "style1" ? ' blog-carousel-plain' : 'blog-carousel'; $paged = get_query_var('paged') ? get_query_var('paged') : 1; $args = array('category_name' => $cat, 'paged' => $paged, 'posts_per_page' => $limit); $bcarousel_query = new WP_Query($args); $format = get_post_format(get_the_ID()); if (false === $format) { $format = 'standard'; } $imagesrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false, ''); $out = '<script type="text/javascript"> jQuery(document).ready(function($) { $("#carousel-' . $blogcarousel_id . '").owlCarousel({ autoPlay: 300000, items :' . $items . ', itemsDesktop : [1199,4], itemsDesktopSmall : [979,4], itemsTablet : [768,2], itemsMobile : [479,1] }); }); </script>'; $out .= '<div class="container ' . $blogstyle . '">'; $out .= '<div class="container">'; $out .= '<h2 class="carousel-title fancyheading textcenter"><span>' . $title . '</span></h2>'; $out .= '<div id="carousel-' . $blogcarousel_id . '" class="owl-carousel" >'; if ($bcarousel_query->have_posts()) { while ($bcarousel_query->have_posts()) { $bcarousel_query->the_post(); if ($format != 'link' && $format != 'quote') { // Blog Style 2 Output if ($style == "style2") { $out .= '<div class="item style2">'; if (has_post_thumbnail($post->ID)) { $out .= '<figure>' . atp_resize($post->ID, '', '500', '500', '', '') . '</figure>'; } else { $out .= '<div class="no-image">'; $out .= '<figure><img src="' . THEME_URI . '/images/no-image.png" width="500" height="500"></figure>'; $out .= '</div>'; } $out .= '<div class="post_list">'; $out .= '<h5 class="blog-carousel-item-title"><a href="' . get_permalink($post->ID) . '" class="more-link">' . get_the_title() . '</a></h5>'; $out .= '</div>'; $out .= '</div>'; } else { // Blog Style 1 Output $out .= '<div class="item">'; $out .= '<div class="post_list">'; $out .= '<h5 class="blog-carousel-item-title"><a href="' . get_permalink($post->ID) . '" class="more-link">' . get_the_title() . '</a></h5>'; $out .= '<div class="post-info">'; $out .= '<div class="postmeta">'; $out .= '<span>' . get_the_time('M j Y', get_the_id()) . '</span>/ '; ob_start(); $out .= '<span>'; echo comments_popup_link(__('0 Comment', 'musicplay'), __('1 Comment', 'musicplay'), __('% Comments', 'musicplay')); $out .= ob_get_clean(); $out .= '</span>'; $out .= '</div>'; $out .= '</div>'; $out .= '</div>'; $out .= '<div class="post-entry">'; $out .= wp_html_excerpt(get_the_excerpt(''), 120); $out .= '</div>'; $out .= '</div>'; } } } } $out .= '</div>'; $out .= '</div>'; $out .= '</div>'; wp_reset_query(); return $out; }
$out .= '</div>'; } $k++; } } $out .= $gplist; } else { if ($gallery_list != '') { foreach ($gallery_upload_img as $attachment_id) { $attachment = get_post($attachment_id); if (count($attachment) > 0) { $image_attributes = wp_get_attachment_image_src($attachment_id, 'full'); // returns an array $alt = $attachment->post_title; $out .= '<div class="gallery-postimg port_img">'; $out .= atp_resize('', $image_attributes[0], '180', '180', '', $alt); $out .= '<div class="hover_type">'; $out .= '<a data-rel="prettyPhoto[gal-mixed]" class="hoverimage" href="' . $image_attributes[0] . '" title="' . $alt . '">'; $out .= '</a>'; $out .= '</div>'; $out .= '</div>'; } } } } echo $out; ?> </div><!-- .custompost_details --> </div> <!-- custompost_entry -->
function show($postid, $width, $height, $style, $sorting) { $out = ''; $event_venue = get_post_meta($postid, 'event_venue', true); $event_location = get_post_meta($postid, 'event_location', true); $event_status = get_post_meta($postid, 'event_status', true); $atp_venue = get_option('atp_venue') ? get_option('atp_venue') : 'Venue'; $atp_location = get_option('atp_location') ? get_option('atp_location') : 'Location'; $atp_event_status = get_option('atp_event_status') ? get_option('atp_event_status') : 'Status'; $img_alt_title = get_the_title(); $eventdate = get_post_meta($postid, 'event_date', true); $permalink = get_permalink($postid); $event_timeslider = get_post_meta($postid, 'event_timeslider', true); $event_starttime = isset($event_timeslider['starttime']) ? $event_timeslider['starttime'] : ''; $time_in_24_hour_format = date("H:i", strtotime($event_starttime)); $event_time = preg_replace('/:/', ',', $time_in_24_hour_format); if ($eventdate != '') { $event_date = date_i18n('M-d-Y', $eventdate); $date_event = explode('-', $event_date); } /*----------------------------------------------*/ if ($style == 'style2') { $out .= '<div class="event_wwrap">'; $out .= '<div class="event-meta">'; if (isset($event_date) && $event_date != '') { $out .= '<span class="month">' . $date_event['0'] . '</span>'; $out .= '<span class="day">' . $date_event['1'] . '</span>'; $out .= '<span class="year">' . $date_event['2'] . '</span>'; } $out .= '</div>'; $out .= '<div class="event-content">'; $out .= '<h4 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark" >' . get_the_title() . '</a></h4>'; $out .= '<div class="event_info">'; if ($event_venue) { $out .= '<p><strong>' . $event_venue . '</strong></p>'; } if (isset($event_status) && $event_status != '') { $out .= '<span class="etick-status">' . $event_status . '</span>'; } $out .= '</div>'; $out .= '</div>'; $out .= '<div class="clear"></div>'; if ($sorting == 'upcoming_events') { if ($eventdate != '') { $countdown_date = date_i18n('m/d/Y', $eventdate); $countdown_event = explode('/', $countdown_date); } $month = $countdown_event['0']; $day = $countdown_event['1']; $year = $countdown_event['2']; $hour = '00'; $minute = '00'; $second = '00'; $out .= '<script type="text/javascript"> jQuery(function($) { var endDate = "' . $month . ' ' . $day . ' ' . $year . ' ' . $hour . ':' . $minute . ':' . ' ' . $second . '"; enddate = new Date(' . $year . ' , ' . $month . '-1 , ' . $day . ',' . $event_time . ',0,0); $("#iva-countdown-' . $postid . '").countdown({ until: enddate, format: "dHMS", padZeroes: true, labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"], labels1:["Year","Month","Week","Day","Hour","Minute","Second"] }); }); </script>'; $out .= '<div id="iva-countdown-' . $postid . '"></div>'; } $out .= '</div>'; } else { $out .= '<div class="events-list">'; if (has_post_thumbnail($postid)) { $out .= '<div class="event_thumb">'; $out .= '<div class="event_thumb"><a href="' . get_permalink() . '" >' . atp_resize($postid, '', $width, $height, '', $img_alt_title) . '</a></div>'; $out .= '</div>'; } $out .= '<div class="event_entry"><div class="event_details">'; $out .= '<div class="event-meta">'; if (isset($event_date) && $event_date != '') { $out .= '<span class="month">' . $date_event['0'] . '</span><span class="day">' . $date_event['1'] . '</span><span class="year">' . $date_event['2'] . '</span>'; } $out .= '</div>'; $out .= '<div class="event-content"><h2 class="entry-title"><a href="' . $permalink . '">' . get_the_title() . '</a></h2>'; $out .= '<div class="event_info">'; if ($event_venue) { $out .= '<p><span>' . $atp_venue . '</span>' . $event_venue . '</p>'; } if ($event_location) { $out .= '<p><span>' . $atp_location . '</span>' . $event_location . '</p>'; } if ($event_status != '') { $out .= '<p><span>' . $atp_event_status . '</span>' . $event_status . '</p>'; } $out .= '</div>'; $out .= '</div>'; $out .= '</div>'; $out .= '</div>'; if ($sorting == 'upcoming_events') { if ($eventdate != '') { $countdown_date = date_i18n('m/d/Y', $eventdate); $countdown_event = explode('/', $countdown_date); } $month = $countdown_event['0']; $day = $countdown_event['1']; $year = $countdown_event['2']; $hour = '00'; $minute = '00'; $second = '00'; $out .= '<script type="text/javascript"> jQuery(function($) { var endDate = "' . $month . ' ' . $day . ' ' . $year . ' ' . $hour . ':' . $minute . ':' . '00"; enddate = new Date(' . $year . ' , ' . $month . '-1 , ' . $day . ',' . $event_time . ',0,0); $("#iva-countdown-' . $postid . '").countdown({ until: enddate, format: "DHMS", padZeroes: true, labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"], labels1:["Year","Month","Week","Day","Hour","Minute","Second"] }); }); </script>'; $out .= '<div id="iva-countdown-' . $postid . '"></div>'; } $out .= '</div><div class="demo-space"></div>'; } return $out; }
if (is_single()) { if (has_post_thumbnail() && get_option('atp_blogfeaturedimg') != 'on') { ?> <div class="postimg"> <?php echo '<figure>' . atp_resize($post->ID, '', '870', '350', '', '') . '</figure>'; ?> </div><?php } } else { if (has_post_thumbnail()) { ?> <div class="postimg"> <?php echo '<figure>' . atp_resize($post->ID, '', '870', '350', '', '') . '</figure>'; ?> </div><?php } } ?> <div class="entry-content"> <?php if (has_excerpt() && !is_single()) { the_excerpt(); echo '<a class="more-link btn medium dark border" href="' . esc_url(get_permalink()) . '">' . __("<span>Read more</span>", "iva_theme_front") . '</a>'; } else { the_content(__('<span>Read more</span>', 'iva_theme_front')); wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">' . __('Pages:', 'iva_theme_front') . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>')); }
function iva_musicgallery($atts, $content = null, $code) { extract(shortcode_atts(array('cat' => '', 'postid_g' => '', 'limit' => '-1', 'columns' => '', 'pagination' => ''), $atts)); $column_index = 0; if ($columns == '4') { $class = 'col_fourth'; } if ($columns == '3') { $class = 'col_third'; } if ($columns == '2') { $class = 'col_two'; } if ($columns == '') { $class = ''; } //Album Image Sizes $width = '470'; $height = '470'; $out = ''; if (get_query_var('paged')) { $paged = get_query_var('paged'); } elseif (get_query_var('page')) { $paged = get_query_var('page'); } else { $paged = 1; } if ($cat != 'null') { $query = array('post_type' => 'gallery', 'showposts' => $limit, 'taxonomy' => 'gallery_type', 'term' => $cat, 'paged' => $paged); } $postid_array = array(); $postid_array = explode(',', $postid_g); if ($postid_g != '') { $query = array('post_type' => 'gallery', 'post__in' => $postid_array); } query_posts($query); //get the results global $post; if (have_posts()) { while (have_posts()) { the_post(); $audio_genre_music = get_post_meta($post->ID, 'audio_genre_music', true); $gallery_venue = get_post_meta($post->ID, 'gallery_venue', true); $gallery_upload = get_the_term_list($post->ID, 'gallery_upload', '', ',', ''); $img_alt_title = get_the_title(); $column_index++; $last = $column_index == $columns && $columns != 1 ? 'end ' : ''; $permalink = get_permalink(get_the_id()); $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', true); $out .= '<div class="gallery-list ' . $class . ' ' . $last . '">'; $out .= '<div class="custompost_entry">'; if (has_post_thumbnail()) { $out .= '<div class="custompost_thumb port_img">'; $out .= '<figure>'; $out .= atp_resize($post->ID, '', $width, $height, '', $img_alt_title); $out .= '</figure>'; $out .= '<div class="hover_type">'; $out .= '<a class="hovergallery" href="' . $permalink . '" title="' . get_the_title() . '"></a>'; $out .= '</div>'; $out .= '</div>'; } $out .= '<div class="gallery-desc">'; $out .= '<h2 class="entry-title"><a href="' . $permalink . '">' . get_the_title() . '</a></h2>'; if ($gallery_venue != '') { $out .= '<span>' . $gallery_venue . '</span>'; } $out .= '</div>'; $out .= '</div>'; $out .= '</div>'; if ($column_index == $columns) { $column_index = 0; $out .= '<div class="clear"></div>'; } } $out .= '<div class="clear"></div>'; if (!function_exists('atp_pagination')) { if ($pagination == 'true') { $out .= atp_pagination(); } } wp_reset_query(); } return $out; }
$image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_id()), 'full', true); $column_index++; $last = $column_index == $columns && $columns != 1 ? 'end ' : ''; ?> <div class="album-list <?php echo $class . ' ' . $last; ?> " > <div class="custompost_entry"> <?php if (has_post_thumbnail()) { ?> <div class="custompost_thumb port_img"> <?php echo '<figure>' . atp_resize($post->ID, '', $width, $height, '', '') . '</figure>'; echo '<div class="hover_type">'; echo '<a class="hoveraudio" href="' . get_permalink() . '" title="' . get_the_title() . '"></a>'; echo '</div>'; ?> </div><!-- .custompost_thumb --> <?php } ?> <div class="album-desc"> <h2 class="entry-title"> <a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php
function iva_tesimoniallist($atts, $content = null) { extract(shortcode_atts(array('cat' => '', 'limit' => '5', 'title' => ''), $atts)); global $post; $paged = get_query_var('paged') ? get_query_var('paged') : 1; $query = array('post_type' => 'testimonialtype', 'posts_per_page' => $limit, 'taxonomy' => 'testimonial_cat', 'paged' => $paged, 'order' => 'DESC'); $tm_speed = get_option('atp_tm_speed') ? get_option('atp_tm_speed') : '3000'; $tesimonial_query = new WP_Query($query); $testimonial_gravatar_image = $rand = ''; $eventcarousel_id = rand(10, 99); echo '<script type="text/javascript"> jQuery(document).ready(function() { atpcustom.MySlider(' . $tm_speed . ',"testimonial' . $rand . '"); }); </script>'; $out = ''; $out .= '<div id="testimonial' . $rand . '" class="testimonial_list"><ul class="testimonials">'; if ($tesimonial_query->have_posts()) { while ($tesimonial_query->have_posts()) { $tesimonial_query->the_post(); $website_name = get_post_meta($post->ID, 'websitename', true); $website_url = get_post_meta($post->ID, 'website_url', true); $testimonial_image_option = get_post_meta($post->ID, 'testimonial_image_option', true); $target_link = get_post_meta($post->ID, 'target_link', true) != 'on' ? '' : "target='_blank'"; $testimonial_content = get_the_content($post->ID); switch ($testimonial_image_option) { case 'gravatar': $testimonial_email = get_post_meta($post->ID, 'testimonial_email', true); $testimonial_gravatar_image = get_avatar($testimonial_email, 40); break; case 'customimage': if (has_post_thumbnail()) { $testimonial_gravatar_image = atp_resize($post->ID, '', '40', '40', 'imageborder', ''); } break; } $before = $after = ''; // post title $out .= '<li>'; $out .= '<div class="testimonial-box">'; $out .= '<div class="testimonial-content"><p>' . $testimonial_content . '</p></div>'; if ($testimonial_gravatar_image != '') { $out .= '<div class="client-image">' . $testimonial_gravatar_image . '</div>'; } if ($website_url != '') { $before = '<a href="' . esc_url($website_url) . '" ' . $target_link . '>'; $after = '</a>'; } $clientname = '<strong class="client-name">' . get_the_title() . '</strong>'; if ($website_name != '' || $clientname != '') { $out .= '<div class="client-meta">' . $clientname . $before . $website_name . $after . '</div>'; } $out .= '<div class="testimonial-arrow"></div>'; $out .= '</div>'; $out .= '</li>'; } } $out .= '</ul></div><div class="clear"></div>'; wp_reset_query(); return $out; }
function widget($args, $instance) { $cache = wp_cache_get('recentpost_widgets', 'widget'); if (!is_array($cache)) { $cache = array(); } if (!isset($args['widget_id'])) { $args['widget_id'] = $this->id; } if (isset($cache[$args['widget_id']])) { echo $cache[$args['widget_id']]; return; } ob_start(); extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts', 'iva_theme_admin') : $instance['title'], $instance, $this->id_base); if (empty($instance['number']) || !($number = absint($instance['number']))) { $number = 10; } if (empty($instance['description_length']) || !($description_length = absint($instance['description_length']))) { $description_length = 40; } $show_date = isset($instance['show_date']) ? $instance['show_date'] : false; $imagedisable = isset($instance['recentpost_imagedisable']) ? $instance['recentpost_imagedisable'] : false; $r = new WP_Query(apply_filters('widget_posts_args', array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true))); if ($r->have_posts()) { ?> <?php echo $before_widget; ?> <?php if ($title) { echo $before_title . $title . $after_title; } ?> <ul> <?php while ($r->have_posts()) { $r->the_post(); ?> <li> <?php if ($imagedisable != "true") { $thumb = get_post_thumbnail_id(); if ($thumb) { $post_thumbnail_id = get_post_thumbnail_id(); ?> <div class="thumb"><a href="<?php echo esc_url(get_permalink()); ?> " title="<?php echo esc_attr(get_the_title()); ?> "> <?php echo atp_resize(get_the_ID(), '', '50', '50', 'imgborder', ''); ?> </a> </div> <?php } } ?> <div class="pdesc"> <a href="<?php echo esc_url(get_permalink()); ?> " title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?> "><?php if (get_the_title()) { the_title(); } else { the_ID(); } ?> </a> <?php if ($show_date == "true") { ?> <div class="w-postmeta"><?php echo get_the_date(); ?> </div> <?php } else { ?> <p><?php echo wp_html_excerpt(get_the_content(), $description_length); ?> ...</p> <?php } //end Description Length ?> </div> </li> <?php } ?> </ul> <?php echo $after_widget; // Reset the global $the_post as this query will have stomped on it wp_reset_postdata(); } $cache[$args['widget_id']] = ob_get_flush(); wp_cache_set('recentpost_widgets', $cache, 'widget'); }
function atp_portfoliotype($postid, $post_type, $width, $height) { $out = '<div class="postimg">'; if ($post_type == 'gallery') { $out .= atp_generator('getPostAttachments', $postid, '', '', $width, '', '', 'slider'); } elseif ($post_type == 'posttype_image') { if (has_post_thumbnail($postid)) { $out .= "<figure>"; $out .= atp_resize($postid, '', $width, '', 'imageborder aligncenter', ''); $out .= "</figure>"; } } elseif ($post_type == 'vimeo') { $vimeo_id = get_post_meta($postid, 'vimeo', true); if (!empty($vimeo_id)) { $out .= "<div class='video-frame' id='iframevideo'>"; $out .= "<iframe src='http://player.vimeo.com/video/{$vimeo_id}?&portrait=0' frameborder='0'></iframe>"; $out .= "</div>"; } } elseif ($post_type == 'youtube') { $youtube_id = get_post_meta($postid, 'youtube', true); if (!empty($youtube_id)) { $out .= "<div class='video-frame' id='iframevideo'>"; $out .= '<iframe src="http://www.youtube.com/embed/' . $youtube_id . '?wmode=transparent" frameborder="0"></iframe>'; $out .= "</div>"; } } $out .= '</div>'; return $out; }
function widget($args, $instance) { extract($args); $title = $instance['title']; $post_id = $instance['post_id']; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } $desid = rand(30, 99); $the_query = new WP_Query(); $the_query->query('post_type=albums&posts_per_page=1&p=' . $post_id); if ($the_query->have_posts()) { while ($the_query->have_posts()) { $the_query->the_post(); global $post, $default_date; $audio_artist = array(); $audio_artist_name = get_post_meta($post->ID, 'audio_artist_name', true); if (is_array($audio_artist_name) && count($audio_artist_name) > 0) { foreach ($audio_artist_name as $audio_artist_id) { $permalink = get_permalink($audio_artist_id); $playlisttitle = get_the_title($audio_artist_id); $audio_artist[] = '<a href="' . $permalink . '">' . $playlisttitle . '</a>'; } $audio_artist_name = implode(', ', $audio_artist); } $audio_button_disable = get_post_meta($post->ID, 'audio_button_disable', true); $audio_buttons = get_post_meta($post->ID, 'audio_buttons', true); $audio_catalog_id = get_post_meta($post->ID, 'audio_catalog_id', true); $imagesrc = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), 'full', false, ''); $image = aq_resize($imagesrc[0], '80', '80', true); $audiolist = get_post_meta($the_query->post->ID, 'audio_upload', true) ? get_post_meta($the_query->post->ID, 'audio_upload', true) : ''; $audio_label = get_the_term_list($the_query->post->ID, 'label', '', ',', ''); $audio_posttype_option = get_post_meta($post->ID, 'audio_posttype_option', true) ? get_post_meta($post->ID, 'audio_posttype_option', true) : 'player'; $permalink = get_permalink($the_query->post->ID); $playlisttitle = get_the_title($the_query->post->ID); $audio_release_date = get_post_meta($the_query->post->ID, 'audio_release_date', true) ? get_post_meta($the_query->post->ID, 'audio_release_date', true) : ''; if ($audio_release_date != '') { if (is_numeric($audio_release_date)) { $audio_release_date = date_i18n($default_date, $audio_release_date); } } $playlisttitles = '<div class="single-player-meta" id="single-player-meta' . $desid . '"> <a href="' . $permalink . '">' . $playlisttitle . '</a> <div>' . $audio_label . ' | ' . $audio_release_date . '</div></div>'; ?> <div class="album_widgetmeta"> <?php echo '<figure>' . atp_resize($post->ID, '', 90, 90, 'album-thumb', '') . '</figure>'; ?> <div class="album-widget-info"> <strong><a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php printf(__("Permanent Link to %s", 'musicplay'), esc_attr(get_the_title())); ?> "><?php the_title(); ?> </a></strong> <div class="album-widgetmeta"> <span><?php echo $audio_release_date; ?> </span> <span><?php echo $audio_artist_name; ?> </span> <span><?php echo get_the_term_list($post->ID, 'genres', '', ',', ''); ?> </span> </div> </div> </div> <ul class="fap-my-playlist album-playlist" data-playlist="unique-playlist-id"> <?php if ($audio_posttype_option == 'player') { $audio_list = array(); $audio_list = explode(',', $audiolist); $count = count($audio_list); if ($count > 1) { $i = 1; foreach ($audio_list as $attachment_id) { $attachment = get_post($attachment_id); $attachment_title = $attachment->post_title; ?> <li><a class="fap-single-track no-ajaxy" data-meta="#single-player-meta<?php echo $desid; ?> " href="<?php echo $attachment->guid; ?> " title="<?php echo $attachment_title; ?> " rel="<?php echo $image; ?> "><i class="fa fa-play-circle fa-2x play_icon"></i><?php echo $attachment_title; ?> </a></li><?php } } } elseif ($audio_posttype_option == 'externalmp3') { $audiolist = get_post_meta($post->ID, 'audio_mp3', true) ? get_post_meta($post->ID, 'audio_mp3', true) : ''; $count = count($audiolist); if ($count > 0) { $i = 1; foreach ($audiolist as $mp3_list) { $mp3_title = $mp3_list['mp3title']; ?> <li><a class="fap-single-track no-ajaxy" data-meta="#single-player-meta<?php echo $desid; ?> " href="<?php echo esc_attr($mp3_list['mp3url']); ?> " title="<?php echo $mp3_title; ?> " rel="<?php echo $image; ?> "><i class="fa fa-play-circle fa-2x play_icon"></i><?php echo $mp3_title; ?> </a></li><?php } } } else { $audio_soundcloud_title = get_post_meta($post->ID, 'audio_soundcloud_title', true); $audio_soundcloud_url = get_post_meta($post->ID, 'audio_soundcloud_url', true); ?> <li><a class="fap-single-track no-ajaxy" data-meta="#single-player-meta<?php echo $desid; ?> " href="<?php echo $audio_soundcloud_url; ?> " title="<?php echo $audio_soundcloud_title; ?> " rel="<?php echo $image; ?> "><i class="fa fa-play-circle fa-2x play_icon"></i><?php echo $audio_soundcloud_title; ?> </a></li> <?php } ?> </ul> <?php echo $playlisttitles; ?> <?php if ($audio_button_disable != 'on') { if ($audio_buttons != '') { foreach ($audio_buttons as $buttons) { ?> <a href="<?php echo $buttons['buttonurl']; ?> " target="_blank"><button <?php if ($buttons['buttoncolor'] != '') { ?> style="background-color:<?php echo $buttons['buttoncolor']; ?> "<?php } ?> type="button" class="btn medium orange flat"><span><?php echo $buttons['buttonname']; ?> </span></button></a> <?php } ?> <?php } ?> <?php } ?> <?php } // Restore original Post Data wp_reset_postdata(); } else { ?> <p><?php _e('Sorry, no posts matched your criteria.', 'ATP_ADMIN_SITE'); ?> </p> <?php } echo $after_widget; }
function widget($args, $instance) { global $post; extract($args); $title = $instance['gallery_post_title']; $gallerypost_id = $instance['gallery_post_postid']; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } $postid_array = array(); $postid_array = explode(',', $gallerypost_id); $post_args = array('post_type' => 'gallery', 'post__in' => $postid_array, 'post_per_page' => '1'); $the_query = new WP_Query($post_args); if ($the_query->have_posts()) { echo '<div class="gallery-list">'; while ($the_query->have_posts()) { $the_query->the_post(); $gallery_venue = get_post_meta($post->ID, 'gallery_venue', true); $gallery_upload = get_post_meta($post->ID, 'gallery_upload', true); $img_alt_title = get_the_title(); ?> <div class="custompost_thumb port_img"> <?php if (has_post_thumbnail()) { ?> <a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php printf(__("Permanent Link to %s", 'musicplay'), esc_attr(get_the_title())); ?> "> <?php $src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false, ''); echo '<figure>'; echo atp_resize($post->ID, '', '470', '470', '', $img_alt_title); echo '</figure>'; echo '<div class="hover_type">'; echo '<a class="hovergallery" href="' . get_permalink() . '" title="' . get_the_title() . '"></a>'; echo '</div>'; ?> </a> <?php } ?> </div> <div class="gallery-desc"> <h2 class="entry-title"> <a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php printf(__("Permanent Link to %s", 'musicplay'), esc_attr(get_the_title())); ?> "><?php the_title(); ?> </a> </h2> <?php $gallery = get_post_meta($post->ID, 'gallery_upload', true) ? get_post_meta($post->ID, 'gallery_upload', true) : ''; $gallery_img = array(); $gallery_img = explode(',', $gallery); $count = count($gallery_img); if ($gallery_venue != '') { echo '<span>' . $gallery_venue . '</span>'; } ?> </div> <?php } echo '</div>'; } echo $after_widget; }
<?php // Static Slider; ?> <div id="featured_slider"> <div class="slider_wrapper"> <div id="static-slider" class="staticslider"> <?php $pageslider = get_post_meta($post->ID, 'page_slider', true); $width = ''; if (get_option('atp_layoutoption') == 'boxed') { $width = '1200'; } else { $width = '1920'; } if ($pageslider != '') { $src = get_post_meta($post->ID, 'staticimage', true); $link = esc_url(get_post_meta($post->ID, 'cimage_link', true)); } else { $src = get_option('atp_static_image_upload'); $link = esc_url(get_option('atp_static_link')); } if ($link != '') { echo '<figure>' . atp_resize('', $src, $width, '', '', '') . '</figure>'; } else { echo '<figure>' . atp_resize('', $src, $width, '', '', '') . '</figure>'; } ?> </div> </div> </div>
$img_alt_title = get_the_title(); ?> <div class="events-list"> <?php if (has_post_thumbnail()) { ?> <div class="event_thumb"><a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php printf(__("Permanent Link to %s", 'musicplay'), esc_attr(get_the_title())); ?> "> <?php echo atp_resize($post->ID, '', '200', '140', '', $img_alt_title); ?> </a></div><!-- .event_thumb --> <?php } ?> <div class="event_entry"> <div class="event_details"> <div class="event-meta"> <?php if (isset($event_date) && $event_date != '') { ?> <span class="month"><?php
$column_index++; $last = $column_index == $columns && $columns != 1 ? 'end ' : ''; $image = wp_get_attachment_image_src(get_post_thumbnail_id($art_postID), 'full', true); ?> <div class="album-list <?php echo $class . ' ' . $last; ?> " > <div class="albumpost_entry "> <?php if (has_post_thumbnail()) { ?> <div class="custompost_thumb port_img"> <?php echo '<figure>'; echo atp_resize($art_postID, '', $width, $height, '', ''); echo '</figure>'; echo '<div class="hover_type">'; echo '<a class="hoveraudio" href="' . get_permalink() . '" title="' . get_the_title() . '"></a>'; echo '</div>'; ?> </div> <?php } ?> <div class="album-desc"> <h2 class="entry-title"> <a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php
$column_index++; $last = $column_index == $columns && $columns != 1 ? 'end ' : ''; ?> <div class="album-list <?php echo $class . ' ' . $last; ?> " > <div class="custompost_entry"> <?php if (has_post_thumbnail()) { ?> <div class="custompost_thumb port_img"> <?php echo '<figure>' . atp_resize($post->ID, '', $width, $height, '', $img_alt_title) . '</figure>'; echo '<div class="hover_type">'; echo '<a class="hoveraudio" href="' . get_permalink() . '" title="' . get_the_title() . '"></a>'; echo '</div>'; ?> </div> <?php } ?> <div class="album-desc"> <h2 class="entry-title"><a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $category = empty($instance['tcategory']) ? '' : $instance['tcategory']; $limits = empty($instance['limits']) ? '4' : $instance['limits']; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } $args = array('post_type' => 'testimonialtype', 'posts_per_page' => $limits, 'tax_query' => array(array('taxonomy' => 'testimonial_cat', 'field' => 'slug', 'terms' => $category))); $testimonial = new WP_Query($args); $rand = rand(2, 10); $tm_speed = get_option('atp_tm_speed') ? get_option('atp_tm_speed') : '3000'; echo '<script type="text/javascript"> jQuery(document).ready(function() { atpcustom.MySlider(' . $tm_speed . ',"testimonial' . $rand . '"); }); </script>'; echo '<div id="testimonial' . $rand . '" class="testimonial_list"><ul class="testimonials">'; while ($testimonial->have_posts()) { $testimonial->the_post(); $website_name = get_post_meta(get_the_ID(), 'websitename', true); $website_url = get_post_meta(get_the_ID(), 'website_url', true); $testimonial_image_option = get_post_meta(get_the_ID(), 'testimonial_image_option', true); $target_link = get_post_meta($post->ID, 'target_link', true) != 'on' ? '' : "target='_blank'"; $testimonial_content = get_the_content(get_the_ID()); switch ($testimonial_image_option) { case 'gravatar': $testimonial_email = get_post_meta(get_the_ID(), 'testimonial_email', true); $testimonial_gravatar_image = get_avatar($testimonial_email, 40); break; case 'customimage': if (has_post_thumbnail()) { $testimonial_gravatar_image = atp_resize($post->ID, '', '40', '40', 'imageborder', ''); } break; } $before = $after = ''; // post title echo '<li>'; echo '<div class="testimonial-box">'; if ($testimonial_gravatar_image != '') { echo '<div class="client-image">' . $testimonial_gravatar_image . '</div>'; } echo '<div class="testimonial-content"><p>' . $testimonial_content . '</p></div>'; if ($website_url != '') { $before = '<a href="' . esc_url($website_url) . '" ' . $target_link . '>'; $after = '</a>'; } $clientname = '<strong class="client-name">' . get_the_title() . '</strong>'; if ($website_name != '' || $clientname != '') { echo '<div class="client-meta">' . $clientname . $before . $website_name . $after . '</div>'; } echo '</div>'; echo '</li>'; } echo '</ul>'; echo '</div>'; wp_reset_query(); echo $after_widget; }
} $iva_sociables = get_post_meta($post->ID, 'artist_follow_sociables', true); $imagesrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false, ''); $img_alt_title = get_the_title(); ?> <div class="custompost_entry"> <div class="custompost_details"> <div class="col_third"> <?php if (has_post_thumbnail()) { ?> <div class="custompost_thumb port_img"> <?php echo atp_resize($post->ID, '', '470', '470', '', $img_alt_title); ?> <div class="hover_type"> <a data-rel="prettyPhoto" class="hoverimage" href="<?php echo $imagesrc[0]; ?> " title="<?php echo get_the_title(); ?> "></a> </div> </div> <?php } ?> <!-- .custompost_thumb -->
function iva_djmix($atts, $content = null, $code) { extract(shortcode_atts(array('cat' => '', 'limit' => '-1', 'columns' => '', 'postid' => '', 'pagination' => ''), $atts)); global $default_date; $column_index = 0; if ($columns == '4') { $class = 'col_fourth'; } if ($columns == '3') { $class = 'col_third'; } if ($columns == '') { $class = ''; } //Album Image Sizes $width = '470'; $height = '470'; $out = $djmix_genre = $djtitle = ''; if (get_query_var('paged')) { $paged = get_query_var('paged'); } elseif (get_query_var('page')) { $paged = get_query_var('page'); } else { $paged = 1; } $query = array('post_type' => 'djmix', 'showposts' => $limit, 'tax_query' => array('relation' => 'OR'), 'paged' => $paged, 'orderby' => 'date', 'order' => 'DESC'); if ($cat != '') { $tax_artist = array('taxonomy' => 'djmix_cat', 'field' => 'slug', 'terms' => $cat); array_push($query['tax_query'], $tax_artist); } $postid_array = array(); $postid_array = explode(',', $postid); if ($postid != '') { $query = array('post_type' => 'djmix', 'post__in' => $postid_array); } $start = rand(10, 111); query_posts($query); //get the results global $post; if (have_posts()) { while (have_posts()) { the_post(); $djmix_release_date = get_post_meta($post->ID, 'djmix_release_date', true); if ($djmix_release_date != '') { if (is_numeric($djmix_release_date)) { $djmix_release_date = date_i18n($default_date, $djmix_release_date); } } $djmix_genre = get_post_meta($post->ID, 'djmix_genre', true); $djmix_buy_mix = get_post_meta($post->ID, 'djmix_buy_mix', true); $djmix_buy_url = get_post_meta($post->ID, 'djmix_buy_url', true); $djmix_download_url = get_post_meta($post->ID, 'djmix_download_url', true); $djmix_download_text = get_post_meta($post->ID, 'djmix_download_text', true) ? get_post_meta($post->ID, 'djmix_download_text', true) : 'Download'; $audio_posttype_option = get_post_meta($post->ID, 'audio_posttype_option', true) ? get_post_meta($post->ID, 'audio_posttype_option', true) : 'player'; $djmix_upload_mix = get_post_meta($post->ID, 'djmix_upload_mix', true); $imagesrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false, ''); $image = aq_resize($imagesrc[0], '80', '80', true); // Alaaeddin: support ticket set it to 80x80 (used to be 40 x 40) $djtitle = get_the_title($post->ID); $img_alt_title = get_the_title(); $post_date = get_post_meta(get_the_id(), 'djmix_release_date', true); if ($post_date != '') { if (is_numeric($post_date)) { $post_date = date_i18n($default_date, $post_date); } } $column_index++; $last = $column_index == $columns && $columns != 1 ? 'end ' : ''; /*--------------------------------*/ $out .= '<div class="album-list ' . $class . ' ' . $last . '">'; $out .= '<div class="custompost_entry">'; $out .= "<span class='fap-my-playlist album-playlist' data-playlist='unique-playlist-id'>"; if ($audio_posttype_option == 'player') { $djmix_list = get_post_meta($post->ID, 'djmix_upload_mix', true) ? get_post_meta($post->ID, 'djmix_upload_mix', true) : ''; if (has_post_thumbnail($query->post->ID)) { $out .= '<div class="custompost_thumb port_img">'; $out .= '<figure>' . atp_resize($post->ID, '', '500', '500', '', $img_alt_title) . '</figure>'; $out .= '<div class="hover_type">'; $attachment = get_post($djmix_list); $title = $attachment->post_title; $playlisttitles = '<div id="single-player-meta' . $start . '">' . $djtitle . '<div>' . $djmix_genre . ' | ' . $post_date . '</div></div>'; $out .= '<div class="play mediamx"><a class="hoverdjmix fap-single-track no-ajaxy" data-meta="#single-player-meta' . $start . '" class="no-ajaxy" href="' . $attachment->guid . '" title="' . $title . '" rel="' . $image . '"><div class="hoverdjmix"></div></a></div>'; $out .= '</div>'; $out .= '<span class="imgoverlay"></span>'; $out .= '</div>'; } $out .= '<div class="single-player-meta" id="single-player-meta' . $start . '">' . $djtitle . '<div>' . $djmix_genre . ' | ' . $post_date . '</div></div>'; } elseif ($audio_posttype_option == 'externalmp3') { if (has_post_thumbnail($query->post->ID)) { $out .= '<div class="custompost_thumb port_img">'; $out .= '<figure>' . atp_resize($post->ID, '', '500', '500', '', $img_alt_title) . '</figure>'; $out .= '<div class="hover_type">'; //foreach($djmix_list as $attachment_id){ $attachment = get_post($attachment_id); // $title = $attachment->post_title; $djmix_externalmp3url = get_post_meta($post->ID, 'djmix_externalmp3', true); $djmix_externalmp3urltitle = get_post_meta($post->ID, 'djmix_externalmp3title', true); // Alaaeddin: Original Line: $out .='<div class="play mediamx"><a class="hoverdjmix fap-single-track no-ajaxy " data-meta="#single-player-meta'.$start.'" class="no-ajaxy" href="'.$djmix_externalmp3url.'" rel="'.$image.'" title="'.$djmix_externalmp3urltitle.'"><div class="hoverdmix"></div></a></div>'; $out .= '<div class="play mediamx"><a class="hoverdjmix fap-single-track no-ajaxy " data-meta="#single-player-meta' . $start . '" class="no-ajaxy" href="' . $djmix_externalmp3url . '" rel="' . $image . '" title="' . $djmix_externalmp3urltitle . '"></a><div class="hoverdmix"></div></a></div>'; //} $out .= '</div>'; $out .= '<span class="imgoverlay"></span>'; $out .= '</div>'; } // Alaaeddin: original line: $out .='<div class="single-player-meta" id="single-player-meta'.$start.'">'.$djtitle.'<div>'.$djmix_genre.' | '.$post_date.'</div></div>'; $out .= '<span class="single-player-meta" id="single-player-meta' . $start . '"><div><p style="font-size: 13px;">' . $djmix_genre . '</p></div></span>'; } else { if (has_post_thumbnail($query->post->ID)) { $out .= '<div class="custompost_thumb port_img">'; $out .= '<figure>' . atp_resize($post->ID, '', '500', '500', '', $img_alt_title) . '</figure>'; $out .= '<div class="hover_type">'; $attachment = get_post($attachment_id); $title = $attachment->post_title; $audio_soundcloud_url = get_post_meta($post->ID, 'audio_soundcloud_url', true); $out .= '<div><a data-meta="#single-player-meta' . $start . '" class="hoverdjmix fap-single-track no-ajaxy" href="' . $audio_soundcloud_url . '" class="fap-single-track no-ajaxy"><div class="hoverdjmix"></div></a></div>'; $out .= '</div>'; $out .= '<span class="imgoverlay"></span>'; $out .= '</div>'; } $out .= '<div class="single-player-meta" id="single-player-meta' . $start . '">' . $djtitle . '<div>' . $djmix_genre . ' | ' . $post_date . '</div></div>'; } $out .= "</span>"; $out .= '<div class="album-desc">'; $out .= '<h2 class="entry-title">' . get_the_title() . '</h2>'; if ($djmix_genre != '') { $out .= '<span>' . $djmix_genre . '</span>'; } $out .= '</div>'; $out .= '</div>'; $out .= '</div>'; if ($column_index == $columns) { $column_index = 0; $out .= '<div class="clear"></div>'; } $start++; } wp_reset_query(); if (!function_exists('atp_pagination')) { if ($pagination == 'true') { $out .= atp_pagination(); } } /*---------------------------------*/ } return $out; }