本文整理汇总了PHP中zilla_likes函数的典型用法代码示例。如果您正苦于以下问题:PHP zilla_likes函数的具体用法?PHP zilla_likes怎么用?PHP zilla_likes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zilla_likes函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wpex_post_meta
function wpex_post_meta()
{
?>
<section class="meta clearfix" id="single-meta">
<ul>
<li class="meta-single-date"><span class="fa fa-calendar"></span><?php
the_date();
?>
</li>
<?php
if (comments_open()) {
?>
<li class="comment-scroll meta-single-comments"><span class="fa fa-comment"></span> <?php
comments_popup_link(__('Leave a comment', 'wpex'), __('1 Comment', 'wpex'), __('% Comments', 'wpex'), 'comments-link', __('Comments closed', 'wpex'));
?>
</li>
<?php
}
?>
<?php
if (function_exists('zilla_likes')) {
?>
<li class="meta-single-zilla-likes"><?php
zilla_likes();
?>
</li><?php
}
?>
</ul>
</section><!--/meta -->
<?php
}
示例2: wpex_entry_meta
function wpex_entry_meta()
{
?>
<ul class="loop-entry-meta clearfix">
<li class="meta-date"><span class="fa fa-calendar"></span><?php
echo get_the_date();
?>
</li>
<?php
if (comments_open()) {
?>
<li class="meta-comments"><span class="fa fa-comment"></span> <?php
comments_popup_link(__('0 comments', 'wpex'), __('1 comment', 'wpex'), __('% comments', 'wpex'), 'comments-link', __('comments closed', 'wpex'));
?>
</li>
<?php
}
?>
<?php
if (function_exists('zilla_likes')) {
?>
<li class="meta-zilla-likes"><?php
zilla_likes();
?>
</li><?php
}
?>
</ul> <!-- /loop-entry-meta -->
<?php
}
示例3: the_time
</div> <!-- /author-links -->
</div> <!-- /post-author-content -->
</div> <!-- /post-author -->
<div class="post-meta">
<p class="post-date"><?php
the_time(get_option('date_format'));
?>
</p>
<?php
if (function_exists('zilla_likes')) {
zilla_likes();
}
?>
<p class="post-categories"><?php
the_category(', ');
?>
</p>
<?php
if (has_tag()) {
?>
<p class="post-tags"><?php
the_tags('', ', ');
?>
示例4: mpcth_portfolio_posts
function mpcth_portfolio_posts($query, $atts, $class = 'related')
{
extract(shortcode_atts(array('background_hover' => '', 'text_hover' => '', 'css_animation' => ''), $atts));
$index = 0;
$count = $query->post_count;
$css_id = 'mpcth_sc_' . $class . '_portfolio_' . mpcth_random_ID(5);
$background_ie = $background_hover;
$background_hover = 'rgba(' . implode(', ', mpcth_hex_to_rgba($background_hover, 0.95)) . ')';
$return = '<div id="' . $css_id . '" class="mpcth-sc-' . $class . '-portfolio mpcth-sc-grid-portfolio-columns-' . $count . ' mpcth-waypoint-trigger' . ($css_animation != '' ? ' mpcth-stack-animation' : '') . '"' . ($css_animation != '' ? ' data-animation-type="' . $css_animation . '"' : '') . '>';
$return .= '<ul class="mpcth-sc-grid-portfolio-list">';
if ($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
$index++;
$categories = get_the_terms(get_the_ID(), 'mpcth_portfolio_category');
$categories_str = '';
if (!empty($categories)) {
$last_item = end($categories);
foreach ($categories as $category) {
$categories_str .= '<a class="mpcth-sc-grid-portfolio-post-category" href="' . get_term_link($category->slug, 'mpcth_portfolio_category') . '">';
if ($category == $last_item) {
$categories_str .= $category->name;
} else {
$categories_str .= $category->name . ', ';
}
$categories_str .= '</a>';
}
}
if (function_exists('zilla_likes')) {
ob_start();
zilla_likes();
$zilla_likes = ob_get_contents();
ob_end_clean();
}
if ($index == $count) {
$return .= '<li class="mpcth-sc-grid-portfolio-post last-item">';
} else {
$return .= '<li class="mpcth-sc-grid-portfolio-post">';
}
if (has_post_thumbnail(get_the_ID())) {
$return .= get_the_post_thumbnail(get_the_ID(), 'mpcth-post-thumbnails-col-3', array('class' => "mpcth-sc-grid-portfolio-post-thumb"));
}
$return .= '<div class="mpcth-sc-grid-portfolio-post-info-wrap">';
$return .= '<div class="mpcth-sc-grid-portfolio-post-info">';
$return .= '<h6 class="mpcth-sc-grid-portfolio-post-title">';
$return .= '<a href="' . get_permalink(get_the_ID()) . '">';
$return .= get_the_title();
$return .= '</a>';
$return .= '</h6>';
if (!empty($zilla_likes)) {
$return .= '<div class="mpcth-sc-grid-portfolio-post-likes">' . $zilla_likes . '</div>';
}
if (!empty($categories_str)) {
$return .= '<div class="mpcth-sc-grid-portfolio-post-categories">' . $categories_str . '</div>';
}
$return .= '</div>';
$return .= '</div>';
$return .= '</li>';
}
}
$return .= '</ul>';
$return .= '<div class="mpcth-clear-fix"></div>';
$return .= '</div>';
$return .= '<style>';
$return .= '#' . $css_id . ' .mpcth-sc-grid-portfolio-list .mpcth-sc-grid-portfolio-post-info-wrap { background: ' . $background_ie . '; background: ' . $background_hover . '; border-bottom-color: ' . mpcth_adjust_brightness($background_ie, -20) . ' !important; }' . PHP_EOL;
$return .= '#' . $css_id . ' .mpcth-sc-grid-portfolio-list .mpcth-sc-grid-portfolio-post-info-wrap * { color: ' . $text_hover . '; }' . PHP_EOL;
$return .= '#' . $css_id . ' .mpcth-sc-grid-portfolio-list .mpcth-sc-grid-portfolio-post-info-wrap *:before { color: ' . $text_hover . '; }' . PHP_EOL;
$return .= '#' . $css_id . ' .mpcth-sc-grid-portfolio-list .mpcth-sc-grid-portfolio-post-info-wrap:hover * { color: ' . $text_hover . '; }' . PHP_EOL;
$return .= '#' . $css_id . ' .mpcth-sc-grid-portfolio-list .mpcth-sc-grid-portfolio-post-info-wrap:hover *:before { color: ' . $text_hover . '; }' . PHP_EOL;
$return .= '</style>';
$return = parse_shortcode_content($return);
return $return;
}
示例5: block
//.........这里部分代码省略.........
*/
} else {
?>
<li class="post">
<div class="mediaholder">
<div class="mediaholder_innerwrap overlay cap-icon more">
<a href="<?php
the_permalink();
?>
">
<?php
the_post_thumbnail('portfolio-index');
?>
<div></div>
</a>
</div>
</div>
<div class="detailholder">
<h4 class="post-title"><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h4>
<div class="meta">
<span class="date"><?php
the_time(get_option('date_format'));
?>
</span>
<span class="sep">/</span>
<span class="comments"><a href="<?php
comments_link();
?>
"><?php
comments_number(__('0 Comments', 'marble'), __('1 Comment', 'marble'), __('% Comments', 'marble'));
?>
</a></span>
<?php
if (function_exists('zilla_likes')) {
?>
<span class="sep">/</span>
<span class="likes"><?php
zilla_likes();
?>
</span>
<?php
}
?>
</div>
<?php
the_excerpt();
?>
</div>
</li>
<?php
}
?>
<?php
}
}
wp_reset_query();
?>
</ul>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
</div>
<script type="text/javascript">
/*-----------------------------------------------------------------------------------*/
/* SHOWBIZ POSTS
/*-----------------------------------------------------------------------------------*/
jQuery(document).ready(function($) {
jQuery('#carousel_<?php
echo $unique;
?>
').showbizpro({
dragAndScroll:"off",
visibleElementsArray:[3,3,3,1],
mediaMaxHeight:[0,0,0,0],
carousel:"off",
heightOffsetBottom:0,
rewindFromEnd:"off",
autoPlay:"off",
delay:2000,
speed:250
});
});
</script>
<?php
}
示例6: baskerville_meta
function baskerville_meta()
{
?>
<div class="post-meta">
<a class="post-date" href="<?php
the_permalink();
?>
" title="<?php
the_title_attribute();
?>
"><?php
the_time('Y/m/d');
?>
</a>
<?php
if (function_exists('zilla_likes')) {
zilla_likes();
}
if (comments_open()) {
comments_popup_link('0', '1', '%', 'post-comments');
}
edit_post_link();
?>
<div class="clear"></div>
</div> <!-- /post-meta -->
<?php
}
示例7: widget
/** @see WP_Widget::widget */
function widget($args, $instance)
{
extract($args);
$title = apply_filters('widget_title', $instance['title']);
$number = apply_filters('widget_title', $instance['number']);
$offset = apply_filters('widget_title', $instance['offset']);
?>
<?php
echo $before_widget;
?>
<?php
if ($title) {
echo $before_title . $title . $after_title;
}
?>
<ul class="wpex-widget-recent-posts">
<?php
if (is_singular()) {
$exclude = get_the_ID();
} else {
$exclude = '';
}
global $post;
$tmp_post = $post;
$args = array('numberposts' => $number, 'offset' => $offset, 'post_type' => 'post', 'exclude' => $exclude, 'meta_key' => '_thumbnail_id');
$myposts = get_posts($args);
foreach ($myposts as $post) {
setup_postdata($post);
//get featured image
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url($thumb, 'full');
//get full URL to image
//crop image
$featured_image = aq_resize($img_url, 80, 80, true);
//resize & crop the image
?>
<?php
if ($featured_image) {
?>
<li class="clearfix">
<a href="<?php
the_permalink();
?>
" title="<?php
the_title();
?>
"><img src="<?php
echo $featured_image;
?>
" alt="<?php
the_title();
?>
" /></a>
<div class="recent-right">
<a href="<?php
the_permalink();
?>
" title="<?php
the_title();
?>
" class="title"><?php
the_title();
?>
</a>
<div class="date"><span class="icon-calendar"></span><?php
echo get_the_date();
?>
</div>
<div class="cat"><span class="icon-folder-open"></span><?php
$category = get_the_category();
echo $category[0]->cat_name;
?>
</div>
<?php
if (function_exists('zilla_likes')) {
?>
<div class="likes"><?php
zilla_likes();
?>
</div><?php
}
?>
</div>
</li>
<?php
}
?>
<?php
}
?>
<?php
$post = $tmp_post;
wp_reset_postdata();
?>
</ul>
<?php
echo $after_widget;
?>
<?php
//.........这里部分代码省略.........