• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getPostLikeLink函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: the_title

    echo '<div class="work-content">';
    ?>
			  <?php 
    the_title();
    ?>
			<?php 
    echo '</div></div>';
    ?>
				<ul class="work-mate">
					<li class="work_tabs"><?php 
    $terms_as_text = get_the_term_list($post->ID, 'genre', '', ', ', '');
    echo strip_tags($terms_as_text);
    ?>
</li>
					<li class="like_btn"><?php 
    echo getPostLikeLink(get_the_ID());
    ?>
</li>	
				</ul>
			<?php 
    echo '</article>';
    ?>

  <?php 
}
?>
  			</div> 
		</div>
<div class="work-nav fadeInDown animated"><div class="post-nav">
	<div class="post-nav-inside">
  <?php 
开发者ID:xmandxx,项目名称:Teahouse-Wordpress-Theme,代码行数:31,代码来源:custom-work.php


示例2: the_content

    echo " pd-no-social";
}
?>
"> 
                <?php 
the_content();
?>
 
            </div>
            <a class="home" href="<?php 
echo get_site_url();
?>
"></a>

            <div class="like"><?php 
echo getPostLikeLink($id);
?>
</div>

            <!-- Portfolio Detail navigation  -->
            <div id="PDnavigation"></div>
            
        </div>
    
         <!--  Portfolio Detail Slider  -->
        <div class="pd_creative_item">
            <div class="pDHeader pDHeader-<?php 
echo esc_attr($pPostType);
?>
">
                <?php 
开发者ID:rmilano24,项目名称:moto,代码行数:31,代码来源:portfolio-detail-creative.php


示例3: the_permalink

			<div class="title"><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></div>
			<?php 
get_template_part('templates/folio', 'terms');
?>
		</div>
	</div>
	<div class="columns tree mobile-hide">
		<div class="social-share">
			<?php 
echo getPostLikeLink();
?>
		</div>
	</div>
</div>
<?php 
if (!empty($attachments)) {
    ?>
<div class="hide">
<?php 
    foreach ($attachments as $attachment_id) {
        $image_src = wp_get_attachment_image_src($attachment_id, 'full');
        if (empty($image_src[0])) {
            continue;
        }
        $attachment_img_url = $image_src[0];
开发者ID:sabdev1,项目名称:sabljc,代码行数:31,代码来源:entry-meta.php


示例4: print_r

        <div class="large-8 column noleftpad">
            <?php 
/*echo '<pre><!--';
  print_r($galls);
  echo '--></pre>';*/
?>
            <h1 class="entry-title zl_portfloo_title"><?php 
echo $title;
?>
</h1>
        </div>
        <div class="large-4 column norightpad">
            <ul class="zl_port_nav">
                <!-- PREV -->
                <li><?php 
echo getPostLikeLink($post->ID);
?>
</li>
                <?php 
if ($next) {
    ?>
                <li class="zl_open_next tooltip" title="<?php 
    echo zl_option('lang_port_prev', __('Previous Project', 'zatolab'));
    ?>
"><a class="ajaxLink" href="<?php 
    echo $nexturi;
    ?>
" data-id="<?php 
    echo $newerID;
    ?>
"><div class="dashicons dashicons-arrow-left-alt2"></div></a></li>
开发者ID:webtechfreaky,项目名称:vienna-content-focused-personal-blog-theme,代码行数:31,代码来源:portfoliodetail.php


示例5: get_the_author

                            <span>Написав <?php 
echo get_the_author();
?>
</span>
                        </div>
                        <div class="entry-top-post-date">
                            <?php 
the_date('j F, Y', '<span>', '</span>');
?>
                        </div>
                    </div>
                </div>
                <div class="entry-top-meta">
                    <div class="like-button entry-top-meta-el">
                        <?php 
echo getPostLikeLink($post_id);
?>
                    </div>
                    <div class="comments-count entry-top-meta-el">
                        <i class="fa fa-comment-o"></i><span class="comments-count-num"> <?php 
comments_number('0', '1', '%');
?>
</span>
                    </div>
                    <div class="views-count entry-top-meta-el">
                        <i class="fa fa-eye"></i><span class="views-count-num"> <?php 
echo getPostViews($post_id);
?>
</span>
                    </div>
开发者ID:Chudylo,项目名称:opengamer_theme,代码行数:30,代码来源:content-news-side.php


示例6: rehub_create_column

    function rehub_create_column($size = 'middle')
    {
        ?>
<article class="rething_item small_post inf_scr_item">
    <?php 
        if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
            ?>
        <figure>
            <?php 
            rehub_formats_icons('full');
            ?>
            <span class="pattern"></span>
            <?php 
            echo getPostLikeLink(get_the_ID());
            ?>
            <?php 
            rehub_permalink();
            ?>
                <?php 
            $img = get_post_thumb();
            $nothumb = get_stylesheet_directory_uri() . '/images/noim.png';
            if ($size == 'middle') {
                $params = array('width' => 381, 'height' => 255, 'crop' => true);
            } elseif ($size == 'small') {
                $params = array('width' => 280, 'height' => 186, 'crop' => true);
            } elseif ($size == 'big') {
                $params = array('width' => 579, 'height' => 386, 'crop' => true);
            } else {
                $params = array('width' => 381, 'height' => 255, 'crop' => true);
            }
            ?>
				<?php 
            if (!empty($img)) {
                ?>
                	<img src="<?php 
                echo bfi_thumb($img, $params);
                ?>
" alt="<?php 
                the_title_attribute();
                ?>
" />
                <?php 
            } else {
                ?>
    
                    <img src="<?php 
                echo $nothumb;
                ?>
" alt="<?php 
                the_title_attribute();
                ?>
" />
                <?php 
            }
            ?>
            </a>
        </figure>                                     
    <?php 
        }
        ?>
    <div class="wrap_thing">
        <div class="top">
            <?php 
        $category = get_the_category(get_the_ID());
        ?>
            <?php 
        if ($category) {
            $first_cat = $category[0]->term_id;
            meta_small(false, $first_cat, false, false);
        }
        ?>
        </div>
        <div class="hover_anons">
            <h2><?php 
        rehub_permalink();
        the_title();
        ?>
</a></h2>
            <div class="post-meta"> <?php 
        meta_small(true, false, true, false);
        ?>
 </div>
            <?php 
        rehub_format_score('small');
        ?>
            <p><?php 
        kama_excerpt('maxchar=320');
        ?>
</p>
        </div>
        <?php 
        rehub_create_btn('yes');
        ?>
    </div>
</article>

<?php 
    }
开发者ID:rhondamoananui,项目名称:rehub,代码行数:98,代码来源:functions.php


示例7: ep_thumbnail_gallery_slideshow

 function ep_thumbnail_gallery_slideshow($image_size, $id, $post_name, $terms, $isLink, $pLink)
 {
     // Add slideshow javascript
     global $add_slider;
     $add_slider = true;
     $maxthumbnum = 3;
     // Set the slideshow variable
     $slideshow = '';
     // Get The Post Type
     $posttype = get_post_type($id);
     // Check whether the slide should link
     $permalink = get_permalink($id);
     $title = get_the_title($id);
     // get the item title
     //For custom taxonomy use this line below
     $terms = wp_get_object_terms($id, 'gallery_cat');
     $term_names = array();
     foreach ($terms as $term) {
         $term_names[] = $term->name;
     }
     if ($isLink == true) {
         $permalink = '<div class="galleryItem" data-sub-html=" <h4> ' . get_the_title($id) . '</h4><p>' . get_post_meta($id, "subtitle-text", true) . '</p>" data-src="' . $pLink . '"><a href="' . $pLink . '"  title="' . $title . '" class="portfolioLink overlay thumbnail-' . $image_size . '">';
     } else {
         $gallery_url = '';
         $gallery_url = get_post_meta($id, '_thumbnail_id', false);
         $gallery_url = wp_get_attachment_image_src($gallery_url[0], $image_size, false);
         $permalink = '<div class="galleryItem" data-sub-html=" <h4> ' . get_the_title($id) . '</h4><p>' . get_post_meta($id, "subtitle-text", true) . '</p>" data-src="' . $gallery_url[0] . '"><a href="' . $gallery_url[0] . '"  title="' . $title . '" class=" portfolioLink overlay thumbnail-' . $image_size . '">';
     }
     $permalinkend = '</a></div>';
     $counter = 2;
     //start counter at 2
     $full = get_post_meta($id, '_thumbnail_id', false);
     // Get Image ID
     $image_size = 'ep_thumbnail-' . $image_size;
     // Get all slides
     ${"full" . $counter} = MultiPostThumbnails::get_post_thumbnail_id($posttype, $counter . '-slide', $id);
     // Get Image ID
     ${"alt" . $counter} = get_post_meta(${"full" . $counter}, '_wp_attachment_image_alt', true);
     // Alt text of image
     ${"full" . $counter} = wp_get_attachment_image_src(${"full" . $counter}, false);
     // URL of Second Slide Full Image
     ${"thumb" . $counter} = MultiPostThumbnails::get_post_thumbnail_id($posttype, $counter . '-slide', $id);
     ${"thumb" . $counter} = wp_get_attachment_image_src(${"thumb" . $counter}, $image_size, false);
     // URL of next Slide
     //number of entered thumbnails
     $maxthumbnumset = 1;
     // Show featured image
     $thumb = '';
     if ($full) {
         $alt = get_post_meta($full, '_wp_attachment_image_alt', true);
         // Alt text of image
         $thumb = get_post_meta($id, '_thumbnail_id', false);
         $thumb = wp_get_attachment_image_src($thumb[0], $image_size, false);
         // URL of Featured first slide
     }
     $slideshow .= $permalink . '<div class="hoverContent">';
     $slideshow .= '<div class="frame top">';
     $slideshow .= '<div></div>';
     $slideshow .= '</div>';
     $slideshow .= '<div class="frame right">';
     $slideshow .= '<div></div>';
     $slideshow .= '</div>';
     $slideshow .= '<div class="frame bottom">';
     $slideshow .= '<div></div>';
     $slideshow .= '</div>';
     $slideshow .= '<div class="frame left">';
     $slideshow .= '<div></div>';
     $slideshow .= '</div>';
     $slideshow .= '<div class="icon-wrap"><div class="icon-type"></div></div><div class="center-line"></div><div class="title-wrap"><div class="titleContainer"><div class="hover-title" >' . get_the_title($id) . '</div><div class="hover-subtitle">' . implode(', ', $term_names) . '</div></div></div>';
     $slideshow .= '</div>';
     $slideshow .= $permalinkend;
     $slideshow .= '<div class="like">' . getPostLikeLink($id) . '</div>';
     $thumb1 = $thumb;
     // Loop through thumbnails and set them
     $tcounter = 1;
     while ($tcounter <= $maxthumbnum) {
         if (${'thumb' . $tcounter}) {
             //If there is just 1 thumb or it is ipad
             if ($maxthumbnumset == 1 || isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
                 $slideshow .= '<div class="pSlide" style="background-image: url(' . ${'thumb' . $tcounter}[0] . ');"><a href="' . ${'thumb' . $tcounter}[0] . '" ></a></div>';
                 break;
             } else {
                 $slideshow .= '<div class="pSlide" style="background-image: url(' . ${'thumb' . $tcounter}[0] . ');"><a href="' . ${'thumb' . $tcounter}[0] . '"></a></div>';
             }
         }
         $tcounter++;
     }
     return $slideshow;
 }
开发者ID:rmilano24,项目名称:moto,代码行数:89,代码来源:utilities.php


示例8: esc_attr

                $output .= '<div class="' . ($carousel == 'yes' ? 'swioer-slide' : '') . ' blog-item ' . esc_attr($style) . ' ' . ($dynamic_from_where == 'one_post' ? 'single' : '') . '">';
                if (has_post_thumbnail()) {
                    $output .= '<img src="' . esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port2', 'url')) . '" alt="">';
                }
                $output .= '<div class="content">';
                $output .= '<h4><a href="' . esc_attr(get_permalink()) . '">' . esc_html(get_the_title()) . '</a></h4>';
                $output .= '<ul class="info">';
                $output .= '<li><i class="linecon-icon-user"></i>' . __('Posted by', 'codeless') . ' ' . get_the_author() . '</li>';
                $output .= '<li><i class="linecon-icon-calendar"></i>' . __('On', 'codeless') . ' ' . get_the_date() . '</li>';
                $output .= '</ul>';
                $output .= '<p>' . codeless_text_limit(get_the_excerpt(), $text_limit) . '</p>';
                $output .= '<div class="after">';
                $output .= '<ul class="info">';
                $output .= '<li><i class="linecon-icon-tag"></i>' . $tag_out . '</li>';
                $output .= '</ul>';
                $output .= '<div class="post-like">' . getPostLikeLink(get_the_ID()) . '</div>';
                $output .= '</div>';
                $output .= '</div>';
                $output .= '</div>';
            }
        }
    }
    if ($carousel == 'yes') {
        $output .= '</div>';
        $output .= '</div>';
    } else {
        $output .= '</div>';
    }
}
$output .= '</div>';
wp_reset_query();
开发者ID:jzornow,项目名称:cotton_consulting,代码行数:31,代码来源:latest_blog.php


示例9: get_the_title

" alt="<?php 
                echo get_the_title($photo);
                ?>
" />
										<div class="zl_alb_overlay">
											<div class="zl_alb_zoom">
												<a href="<?php 
                echo get_attachment_link($photo);
                ?>
" class="zl_zoom">
													<span class="dashicons dashicons-external"></span>
												</a>
											</div>
											<div class="zl_alb_likebox">
												<?php 
                echo getPostLikeLink($photo);
                ?>
												<span class="dashicons dashicons-admin-comments"></span> 
												<?php 
                echo get_comments_number($photo);
                ?>
											</div>
										</div>
									</div>
									<div class="clear"></div>
								</div>
							<?php 
            }
            ?>
							</div>
开发者ID:webtechfreaky,项目名称:vienna-content-focused-personal-blog-theme,代码行数:30,代码来源:single-zl_album.php


示例10: ct_get_post_meta

    function ct_get_post_meta($ct_postid, $ct_comments, $ct_views, $ct_likes)
    {
        global $post;
        ?>

		<?php 
        if ($ct_comments == 1) {
            ?>
			<?php 
            if (comments_open()) {
                ?>
			<span class="meta-comments">
				<i class="icon-comment"></i>
				<?php 
                comments_popup_link(__('0', 'color-theme-framework'), __('1', 'color-theme-framework'), __('%', 'color-theme-framework'));
                ?>
			</span><!-- .meta-comments -->
			<?php 
            }
            ?>
		<?php 
        }
        ?>


		<?php 
        if ($ct_views == 1) {
            ?>
		<span class="meta-views" title="<?php 
            _e('Views', 'color-theme-framework');
            ?>
">
			<i class="icon-eye-open"></i>
			<?php 
            echo getPostViews($ct_postid);
            ?>
		</span><!-- .meta-views -->
		<?php 
        }
        ?>

		<?php 
        if ($ct_likes == 1) {
            ?>
		<span class="meta-likes" title="<?php 
            _e('Likes', 'color-theme-framework');
            ?>
">
			<?php 
            getPostLikeLink($ct_postid);
            ?>
		</span><!-- .meta-likes -->
		<?php 
        }
        ?>
		

		<?php 
        $post_type = get_post_meta($post->ID, 'ct_mb_post_type', true);
        if ($post_type == 'review_post') {
            ct_get_rating_stars();
        }
        if ($post_type == 'review_post_numeric') {
            ct_get_rating_numeric();
        }
        ?>

<?php 
    }
开发者ID:sekane81,项目名称:ratoninquietoweb,代码行数:69,代码来源:functions.php


示例11: waxom_love_button

 function waxom_love_button()
 {
     if (function_exists('getPostLikeLink')) {
         echo '<div class="portfolio-love-button">' . getPostLikeLink(get_the_ID()) . '</div>';
     } else {
         return false;
     }
 }
开发者ID:siiiiilvio,项目名称:kadcnc,代码行数:8,代码来源:portfolio-functions.php


示例12: waxom_portfolio_details

function waxom_portfolio_details($atts, $content)
{
    extract(shortcode_atts(array("title_type" => 'post_title', "title" => '', "skills" => 'Design,Photography,HTML,jQuery', "categories" => 'yes', "budget" => '$800 - $1200', "likes" => 'yes', "date" => 'no', "client_website" => 'www.clientsite.com', "client" => 'Client Name', "button1_label" => 'Live Preview', "button1_url" => '#', "button2_label" => '', "button2_url" => '', "style" => 'default2'), $atts));
    global $post;
    $theTitle = get_the_title($post->ID);
    if ($title_type == 'custom' && $title) {
        $theTitle = $title;
    }
    $output = '<div class="vntd-portfolio-details portfolio-details-' . $style . '">';
    if ($style == 'default2') {
        $output .= '<div class="col-xs-8"><h2 class="project-head">' . $theTitle . '</h2><p class="project-desc">' . $content . '</p>';
        if ($button1_label & $button1_url) {
            $output .= '<a href="' . $button1_url . '" target="_blank" class="btn btn-accent project-button">' . $button1_label . '</a>';
        }
        if ($button2_label & $button2_url) {
            $output .= '<a href="' . $button2_url . '" class="btn btn-green vntd-accent-bgcolor-hover project-button project-button-secondary">' . $button2_label . '</a>';
        }
        $output .= '</div><div class="col-xs-4 portfolio-details-side">';
    } elseif ($style == 'default1') {
        $output .= '<h2 class="project-head">' . $theTitle . '</h2>';
        $output .= '<p class="project-desc">' . $content . '</p>';
    } else {
        // Minimal Style
        $output .= '<h2 class="project-head">' . $theTitle . '</h2>';
        if ($categories != 'no') {
            $output .= '<div class="project-head-categories">';
            $terms = wp_get_object_terms($post->ID, "project-type");
            foreach ($terms as $term) {
                $output .= $term->name;
                if (end($terms) !== $term) {
                    $output .= ", ";
                }
            }
            $output .= '</div>';
        }
        $output .= '<p class="project-desc">' . $content . '</p>';
    }
    if ($style != 'minimal') {
        $output .= '<ul class="project-features">';
        // Client Name
        if ($client) {
            $output .= '<li class="project-feature"><h6>' . __('Client', 'waxom') . ': </h6><p class="normal">' . $client . '</p></li>';
        }
        // Budget
        if ($budget != 'no') {
            $output .= '<li class="project-feature project-feature-budget"><h6>' . __('Budget', 'waxom') . ': </h6><p class="normal">' . $budget . '</p></li>';
        }
        // Budget
        if ($likes != 'no') {
            $output .= '<li class="project-feature project-feature-likes"><h6>' . __('Likes', 'waxom') . ': </h6><p class="normal">' . getPostLikeLink($post->ID) . '</p></li>';
        }
        // Client Website
        if ($client_website) {
            $output .= '<li class="project-feature project-feature-website"><h6>' . __('Live Demo', 'waxom') . ': </h6><p class="normal"><a href="http://' . $client_website . '" target="_blank" title="' . $theTitle . '" alt="' . $theTitle . '">' . $client_website . '</a></p></li>';
        }
        // Date
        if ($date != 'no') {
            $output .= '<li class="project-feature project-feature-date"><h6>' . __('Date', 'waxom') . ': </h6><p class="normal">' . get_the_time('F d, Y') . '</p></li>';
        }
        // Skills
        if ($skills) {
            $output .= '<li class="project-feature"><h6>' . __('Skills', 'waxom') . ': </h6><ul class="project-feature-skills">';
            $skills = explode(',', $skills);
            foreach ($skills as $skill) {
                $output .= '<li class="project-skill">' . $skill . '</li>';
            }
            $output .= '</ul></li>';
        }
        $output .= '</ul>';
    }
    // end if style == minimal
    if ($style != 'default2') {
        if ($button1_label & $button1_url) {
            $output .= '<a href="' . $button1_url . '" target="_blank" class="btn btn-accent project-button">' . $button1_label . '</a>';
        }
        if ($button2_label & $button2_url) {
            $output .= '<a href="' . $button2_url . '" class="btn btn-green vntd-accent-bgcolor-hover project-button project-button-secondary">' . $button2_label . '</a>';
        }
    }
    $output .= '</div>';
    if ($style == 'default2') {
        $output .= '</div>';
    }
    return $output;
}
开发者ID:siiiiilvio,项目名称:kadcnc,代码行数:85,代码来源:portfolio-details.php


示例13: azexo_entry_field

 function azexo_entry_field($template_name = 'post', $name)
 {
     $options = get_option(AZEXO_THEME_NAME);
     $output = apply_filters('azexo_entry_field', false, $template_name, $name);
     if ($output) {
         return $output;
     }
     switch ($name) {
         case 'post_sticky':
             if (is_sticky() && is_home() && !is_paged()) {
                 return '<span class="featured-post">' . __('Sticky', AZEXO_THEME_NAME) . '</span>';
             }
             break;
         case 'post_splitted_date':
             return azexo_entry_splitted_date(false);
             break;
         case 'post_date':
             return azexo_entry_date(false);
             break;
         case 'post_category':
             $categories_list = azexo_get_the_category_list(__(', ', AZEXO_THEME_NAME));
             if ($categories_list) {
                 return '<span class="categories-links">' . (isset($options[$template_name . '_category_prefix']) ? esc_html($options[$template_name . '_category_prefix']) : '') . $categories_list . '</span>';
             }
             break;
         case 'post_tags':
             $tag_list = get_the_tag_list('', __(', ', AZEXO_THEME_NAME));
             if ($tag_list) {
                 return '<span class="tags-links">' . (isset($options[$template_name . '_tags_prefix']) ? esc_html($options[$template_name . '_tags_prefix']) : '') . $tag_list . '</span>';
             }
             break;
         case 'post_author':
             if ('post' == get_post_type()) {
                 return sprintf('<span class="author vcard">' . (isset($options[$template_name . '_author_prefix']) ? esc_html($options[$template_name . '_author_prefix']) : '') . '<a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', AZEXO_THEME_NAME), get_the_author())), get_the_author());
             }
             break;
         case 'post_author_avatar':
             if ('post' == get_post_type()) {
                 return '<span class="avatar">' . get_avatar(get_the_author_meta('ID')) . '</span>';
             }
             break;
         case 'post_like':
             return '<span class="like">' . getPostLikeLink(get_the_ID()) . '</span>';
             break;
         case 'post_comments_count':
             if (!is_single() && !is_search()) {
                 $comment_count = get_comment_count(get_the_ID());
                 $comments = '<a href="' . get_comments_link() . '"><span class="count">' . $comment_count['total_comments'] . '</span><span class="label">' . __('comments', AZEXO_THEME_NAME) . '</span></a>';
                 return '<span class="comments">' . $comments . '</span>';
             }
             break;
         default:
             return '';
             break;
     }
     return '';
 }
开发者ID:mauricioabisay,项目名称:loc,代码行数:57,代码来源:functions.php


示例14: tmnf_meta_full

function tmnf_meta_full()
{
    ?>
    
	<p class="meta meta_full">
		<span class="post-date updated"><i class="icon-clock"></i> <?php 
    the_time(get_option('date_format'));
    ?>
</span>
      	<span class="comm"><i class="icon-chat"></i> <?php 
    comments_popup_link(__('Comments (0)', 'themnific'), __('Comments (1)', 'themnific'), __('Comments (%)', 'themnific'));
    ?>
</span>
		<span class="categs"><i class="icon-folder-empty"></i> <?php 
    the_category(', ');
    ?>
</span>
        <span class="meta likes"><?php 
    echo getPostLikeLink(get_the_ID());
    ?>
</span>
    </p>
<?php 
}
开发者ID:xiang-chen-git,项目名称:LeanBlog,代码行数:24,代码来源:functions.php


示例15: zl_article_extra

function zl_article_extra()
{
    global $post;
    ?>

	<!-- category, link, comment -->
	<div id="zl_post_id_meta">
		<ul class="zl_post_id_meta">
			<li><span class="dashicons dashicons-portfolio"></span> 
				<?php 
    $category = get_the_category();
    //echo $category[0]->cat_name;
    ?>
				<a href="<?php 
    echo get_category_link($category[0]->term_id);
    ?>
"><?php 
    echo $category[0]->cat_name;
    ?>
</a>
			</li>
			<li><span class="dashicons dashicons-admin-comments"></span> <a href="<?php 
    the_permalink();
    ?>
#zl_comments"><?php 
    comments_number('0', '1', '%');
    ?>
</a></li>
			<li><span class="dashicons dashicons-visibility"></span> <a href="<?php 
    the_permalink();
    ?>
"><?php 
    echo zl_getPostViews(get_the_ID());
    ?>
</a></li>
			<li><?php 
    echo getPostLikeLink($post->ID);
    ?>
</li>
		</ul>
	</div>
	<div class="clear"></div>
	<!-- oooooooooooooooooooooooooooooooooo
		Tags
		oooooooooooooooooooooooooooooooooooo-->
	<?php 
    echo "<div class='zl_posttags'>";
    the_tags('<span>' . zl_option('lang_tags', __('Tagged with: ', 'zatolab')) . '</span><div class="clear"></div>', ' ', '<br />');
    echo "</div>";
    ?>
	 <div class="clear"></div>
	<!-- oooooooooooooooooooooooooooooooooo
		Share Button
		oooooooooooooooooooooooooooooooooooo-->
	<?php 
    if (vp_option('zl_option.show_share') == 1) {
        ?>
	<a class="zl_post_readmore is_single" id="zl_share_it"><span class="dashicons dashicons-share"></span> <?php 
        echo zl_option('lang_share', __('Share', 'zatolab'));
        ?>
</a>
	<ul id="share_button">
		<?php 
        $link = get_permalink();
        $linkparse = urlencode($link);
        ?>
		<?php 
        $thumb = get_post_thumbnail_id();
        $img_url = wp_get_attachment_url($thumb, 'full');
        ?>
		<ul class="sharelist">
			<li><a onclick="window.open('http://www.facebook.com/sharer.php?u=<?php 
        the_permalink();
        ?>
','Facebook','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://www.facebook.com/sharer.php?u=<?php 
        the_permalink();
        ?>
"><i class="sicon-facebook"></i> Facebook</a></li>

			<li><a onclick="window.open('https://twitter.com/intent/tweet?original_referer=<?php 
        the_permalink();
        ?>
&amp;text=<?php 
        echo rawurlencode(get_the_title());
        ?>
&amp;url=<?php 
        the_permalink();
        ?>
','Twitter','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="https://twitter.com/intent/tweet?original_referer=<?php 
        the_permalink();
        ?>
&amp;text=<?php 
        echo rawurlencode(get_the_title());
        ?>
&amp;url=<?php 
        the_permalink();
        ?>
"><i class="sicon-twitter"></i> Twitter</a></li>

			<li><a onclick="window.open('https://plus.google.com/share?url=<?php 
//.........这里部分代码省略.........
开发者ID:webtechfreaky,项目名称:vienna-content-focused-personal-blog-theme,代码行数:101,代码来源:install.php


示例16: jm_like_shortcode

/**
 * (7) Add a shortcode to your posts instead
 * type [jmliker] in your post to output the button
 */
function jm_like_shortcode()
{
    return getPostLikeLink(get_the_ID());
}
开发者ID:jzornow,项目名称:cotton_consulting,代码行数:8,代码来源:post-like.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getPostLink函数代码示例发布时间:2022-05-15
下一篇:
PHP getPostData函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap