当前位置: 首页>>代码示例>>PHP>>正文


PHP atp_resize函数代码示例

本文整理汇总了PHP中atp_resize函数的典型用法代码示例。如果您正苦于以下问题:PHP atp_resize函数的具体用法?PHP atp_resize怎么用?PHP atp_resize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了atp_resize函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: iva_post_fslider

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();
}
开发者ID:pryspry,项目名称:MusicPlay,代码行数:26,代码来源:flexslider.php

示例2: sys_recent_posts

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();
}
开发者ID:pryspry,项目名称:MusicPlay,代码行数:34,代码来源:recentposts.php

示例3: iva_image

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;
}
开发者ID:pryspry,项目名称:MusicPlay,代码行数:58,代码来源:image.php

示例4: widget

 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;
 }
开发者ID:pryspry,项目名称:MusicPlay,代码行数:50,代码来源:music_video.php

示例5: iva_staff

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;
}
开发者ID:pryspry,项目名称:MusicPlay,代码行数:50,代码来源:staff.php

示例6: sys_popular_posts

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();
}
开发者ID:pryspry,项目名称:MusicPlay,代码行数:48,代码来源:popularposts.php

示例7: widget

 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;
 }
开发者ID:pryspry,项目名称:MusicPlay,代码行数:48,代码来源:music_gallery_photos.php

示例8: atp_resize

        ?>
				
				<?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 
开发者ID:pryspry,项目名称:MusicPlay,代码行数:31,代码来源:single-events.php

示例9: atp_resize

        } 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 
开发者ID:pryspry,项目名称:MusicPlay,代码行数:31,代码来源:single-albums.php

示例10: iva_offers_shortcode

 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;
 }
开发者ID:abdullaniyas,项目名称:cleansweep2,代码行数:69,代码来源:iva_towing_offers.php

示例11: get_post_meta

        $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>';
                    ?>
开发者ID:pryspry,项目名称:MusicPlay,代码行数:31,代码来源:template_djmix.php

示例12: get_post_thumbnail_id

<?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 
}
开发者ID:pryspry,项目名称:MusicPlay,代码行数:23,代码来源:posttype_image.php

示例13: iva_blog_carousel

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;
}
开发者ID:pryspry,项目名称:MusicPlay,代码行数:81,代码来源:carousel_blog.php

示例14: foreach

                        $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 -->
开发者ID:pryspry,项目名称:MusicPlay,代码行数:30,代码来源:single-gallery.php

示例15: show

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);
//.........这里部分代码省略.........
开发者ID:pryspry,项目名称:MusicPlay,代码行数:101,代码来源:music_event.php


注:本文中的atp_resize函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。