Example #1
0
function sys_blog($atts, $content = null)
{
    extract(shortcode_atts(array('cat' => '2', 'limit' => '5', 'pagination' => 'true', 'postmeta' => 'true'), $atts));
    global $atp_readmoretxt, $post;
    $out = '';
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    $query = array('category_name' => $cat, 'showposts' => $limit, 'paged' => $paged);
    query_posts($query);
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $format = get_post_format($post->ID);
            if (false === $format) {
                $format = 'standard';
            }
            $out .= '<div class="' . join(' ', get_post_class('post', get_the_ID())) . '" id="post-' . get_the_ID() . '">';
            $out .= '<div class="post_content">';
            ob_start();
            $out .= get_template_part('includes/' . $format);
            $out .= ob_get_contents();
            ob_end_clean();
            if ($format != 'link' && $format != 'quote' && $format != 'aside') {
                $out .= '<h2 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark" title="' . sprintf(__("Permanent Link to %s", 'THEME_FRONT_SITE'), esc_attr(get_the_title())) . '">' . get_the_title() . '</a></h2>';
            }
            if ($postmeta == "true") {
                $out .= '<div class="post-info">';
                $out .= atp_generator('postmetaStyle');
                $out .= '</div>';
            }
            if ($format != 'quote') {
                $out .= '<div class="post-entry">';
                $out .= '<p>' . get_the_excerpt() . '</p>';
                if ($format != 'quote' && $format != 'link') {
                    $out .= '<a href="' . get_permalink() . '" class="more-link">' . atp_localize($atp_readmoretxt, '<span>', '</span>') . '</a>';
                }
                $out .= '</div>';
            }
            $out .= '</div>';
            $out .= '</div>';
        }
        if (!function_exists('atp_pagination')) {
            if ($pagination == "true") {
                if (function_exists('atp_pagination')) {
                    $out .= atp_pagination();
                }
            }
        }
        wp_reset_query();
    }
    return $out;
}
					<?php 
        if ($column_index == $columns) {
            $column_index = 0;
            echo '<div class="clear"></div>';
        }
        ?>

				<?php 
    }
    ?>

				<div class="clear"></div>
				
				<?php 
    if ($pagination == 'on') {
        echo atp_pagination();
    }
    ?>
				
				<?php 
    wp_reset_query();
    ?>

				<?php 
} else {
    ?>
				
				<p><?php 
    _e('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'musicplay');
    ?>
</p>
Example #3
0
function atp_musicevents($atts, $content = null, $code)
{
    extract(shortcode_atts(array('cat' => '', 'limit' => '-1', 'style' => '', 'postid' => '', 'sorting' => 'past_events', 'pagination' => ''), $atts));
    //Event Image Sizes
    $width = '200';
    $height = '140';
    //$out = '';
    if (get_query_var('paged')) {
        $paged = get_query_var('paged');
    } elseif (get_query_var('page')) {
        $paged = get_query_var('page');
    } else {
        $paged = 1;
    }
    global $post;
    $out = '';
    if ($sorting == 'past_events') {
        $query = array('post_type' => 'events', 'meta_key' => 'event_date', 'orderby' => 'event_date', 'tax_query' => array('relation' => 'OR'), 'posts_per_page' => $limit, 'paged' => $paged, 'meta_query' => array('relation' => 'AND', array('key' => 'event_date', 'value' => time(), 'compare' => '<')));
        if ($cat != '') {
            $tax_cat = array('taxonomy' => 'events_cat', 'field' => 'slug', 'terms' => $cat);
            array_push($query['tax_query'], $tax_cat);
        }
        query_posts($query);
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                $eventdate = get_post_meta($post->ID, 'event_date', true);
                if ($eventdate != '') {
                    $event_date = date_i18n('M-d-Y', $eventdate);
                    $date_event = explode('-', $event_date);
                }
                $permalink = get_permalink(get_the_id());
                $out .= show($post->ID, $width, $height, $style, $sorting);
            }
            if ($pagination == 'true') {
                atp_pagination();
            }
            $out .= '<div class="clear"></div>';
        } else {
            $out .= __('No Events are currently listed', 'THEME_FRONT_SITE');
        }
        wp_reset_query();
    }
    if ($sorting == 'upcoming_events') {
        $query = array('post_type' => 'events', 'meta_key' => 'event_date', 'orderby' => 'event_date', 'order' => 'ASC', 'tax_query' => array('relation' => 'OR'), 'posts_per_page' => $limit, 'paged' => $paged, 'meta_query' => array('relation' => 'AND', array('key' => 'event_date', 'value' => time() - time() % 86400, 'compare' => '>=')));
        if ($cat != '') {
            $tax_cat = array('taxonomy' => 'events_cat', 'field' => 'slug', 'terms' => $cat);
            array_push($query['tax_query'], $tax_cat);
        }
        query_posts($query);
        //get the results
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                $eventdate = get_post_meta($post->ID, 'event_date', true);
                $event_status = get_post_meta($post->ID, '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();
                if ($eventdate != '') {
                    $event_date = date_i18n('M-d-Y', $eventdate);
                    $date_event = explode('-', $event_date);
                }
                $out .= show($post->ID, $width, $height, $style, $sorting);
            }
            if ($pagination == 'true') {
                atp_pagination();
            }
            $out .= '<div class="clear"></div>';
        } else {
            $out .= __('No Events are currently listed', 'THEME_FRONT_SITE');
        }
        wp_reset_query();
    }
    if ($sorting == 'postids') {
        if ($postid != '') {
            $postid_array = array();
            $postid_array = explode(',', $postid);
            $query = array('post_type' => 'events', 'post__in' => $postid_array, 'showposts' => $limit);
        } else {
            $query = array('post_type' => 'events', 'showposts' => $limit);
        }
        query_posts($query);
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                $eventdate = get_post_meta($post->ID, 'event_date', true);
                if ($eventdate != '') {
                    $event_date = date_i18n('M-d-Y', $eventdate);
                    $date_event = explode('-', $event_date);
                }
                $out .= show($post->ID, $width, $height, 'style2');
            }
            if (!function_exists('atp_pagination')) {
                if ($pagination == 'true') {
                    atp_pagination();
                }
            }
            $out .= '<div class="clear"></div>';
        } else {
            $out .= __('No Events are currently listed', 'THEME_FRONT_SITE');
        }
        wp_reset_query();
    }
    return $out;
}
Example #4
0
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;
}
Example #5
0
        ?>

				</div><!-- .post_content -->

			</div><!-- #post-<?php 
        the_ID();
        ?>
 -->

			<?php 
    }
    ?>

			<?php 
    if (function_exists('atp_pagination')) {
        atp_pagination();
    }
    ?>

			<?php 
} else {
    ?>

			<p><?php 
    _e('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'musicplay');
    ?>
</p>

			<?php 
    get_search_form();
    ?>
Example #6
0
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;
}
Example #7
0
function iva_album($atts, $content = null, $code)
{
    extract(shortcode_atts(array('genres' => '', 'label' => '', 'id' => '', 'postid' => '', 'limit' => '-1', 'ordering' => '', 'columns' => '4', 'pagination' => ''), $atts));
    $column_index = 0;
    if ($columns == '4') {
        $class = 'col_fourth';
    }
    if ($columns == '3') {
        $class = 'col_third';
    }
    if (get_query_var('paged')) {
        $paged = get_query_var('paged');
    } elseif (get_query_var('page')) {
        $paged = get_query_var('page');
    } else {
        $paged = 1;
    }
    $albums_orderby = get_option('atp_album_orderby');
    $albums_order = get_option('atp_album_order');
    $orderby = $ordering == 'yes' ? $albums_orderby : 'ID';
    $order = $ordering == 'yes' ? $albums_order : 'ASC';
    //Album Image Sizes
    $width = '470';
    $height = '470';
    $out = '';
    if ($genres != 'null' || $label != '') {
        $query = array('post_type' => 'albums', 'showposts' => $limit, 'tax_query' => array('relation' => 'OR'), 'paged' => $paged, 'orderby' => $orderby, 'order' => $order);
        if ($genres != '') {
            $tax_genres = array('taxonomy' => 'genres', 'field' => 'slug', 'terms' => $genres);
            array_push($query['tax_query'], $tax_genres);
        }
        if ($label != '') {
            $tax_label = array('taxonomy' => 'label', 'field' => 'slug', 'terms' => $label);
            array_push($query['tax_query'], $tax_label);
        }
    }
    if ($postid != '') {
        $postid_array = array();
        $postid_array = explode(',', $postid);
        $query = array('post_type' => 'albums', 'post__in' => $postid_array);
    }
    if ($id != '') {
        $query = array('post_type' => 'albums', 'p' => $id);
    }
    query_posts($query);
    //get the results
    global $post, $default_date;
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $audio_genre_music = get_post_meta($post->ID, 'audio_genre_music', true);
            $audio_catalog_id = get_post_meta($post->ID, 'audio_catalog_id', true);
            $audio_id_display = get_post_meta($post->ID, 'audio_upload', true);
            $audio_label = get_the_term_list($post->ID, 'label', '', ', ', '');
            $audio_labels = strip_tags($audio_label);
            $audio_genres = get_the_term_list($post->ID, 'genres', '', ', ', '');
            $audio_genres = strip_tags($audio_genres);
            $img_alt_title = get_the_title();
            $audio_button_disable = get_post_meta($post->ID, 'audio_button_disable', true);
            $audio_buttons = get_post_meta($post->ID, 'audio_buttons', true);
            $audio_release_date = get_post_meta($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);
                }
            }
            $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);
            }
            $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);
            $playlisttitles = '<div id="single-player-meta">
						<a href="' . $permalink . '">' . get_the_title($post->ID) . '</a>
						<div>' . $audio_label . ' | ' . $audio_release_date . '</div></div>';
            //if($id!='' && $label== 'null' && $genres== 'null' && $postid =='null' ){
            if ($id != '') {
                $audio_posttype_option = get_post_meta($post->ID, 'audio_posttype_option', true) ? get_post_meta($post->ID, 'audio_posttype_option', true) : 'player';
                $imagesrc = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), 'full', false, '');
                $image_dis = aq_resize($imagesrc[0], '80', '80', true);
                $out .= '<div class="album_widgetmeta">';
                $out .= atp_resize($post->ID, '', 90, 90, 'album-thumb', $img_alt_title);
                $out .= '<div class="album-widget-info">';
                $out .= '<strong><a href="' . $permalink . '">' . get_the_title() . '</a></strong>';
                $out .= '<div class="album-widgetmeta">';
                $out .= '<span>' . $audio_release_date . '</span>';
                $out .= '<span>' . $audio_artist_name . '</span>';
                $out .= '<span>' . get_the_term_list($post->ID, 'genres', '', ',', '') . '</span>';
                $out .= '</div>';
                $out .= '</div>';
                $out .= '</div>';
                $out .= "<ul class='fap-my-playlist album-playlist' data-playlist='unique-playlist-id'>";
                $audio_display = array();
                $audio_display = explode(',', $audio_id_display);
                if ($audio_posttype_option == 'player') {
                    $count = count($audio_display);
                    if ($count > 1) {
                        $i = 1;
                        foreach ($audio_display as $attachment_id) {
                            $attachment = get_post($attachment_id);
                            if (count($attachment) > 0) {
                                $attachment_title = $attachment->post_title;
                                $out .= "<li><a class='fap-single-track no-ajaxy' data-meta='#single-player-meta' href=" . $attachment->guid . "  title='" . $attachment_title . "'  rel='" . $image_dis . "'><i class='fa fa-play-circle fa-2x play_icon'></i>" . $attachment_title . "</a></li>";
                            }
                        }
                    }
                } 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'];
                            $out .= "<li><a class='fap-single-track no-ajaxy' data-meta='#single-player-meta' href='" . esc_attr($mp3_list['mp3url']) . "' title='" . $mp3_title . "'  rel='" . $image . "'><i class='fa fa-play-circle fa-2x play_icon'></i>" . $mp3_title . "</a></li>";
                        }
                    }
                } elseif ($audio_posttype_option == 'soundcloud') {
                    $audio_soundcloud_title = get_post_meta($post->ID, 'audio_soundcloud_title', true);
                    $audio_soundcloud_url = get_post_meta($post->ID, 'audio_soundcloud_url', true);
                    $out .= "<li><a class='fap-single-track no-ajaxy' data-meta='#single-player-meta' href='" . $audio_soundcloud_url . "' title='" . $audio_soundcloud_title . "'  rel='" . $image . "'><i class='fa fa-play-circle fa-2x play_icon'></i>" . $audio_soundcloud_title . "</a></li>";
                }
                $out .= "</ul>";
                echo $playlisttitles;
                if ($audio_button_disable != 'on') {
                    if ($audio_buttons != '') {
                        foreach ($audio_buttons as $buttons) {
                            if ($buttons['buttoncolor'] != '') {
                                $style = ' style="background-color:' . $buttons['buttoncolor'] . '"';
                            }
                            $out .= '<a href="' . $buttons['buttonurl'] . '" target="_blank"><button ' . $style . '  type="button" class="btn medium orange flat">
						<span>' . $buttons['buttonname'] . '</span></button></a>';
                        }
                    }
                }
            } elseif ($postid != '') {
                $out .= '<div class="album-list">';
                $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="hoveraudio"  href="' . $permalink . '" title="' . get_the_title() . '"></a>';
                    $out .= '</div>';
                    $out .= '<span class="imgoverlay"></span>';
                    $out .= '</div>';
                }
                $out .= '<div class="album-desc">';
                $out .= '<h2 class="entry-title"><a href="' . $permalink . '">' . get_the_title() . '</a></h2>';
                if ($audio_label != '') {
                    $out .= '<span>' . $audio_labels . '</span>';
                }
                if ($audio_genres != '') {
                    $out .= '<span>' . $audio_genres . '</span>';
                }
                $out .= '</div>';
                $out .= '</div>';
                $out .= '</div>';
            } elseif ($genres != 'null' || $label != 'null' || $postid == '') {
                $out .= '<div class="album-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="hoveraudio"  href="' . $permalink . '" title="' . get_the_title() . '"></a>';
                    $out .= '</div>';
                    $out .= '<span class="imgoverlay"></span>';
                    $out .= '</div>';
                }
                $out .= '<div class="album-desc">';
                $out .= '<h2 class="entry-title"><a href="' . $permalink . '">' . get_the_title() . '</a></h2>';
                if ($audio_label != '') {
                    $out .= '<span>' . $audio_labels . '</span>';
                }
                if ($audio_genres != '') {
                    $out .= '<span>' . $audio_genres . '</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;
}
Example #8
0
function iva_artist($atts, $content = null, $code)
{
    extract(shortcode_atts(array('cat' => '', 'limit' => '-1', 'columns' => '', 'postid' => '', 'pagination' => ''), $atts));
    $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 = '';
    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' => 'artists', 'showposts' => $limit, 'tax_query' => array('relation' => 'OR'), 'paged' => $paged);
    if ($cat != '') {
        $tax_artist = array('taxonomy' => 'artist_cat', 'field' => 'slug', 'terms' => $cat);
        array_push($query['tax_query'], $tax_artist);
    }
    if ($postid != '') {
        $postid_array = array();
        $postid_array = explode(',', $postid);
        $query = array('post_type' => 'artists', 'post__in' => $postid_array);
    }
    query_posts($query);
    //get the results
    global $post;
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $artist_bornplace = get_post_meta($post->ID, 'artist_bornplace', true);
            $artist_genres = get_post_meta($post->ID, 'artist_genres', true);
            $artist_year_active = get_post_meta($post->ID, 'artist_year_active', true);
            $artist_website_url = get_post_meta($post->ID, 'artist_website_url', true);
            //$artist_label		= get_the_term_list( $post->ID, 'label', '', ',', '' );
            $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="artist-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="hoverartist"  href="' . $permalink . '" title="' . get_the_title() . '"></a>';
                $out .= '</div>';
                $out .= '</div>';
            }
            $out .= '<div class="artist-desc">';
            $out .= '<h2 class="entry-title"><a href="' . $permalink . '">' . get_the_title() . '</a></h2>';
            if ($artist_genres != '') {
                $out .= '<span>' . $artist_genres . '</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;
}