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

PHP get_avatar函数代码示例

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

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



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

示例1: comment

 protected function comment($comment, $depth, $args)
 {
     // разметка каждого комментария, без закрывающего </li>!
     $classes = implode(' ', get_comment_class()) . ($comment->comment_author_email == get_the_author_meta('email') ? ' author-comment' : '');
     // берем стандартные классы комментария и если коммент пренадлежит автору поста добавляем класс author-comment
     echo '<li id="li-comment-' . get_comment_ID() . '" class="' . $classes . '">' . "\n";
     // родительский тэг комментария с классами выше и уникальным id
     echo '<div id="comment-' . get_comment_ID() . '">' . "\n";
     // элемент с таким id нужен для якорных ссылок на коммент
     echo get_avatar($comment, 64) . "\n";
     // покажем аватар с размером 64х64
     echo '<p class="meta">Автор: ' . get_comment_author() . "\n";
     // имя автора коммента
     //echo ' '.get_comment_author_email(); // email автора коммента
     echo ' ' . get_comment_author_url();
     // url автора коммента
     echo ' <br>Добавлено ' . get_comment_date('F j, Y') . ' в ' . get_comment_time() . "\n";
     // дата и время комментирования
     if ('0' == $comment->comment_approved) {
         echo '<em class="comment-awaiting-moderation">Ваш комментарий будет опубликован после проверки модератором.</em>' . "\n";
     }
     // если комментарий должен пройти проверку
     comment_text() . "\n";
     // текст коммента
     $reply_link_args = array('depth' => $depth, 'reply_text' => 'Ответить', 'login_text' => 'Вы должны быть залогинены');
     echo get_comment_reply_link(array_merge($args, $reply_link_args));
     // выводим ссылку ответить
     echo '</div>' . "\n";
     // закрываем див
 }
开发者ID:Ivan26ru,项目名称:gp-wp,代码行数:30,代码来源:functions.php


示例2: user_menu

 /**
  * 
  *  Woo User Menu
  */
 function user_menu()
 {
     $_Twoot_Woo = new Twoot_Woo();
     $url = $_Twoot_Woo->shop_urls();
     $user_data = get_userdata(get_current_user_id());
     $avatar = get_option('show_avatars') ? '<span class="avatar">' . get_avatar(get_current_user_id(), 20) . '</span>' : '';
     $tag = get_option('permalink_structure') == false ? '&' : '?';
     $html = '<nav id="woo-user-menu">';
     $html .= '<ul class="sf-menu clearfix">';
     if (is_user_logged_in()) {
         $html .= '<li class="my-account"><a href="' . $url['account_overview'] . '">' . $avatar . esc_attr__('Howdy, ', 'Twoot') . $user_data->display_name . '</a>';
         $html .= '<ul>';
         $html .= '<li class="account-change-pw"><a href="' . $url['account_change_pw'] . '">' . esc_attr__('Change Password', 'Twoot') . '</a></li>';
         $html .= '<li class="account-edit-adress"><a href="' . $url['account_edit_adress'] . '">' . esc_attr__('Edit Address', 'Twoot') . '</a></li>';
         $html .= '<li class="account-view-order"><a href="' . $url['account_view_order'] . '">' . esc_attr__('View Order', 'Twoot') . '</a></li>';
         $html .= '<li class="cart"><a href="' . $url['cart'] . '">' . esc_attr__('Shopping Cart', 'Twoot') . '</a></li>';
         $html .= '<li class="checkout"><a href="' . $url['checkout'] . '">' . esc_attr__('Checkout', 'Twoot') . '</a></li>';
         $html .= '</ul>';
         $html .= '</li>';
         $html .= '<li class="logout last"><a href="' . $url['logout'] . '">' . esc_attr__('Sign Out', 'Twoot') . '</a></li>';
     } else {
         if (get_option('users_can_register') && get_option('woocommerce_enable_myaccount_registration') == 'yes') {
             $html .= '<li class="register"><a href="' . $url['register'] . $tag . 'user_account=register">' . esc_attr__('Create Account', 'Twoot') . '</a></li>';
         }
         $html .= '<li class="login last"><a href="' . $url['account_overview'] . $tag . 'user_account=login">' . esc_attr__('Sign In', 'Twoot') . '</a></li>';
     }
     $html .= '</ul>';
     $html .= '</nav>';
     return $html;
 }
开发者ID:sniezekjp,项目名称:prod-fs,代码行数:34,代码来源:woo-generator.php


示例3: garland_comment

function garland_comment($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    extract($args, EXTR_SKIP);
    ?>
<li <?php 
    comment_class(empty($args['has_children']) ? '' : 'parent');
    ?>
id="comment-<?php 
    comment_ID();
    ?>
">
	<div id="div-comment-<?php 
    comment_ID();
    ?>
">
	<span class="comment-author vcard">
	<?php 
    if ($args['avatar_size'] != 0) {
        echo get_avatar($comment, $args['avatar_size']);
    }
    ?>
	<?php 
    printf(__('<cite class="fn">%s</cite> Says:', 'kubrick'), get_comment_author_link());
    ?>
	</span>
	<?php 
    if ($comment->comment_approved == '0') {
        ?>
	<em><?php 
        _e('Your comment is awaiting moderation.', 'kubrick');
        ?>
</em>
	<?php 
    }
    ?>
	<br />

	<small class="comment-meta commentmetadata"><a href="#comment-<?php 
    comment_ID();
    ?>
" title=""><?php 
    printf(__('%1$s at %2$s', 'kubrick'), get_comment_date(), get_comment_time());
    ?>
</a> <?php 
    edit_comment_link(__('edit', 'kubrick'), '&nbsp;&nbsp;', '');
    ?>
</small>

	<?php 
    comment_text();
    ?>
	<div class="reply">
		<?php 
    comment_reply_link(array_merge($args, array('add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
    ?>
	</div>
	</div>
<?php 
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:60,代码来源:comments.php


示例4: widget

 /**
  * Echo the widget content.
  *
  * @param array $args     Display arguments including `before_title`, `after_title`,
  *                        `before_widget`, and `after_widget`.
  * @param array $instance The settings for the particular instance of the widget.
  */
 function widget($args, $instance)
 {
     // Merge with defaults.
     $instance = wp_parse_args((array) $instance, $this->defaults);
     echo $args['before_widget'];
     if (!empty($instance['title'])) {
         echo $args['before_title'] . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $args['after_title'];
     }
     $text = '';
     if (!empty($instance['alignment'])) {
         $text .= '<span class="align' . esc_attr($instance['alignment']) . '">';
     }
     $text .= get_avatar($instance['user'], $instance['size']);
     if (!empty($instance['alignment'])) {
         $text .= '</span>';
     }
     if ('text' === $instance['author_info']) {
         $text .= $instance['bio_text'];
     } else {
         $text .= get_the_author_meta('description', $instance['user']);
     }
     $text .= $instance['page'] ? sprintf(' <a class="pagelink" href="%s">%s</a>', get_page_link($instance['page']), $instance['page_link_text']) : '';
     echo wpautop($text);
     // If posts link option checked, add posts link to output.
     $display_name = get_the_author_meta('display_name', $instance['user']);
     $user_name = !empty($display_name) && genesis_a11y('screen-reader-text') ? '<span class="screen-reader-text">' . $display_name . ': </span>' : '';
     if ($instance['posts_link']) {
         printf('<div class="posts_link posts-link"><a href="%s">%s%s</a></div>', get_author_posts_url($instance['user']), $user_name, __('View My Blog Posts', 'genesis'));
     }
     echo $args['after_widget'];
 }
开发者ID:netmagik,项目名称:netmagik,代码行数:38,代码来源:user-profile-widget.php


示例5: comment

 protected function comment($comment, $depth, $args)
 {
     // each comment markup, without </li>!
     $classes = implode(' ', get_comment_class()) . ($comment->comment_author_email == get_the_author_meta('email') ? ' author-comment' : '');
     // get typical wp comment classes and if comment belong post autor add "author-comment" class
     echo '<li id="li-comment-' . get_comment_ID() . '" class="' . $classes . '">' . "\n";
     // parent tag with classes and uniq id
     echo '<div id="comment-' . get_comment_ID() . '">' . "\n";
     // anchor element with this id need to anchor links on comments works
     echo get_avatar($comment, 64) . "\n";
     // show avatar with size 64x64 px
     echo '<p class="meta">Posted by: ' . get_comment_author() . "\n";
     // comment autor name
     echo ' ' . get_comment_author_email();
     // comment autor email
     echo ' ' . get_comment_author_url();
     // comment autor url
     echo ' On ' . get_comment_date('F j, Y') . ' at ' . get_comment_time() . '</p>' . "\n";
     // date and time of comment creating
     if ('0' == $comment->comment_approved) {
         echo '<em class="comment-awaiting-moderation">Your comment is awaiting moderation</em>' . "\n";
     }
     // if comment is not approved notify of it
     comment_text() . "\n";
     // display comment text
     $reply_link_args = array('depth' => $depth, 'reply_text' => 'Reply on it', 'login_text' => 'You must be logged to post comments');
     echo get_comment_reply_link(array_merge($args, $reply_link_args));
     // display reply link
     echo '</div>' . "\n";
     // anchor element end
 }
开发者ID:seredniy,项目名称:clean-wp-template,代码行数:31,代码来源:functions.php


示例6: grofiles_setting_callback

/**
 * HTML for Gravatar Hovercard setting
 */
function grofiles_setting_callback() {
	global $current_user;

	$checked = 'disabled' == get_option( 'gravatar_disable_hovercards' ) ? '' : 'checked="checked" ';
 
 	echo "<label id='gravatar-hovercard-options'><input {$checked}name='gravatar_disable_hovercards' id='gravatar_disable_hovercards' type='checkbox' value='enabled' class='code' /> " . __( "View people's profiles when you mouse over their Gravatars", 'jetpack' ) . "</label>";
?>
<style type="text/css">
#grav-profile-example img {
	float: left;
}
#grav-profile-example span {
	padding: 0 1em;
}
</style>
<script type="text/javascript">
// <![CDATA[
jQuery( function($) {
	var tr = $( '#gravatar_disable_hovercards' ).change( function() {
		if ( $( this ).is( ':checked' ) ) {
			$( '#grav-profile-example' ).slideDown( 'fast' );
		} else {
			$( '#grav-profile-example' ).slideUp( 'fast' );
		}
	} ).parents( 'tr' );
	var ftr = tr.parents( 'table' ).find( 'tr:first' );
	if ( ftr.size() && !ftr.find( '#gravatar_disable_hovercards' ).size() ) {
		ftr.after( tr );
	}
} );
// ]]>
</script>
	<p id="grav-profile-example" class="hide-if-no-js"<?php if ( !$checked ) echo ' style="display:none"'; ?>><?php echo get_avatar( $current_user->ID, 64 ); ?> <span><?php _e( 'Put your mouse over your Gravatar to check out your profile.', 'jetpack' ); ?> <br class="clear" /></span></p>
<?php
}
开发者ID:kevinreilly,项目名称:mendelements.com,代码行数:38,代码来源:gravatar-hovercards.php


示例7: revert_to_default_wp_avatar

function revert_to_default_wp_avatar($img, $params, $item_id)
{
    // we are concerned only with users
    if ($params['object'] != 'user') {
        return $img;
    }
    //check if user has uploaded an avatar
    //if not then revert back to wordpress core get_avatar method
    //remove the filter first, or else it will go in infinite loop
    remove_filter('bp_core_fetch_avatar', 'revert_to_default_wp_avatar', 80, 3);
    if (!userpro_user_has_avatar($item_id)) {
        $width = $params['width'];
        // Set image width
        if (false !== $width) {
            $img_width = $width;
        } elseif ('thumb' == $type) {
            $img_width = bp_core_avatar_thumb_width();
        } else {
            $img_width = bp_core_avatar_full_width();
        }
        $img = get_avatar($item_id, $img_width);
    }
    //add the filter back again
    add_filter('bp_core_fetch_avatar', 'revert_to_default_wp_avatar', 80, 3);
    return $img;
}
开发者ID:ingridlima,项目名称:userpro-custom,代码行数:26,代码来源:buddypress.php


示例8: widget

 /**
  * Widget Output.
  * @see WP_Widget::widget()
  */
 public function widget($args, $instance)
 {
     global $wpdb;
     extract($args, EXTR_SKIP);
     $number = (int) $instance['number'];
     if (1 > $number) {
         $number = 5;
     } elseif (20 < $number) {
         $number = 20;
     }
     echo $before_widget;
     if (!empty($instance['title'])) {
         echo $before_title . $instance['title'] . $after_title;
     }
     echo '<ul>';
     $subquery = aoc_roles_subquery();
     $query = "SELECT ID, user_login, display_name FROM ( {$subquery} ) AS usr " . "ORDER BY user_registered DESC " . "LIMIT 0,{$number};";
     $users = $wpdb->get_results($query);
     foreach ($users as $user) {
         echo '<li>';
         if ($instance['avatar']) {
             echo get_avatar($user->ID, $instance['avatar-size']);
         }
         echo '<a href="' . aoc_profile_link(urlencode($user->user_login)) . '">' . $user->display_name . '</a></li>';
     }
     echo '</ul>';
     echo $after_widget;
 }
开发者ID:JerryXie96,项目名称:PBSMUNC2013WebSite,代码行数:32,代码来源:newusers.php


示例9: widget

 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     $instance = wp_parse_args((array) $instance, array('title' => __('Blog Authors', 'academy'), 'number' => '6', 'order' => 'registered'));
     $orderdir = 'DESC';
     if ($instance['order'] == 'display_name') {
         $orderdir = 'ASC';
     }
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Blog Authors', 'academy') : $instance['title'], $instance, $this->id_base);
     $out = $before_widget;
     $out .= $before_title . $title . $after_title;
     $counter = 0;
     $users = get_users(array('number' => $instance['number'], 'orderby' => $instance['order'], 'order' => $orderdir));
     $out .= '<div class="users-listing">';
     foreach ($users as $user) {
         $name = trim($user->first_name . ' ' . $user->last_name);
         $counter++;
         $out .= '<div class="user-image ';
         if ($counter == 3) {
             $out .= 'last';
         }
         $out .= '"><div class="bordered-image">';
         $out .= '<a title="' . $name . '" href="' . get_author_posts_url($user->ID) . '">' . get_avatar($user->ID) . '</a>';
         $out .= '</div></div>';
         if ($counter == 3) {
             $out .= '<div class="clear"></div>';
             $counter = 0;
         }
     }
     $out .= '</div>';
     $out .= $after_widget;
     echo $out;
 }
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:33,代码来源:themex.authors.php


示例10: format_comment

function format_comment($comment, $args, $depth)
{
    echo '<div ';
    comment_class();
    echo ' id="li-comment-';
    comment_ID();
    echo '">
        <div class="row-fluid">
            <div class="span9">
                <p>';
    comment_text();
    echo '</p>
            </div>

            <div class="span3">';
    echo get_avatar($comment->comment_author_email, 60);
    echo '<h6>
        <a href="';
    comment_author_url();
    echo '">';
    comment_author();
    echo '</a>											
                </h6>
                <small>';
    printf(__('%1$s', DOMAIN), get_comment_date(), get_comment_time());
    echo '</small>
            </div>
        </div>
    </div>';
}
开发者ID:ravenvn,项目名称:sandau,代码行数:30,代码来源:functions.php


示例11: listItem

 function listItem($email)
 {
     global $DOPBSP;
     $html = array();
     $user = get_userdata($email->user_id);
     // Get data about the user who created the emails.
     array_push($html, '<li class="item" id="DOPBSP-email-ID-' . $email->id . '" onclick="DOPBSPEmail.display(' . $email->id . ')">');
     array_push($html, ' <div class="header">');
     /*
      * Display email ID.
      */
     array_push($html, '     <span class="id">ID: ' . $email->id . '</span>');
     /*
      * Display data about the user who created the email.
      */
     if ($email->user_id > 0) {
         array_push($html, '     <span class="header-item avatar">' . get_avatar($email->user_id, 17));
         array_push($html, '         <span class="info">' . $DOPBSP->text('EMAILS_CREATED_BY') . ': ' . $user->data->display_name . '</span>');
         array_push($html, '         <br class="DOPBSP-clear" />');
         array_push($html, '     </span>');
     }
     array_push($html, '     <br class="DOPBSP-clear" />');
     array_push($html, ' </div>');
     array_push($html, ' <div class="name">' . $email->name . '</div>');
     array_push($html, '</li>');
     return implode('', $html);
 }
开发者ID:ConceptHaus,项目名称:jolie,代码行数:27,代码来源:class-backend-emails.php


示例12: framework_comment_avatar

 function framework_comment_avatar($avatar = true, $gravatar_size = 50)
 {
     $author = get_comment_author();
     $url = get_comment_author_url();
     if (!empty($url) || 'http://' == !$url) {
         $uri = ' href="' . $url . '" ';
     } else {
         $uri = NULL;
     }
     if ($avatar) {
         // Get author's gavatar
         $gravatar_email = get_comment_author_email();
         $gravatar_size = apply_filters('framework_gravatar_size', (int) $gravatar_size);
         // Available filter: framework_gravatar_size
         $gravatar = get_avatar($gravatar_email, $gravatar_size);
         // get the $src data from $gavatar
         if (preg_match('/src=\'(.*?)\'/i', $gravatar, $matches)) {
             $src = $matches[1];
         }
         // Rebuild Gravatar link because get_avatar() produces invalid code :/ (P.S. adds "gravatar" class)
         $output = "<a class=\"avatar-link\"{$uri}><img class=\"avatar gravatar gravatar-{$gravatar_size}\" alt=\"{$author}'s Gravatar\" src=\"{$src}\" width=\"{$gravatar_size}\" height=\"{$gravatar_size}\" /></a>";
         return apply_filters('framework_comment_avatar', (string) $output);
         // Available filter: framework_comment_avatar
     }
 }
开发者ID:sandesh247,项目名称:sandesh247.com,代码行数:25,代码来源:pluggable.php


示例13: mytheme_comment

function mytheme_comment($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>
<li <?php 
    comment_class();
    ?>
 id="li-comment-<?php 
    comment_ID();
    ?>
">
	<div id="comment-<?php 
    comment_ID();
    ?>
">
		<div class="comment-author vcard">
			<?php 
    echo get_avatar($comment, $size = '40');
    ?>
			<?php 
    /* printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) */
    ?>
			<cite class="fn"><?php 
    comment_author_link();
    ?>
</cite>
			<span class="comment-meta commentmetadata"><a href="<?php 
    echo htmlspecialchars(get_comment_link($comment->comment_ID));
    ?>
"><?php 
    printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time());
    ?>
</a><?php 
    edit_comment_link(__('(Edit)'), '  ', '');
    ?>
</span>
			
		</div>
		<?php 
    if ($comment->comment_approved == '0') {
        ?>
		<em class="approved"><?php 
        _e('Your comment is awaiting moderation.');
        ?>
</em>
		<br />
		<?php 
    }
    ?>
		<?php 
    comment_text();
    ?>
		<div class="reply">
			<?php 
    comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
    ?>
		</div>
	</div>
<?php 
}
开发者ID:normalhh,项目名称:zwwtheme.old,代码行数:60,代码来源:functions.php


示例14: listItem

 function listItem($extra)
 {
     global $DOPBSP;
     $html = array();
     $user = get_userdata($extra->user_id);
     // Get data about the user who created the extras.
     array_push($html, '<li class="dopbsp-item" id="DOPBSP-extra-ID-' . $extra->id . '" onclick="DOPBSPBackEndExtra.display(' . $extra->id . ')">');
     array_push($html, ' <div class="dopbsp-header">');
     /*
      * Display extra ID.
      */
     array_push($html, '     <span class="dopbsp-id">ID: ' . $extra->id . '</span>');
     /*
      * Display data about the user who created the extra.
      */
     if ($extra->user_id > 0) {
         array_push($html, '     <span class="dopbsp-header-item dopbsp-avatar">' . get_avatar($extra->user_id, 17));
         array_push($html, '         <span class="dopbsp-info">' . $DOPBSP->text('EXTRAS_CREATED_BY') . ': ' . $user->data->display_name . '</span>');
         array_push($html, '         <br class="dopbsp-clear" />');
         array_push($html, '     </span>');
     }
     array_push($html, '     <br class="dopbsp-clear" />');
     array_push($html, ' </div>');
     array_push($html, ' <div class="dopbsp-name">' . ($extra->name == '' ? '&nbsp;' : $extra->name) . '</div>');
     array_push($html, '</li>');
     return implode('', $html);
 }
开发者ID:iq007,项目名称:MadScape,代码行数:27,代码来源:class-backend-extras.php


示例15: widget

    function widget($args, $instance)
    {
        $title = $instance['title'];
        $bio = $instance['bio'];
        $custom_email = $instance['custom_email'];
        $avatar_size = preg_replace("/[^0-9]/", "", $instance['avatar_size']);
        if (!$avatar_size) {
            $avatar_size = 48;
        }
        $avatar_align = $instance['avatar_align'];
        if (!$avatar_align) {
            $avatar_align = 'left';
        }
        $read_more_text = $instance['read_more_text'] ? $instance['read_more_text'] : 'Read more';
        $read_more_url = $instance['read_more_url'];
        echo ts_essentials_escape($args['before_widget']);
        if (!empty($title)) {
            echo ts_essentials_escape($args['before_title'] . apply_filters('widget_title', $title) . $args['after_title']);
        }
        echo '<div class="blog-author clearfix">';
        $avatar = $custom_email ? '<span class="align' . esc_attr($avatar_align) . '">' . get_avatar($custom_email, $avatar_size) . '</span>' : '';
        ?>
        <p><?php 
        echo wp_kses_post($avatar . $bio);
        ?>
</p>
		<?php 
        if ($read_more_url) {
            echo '<div class="mimic-smaller read-more uppercase"><a href="' . esc_url($read_more_url) . '">' . esc_html($read_more_text) . '</a></div>';
        }
        echo '</div>';
        echo ts_essentials_escape($args['after_widget']);
    }
开发者ID:dqishmirian,项目名称:jrrny,代码行数:33,代码来源:blog-author.php


示例16: p2_get_discussion_links

function p2_get_discussion_links()
{
    $comments = get_comments(array('post_id' => get_the_ID()));
    $unique_commentors = array();
    foreach ($comments as $comment) {
        if ('1' == $comment->comment_approved) {
            $unique_commentors[$comment->comment_author_email] = get_avatar($comment, 16) . ' ' . get_comment_author_link($comment->comment_ID);
        }
    }
    $unique_commentors = array_values($unique_commentors);
    $total_unique_commentors = count($unique_commentors);
    $content = '';
    if (1 == $total_unique_commentors) {
        $content = sprintf(__('%1$s is discussing.', 'p2'), $unique_commentors[0]);
    } else {
        if (2 == $total_unique_commentors) {
            $content = sprintf(__('%1$s and %2$s are discussing.', 'p2'), $unique_commentors[0], $unique_commentors[1]);
        } else {
            if (3 == $total_unique_commentors) {
                $content = sprintf(__('%1$s, %2$s, and %3$s are discussing.', 'p2'), $unique_commentors[0], $unique_commentors[1], $unique_commentors[2]);
            } else {
                if (3 < $total_unique_commentors) {
                    $others = $total_unique_commentors - 3;
                    $content .= sprintf(_n('%1$s, %2$s, %3$s, and %4$d other are discussing.', '%1$s, %2$s, %3$s, and %4$d others are discussing.', $others, 'p2'), $unique_commentors[0], $unique_commentors[1], $unique_commentors[2], $others);
                }
            }
        }
    }
    return $content;
}
开发者ID:cabelotaina,项目名称:redelivre,代码行数:30,代码来源:template-tags.php


示例17: user_info

    /**
     * Show user info on dashboard
     */
    function user_info()
    {
        global $userdata;
        if (wpuf_get_option('show_user_bio', 'wpuf_dashboard', 'on') == 'on') {
            ?>
            <div class="wpuf-author">
                <h3><?php 
            _e('Author Info', 'wpuf');
            ?>
</h3>
                <div class="wpuf-author-inside odd">
                    <div class="wpuf-user-image"><?php 
            echo get_avatar($userdata->user_email, 80);
            ?>
</div>
                    <div class="wpuf-author-body">
                        <p class="wpuf-user-name"><a href="<?php 
            echo get_author_posts_url($userdata->ID);
            ?>
"><?php 
            printf(esc_attr__('%s', 'wpuf'), $userdata->display_name);
            ?>
</a></p>
                        <p class="wpuf-author-info"><?php 
            echo $userdata->description;
            ?>
</p>
                    </div>
                </div>
            </div><!-- .author -->
            <?php 
        }
    }
开发者ID:kajidipes,项目名称:saedi-works,代码行数:36,代码来源:frontend-dashboard.php


示例18: widget

    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        ?>
    <div class="zan-author text-center hidden-xs">
        <div class="author-top"></div>
        <div class="author-bottom">
          <?php 
        echo get_avatar(get_the_author_meta('email'), '120');
        ?>
          <div class="author-content">
            <span class="author-name"><?php 
        echo get_the_author_meta('display_name');
        ?>
</span>
            <span class="author-social">
              <div class="btn-group btn-group-justified">
                <a class="btn btn-zan-solid-wi" target="_blank" href="<?php 
        echo get_the_author_meta('sina_weibo');
        ?>
"><i class="fa fa-weibo"></i> 新浪微博</a>
                <a class="btn btn-zan-solid-wi" target="_blank" href="<?php 
        echo get_the_author_meta('tencent_weibo');
        ?>
"><i class="fa fa-tencent-weibo"></i> 腾讯微博</a>
              </div>
            </span>
          </div>
        </div>
    </div>

    <?php 
        echo $after_widget;
    }
开发者ID:zhengxiexie,项目名称:wordpress,代码行数:35,代码来源:zan-widget-author.php


示例19: readers_wall

function readers_wall($outer = '1', $timer = '3', $limit = '100')
{
    global $wpdb;
    $counts = $wpdb->get_results("SELECT count(comment_author) AS cnt, comment_author, comment_author_url, comment_author_email FROM {$wpdb->comments} WHERE comment_date > date_sub( now(), interval {$timer} month ) AND user_id!='1' AND comment_author!={$outer} AND comment_approved='1' AND comment_type='' GROUP BY comment_author ORDER BY cnt DESC LIMIT {$limit}");
    $i = 0;
    foreach ($counts as $count) {
        $i++;
        $c_url = $count->comment_author_url;
        if (!$c_url) {
            $c_url = 'javascript:;';
        }
        $tt = $i;
        if ($i == 1) {
            $tt = '金牌读者';
        } else {
            if ($i == 2) {
                $tt = '银牌读者';
            } else {
                if ($i == 3) {
                    $tt = '铜牌读者';
                } else {
                    $tt = '第' . $i . '名';
                }
            }
        }
        if ($i < 4) {
            $type .= '<a class="item-top item-' . $i . '" target="_blank" href="' . $c_url . '"><h4>【' . $tt . '】<small>评论:' . $count->cnt . '</small></h4>' . str_replace(' src=', ' data-src=', get_avatar($count->comment_author_email, $size = '36', AVATAR_DEFAULT)) . '<strong>' . $count->comment_author . '</strong>' . $c_url . '</a>';
        } else {
            $type .= '<a target="_blank" href="' . $c_url . '" title="【' . $tt . '】评论:' . $count->cnt . '">' . str_replace(' src=', ' data-src=', get_avatar($count->comment_author_email, $size = '36', AVATAR_DEFAULT)) . $count->comment_author . '</a>';
        }
    }
    echo $type;
}
开发者ID:yszar,项目名称:linuxwp,代码行数:33,代码来源:readers.php


示例20: mytheme_comment

function mytheme_comment($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>
<li <?php 
    comment_class();
    ?>
 id="li-comment-<?php 
    comment_ID();
    ?>
">
	<div id="comment-<?php 
    comment_ID();
    ?>
" class="comment-inner">
  	<figure class="vcard">
    	<?php 
    echo get_avatar($comment, 70);
    ?>
    </figure>
    <div class="comment-container">
	    <div class="commentmeta">
	        <strong><?php 
    comment_author_link();
    ?>
</strong>
	        <span class="authorname">
	            <?php 
    comment_date('M d, Y');
    ?>
 - <?php 
    comment_time('h:i A');
    ?>
 <?php 
    edit_comment_link("Edit", '');
    ?>
	        </span>
	    </div>
	    <div class="comment-text">
	        <?php 
    if ($comment->comment_approved == '0') {
        ?>
	            <em class="awaiting_moderation"><?php 
        _e('Your comment is awaiting moderation.', THB_THEME_NAME);
        ?>
</em>
	        <?php 
    }
    ?>
	        <?php 
    comment_text();
    ?>
	        <?php 
    comment_reply_link(array_merge($args, array('reply_text' => __('Reply', THB_THEME_NAME), 'depth' => $depth, 'max_depth' => $args['max_depth'])));
    ?>
	    </div>
    </div> 
	</div>
<?php 
}
开发者ID:ConceptHaus,项目名称:beckery,代码行数:60,代码来源:comments.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_avatar_data函数代码示例发布时间:2022-05-15
下一篇:
PHP get_available_views函数代码示例发布时间: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