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

PHP et_get_avatar函数代码示例

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

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



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

示例1: get_author_posts_url

    echo $tag->name;
    ?>
                        </a>
                    </li>
                    <?php 
}
?>
                </ul>
                <div class="clearfix"></div>                
                <a href="<?php 
echo get_author_posts_url($question->post_author);
?>
">
                    <span class="author-avatar">
                        <?php 
echo et_get_avatar($question->post_author, 30);
?>
                    </span>
                    <span class="author-name"><?php 
echo $question->author_name;
?>
</span>
                </a>                    
                    <?php 
qa_user_badge($question->post_author);
?>
                    <span class="question-time">
                        <?php 
printf(__('Asked %s in', ET_DOMAIN), $et_post_date);
?>
                    </span>
开发者ID:callmeaatrey,项目名称:zap-query,代码行数:31,代码来源:pending-question-loop.php


示例2: get_author_posts_url

            </div>
        </section>
        <!-- TAGS BAR / END -->

        <!-- MIDDLE BAR -->
        <section class="blog-wrapper">
            <div class="container">
                <div class="row">
                    <div class="blog-list single-blog">
                        <!-- <div class="col-xs-2">
                        <a href="<?php 
echo get_author_posts_url($post->post_author);
?>
" class="profile-avatar">
                            <?php 
echo et_get_avatar($post->post_author, 65, array('class' => 'avatar img-responsive', 'alt' => ''));
?>
                        </a>
                    </div> -->
                        <div class="col-xs-12" id="page_content">
                            <div class="blog-content">
                                <div class="container-fluid main-center">
                                    <div class="row">
                                        <div class="col-md-12 marginTop30">
                                            <div class="twitter-auth social-auth social-auth-step1">
                                                <p class="social-small"><?php 
the_content();
?>
</p>
                                                <form id="form_forgot_password_mobile" method="post" action="">
                                                    <div class="social-form">
开发者ID:rinodung,项目名称:wp-question,代码行数:31,代码来源:page-forgot.php


示例3: convert

 public static function convert($comment)
 {
     global $current_user;
     $result = (object) $comment;
     $childs = get_children(array('post_parent' => $result->comment_ID));
     $author = get_user_by('id', $comment->user_id);
     $result->id = $result->comment_ID;
     $result->et_votes = get_comment_meta($result->comment_ID, 'et_votes');
     $result->et_votes_count = !empty($result->et_votes) ? count($result->et_votes) : 0;
     $result->content_filter = apply_filters('the_content', $result->comment_content);
     $result->content_edit = et_the_content_edit($comment->comment_content);
     $result->avatar = et_get_avatar($result->user_id ? $result->user_id : $result->comment_author_email, 30);
     $result->human_date = et_the_time(strtotime($result->comment_date));
     $result->total_childs = sprintf(__('Comment(%d) ', ET_DOMAIN), count($childs));
     $result->new_nonce = wp_create_nonce('insert_comment');
     $result->author = $author->display_name;
     $result->author_url = get_author_posts_url($author->ID);
     return $result;
 }
开发者ID:callmeaatrey,项目名称:zap-query,代码行数:19,代码来源:questions.php


示例4: et_get_mobile_header

 **/
et_get_mobile_header();
global $wp_query, $wp_rewrite, $current_user;
$user = get_user_by('id', get_query_var('author'));
$user = QA_Member::convert($user);
?>
<!-- CONTAINER -->
<div class="wrapper-mobile">
	<!-- TOP BAR -->
	<section class="profile-user-wrapper">
    	<div class="container">
            <div class="row">
                <div class="col-md-3 col-xs-3 padding-right-0">
                    <a href="javascript:void(0);" class="profile-avatar">
                        <?php 
echo et_get_avatar($user->ID, 65);
?>
                    </a>
                </div>
                <div class="col-md-9 col-xs-9">
                    <div class="profile-wrapper">
                    	<span class="user-name-profile"><?php 
echo esc_attr($user->display_name);
?>
</span>
                    	<span class="address-profile">
                            <?php 
if ($user->user_location) {
    echo '<i class="fa fa-map-marker"></i>' . esc_attr($user->user_location);
} else {
    echo '<i class="fa fa-globe"></i>' . __("Earth", ET_DOMAIN);
开发者ID:rinodung,项目名称:wp-question,代码行数:31,代码来源:author.php


示例5: get_permalink

    <div class="col-md-8 q-left-content">
        <div class="q-ltop-content title-answer-style">
            <a href="<?php 
echo get_permalink($question->ID);
?>
" class="question-title">
                <?php 
the_title();
?>
            </a>
        </div>
        <div class="q-lbtm-content">
            <div class="question-cat">
                <span class="author-avatar">
                <?php 
echo et_get_avatar($answer->post_author, 30);
?>
                </span>
                <?php 
qa_user_badge($answer->post_author);
?>
                <span class="question-time">
                    <?php 
printf(__('Asked %s in', ET_DOMAIN), $et_post_date);
?>
                </span>
                <span class="question-category">
                    <a href="<?php 
echo $category_link;
?>
"><?php 
开发者ID:rinodung,项目名称:wp-question,代码行数:31,代码来源:pending-answer-loop.php


示例6: is_user_logged_in

                                <div id="search_preview" class="search-preview empty"></div>
                            </form>
                        </div><!-- search -->
					</div>
					<div class="col-md-2 col-xs-2 btn-group <?php 
echo is_user_logged_in() ? 'header-avatar ' : '';
?>
">
						<?php 
if (is_user_logged_in()) {
    global $current_user;
    ?>
                    	<span class="expand dropdown-toggle" type="span" data-toggle="dropdown">
							<a href="javascript:void(0)" class="dropdown-account " >
                                <span class="avatar"><?php 
    echo et_get_avatar($current_user->ID, 30);
    ?>
</span>
                                <span class="display_name"><?php 
    echo $current_user->display_name;
    ?>
</span>
                                <span class="icon-down"><i class="fa fa-chevron-circle-down"></i></span>
                        	</a>
						</span>
						<ul class="dropdown-menu dropdown-profile">
							<li>
								<a href="<?php 
    echo get_author_posts_url($current_user->ID);
    ?>
">
开发者ID:herosrx,项目名称:qaengine,代码行数:31,代码来源:header.php


示例7: get_term_link

$category_link = !empty($question->question_category[0]) ? get_term_link($question->question_category[0]->term_id, 'question_category') : '#';
?>
<li <?php 
post_class('question-item');
?>
 data-id="<?php 
echo $post->ID;
?>
">
    <div class="avatar-user">
        <a href="<?php 
the_permalink();
?>
">
            <?php 
echo et_get_avatar($post->post_author, 55);
?>
        </a>
    </div>
    <div class="info-user">
        <?php 
qa_user_badge($post->post_author, true, true);
?>
        <ul class="info-review-question">
            <li>
                <?php 
echo $question->et_view_count;
?>
<i class="fa fa-eye"></i>
            </li>
            <?php 
开发者ID:rinodung,项目名称:wp-question,代码行数:31,代码来源:answer-loop.php


示例8: _e

                            <?php 
    _e("Logout", ET_DOMAIN);
    ?>
                        </a>
                    </li>
                </ul>
            </div>
            <?php 
}
?>
        </div><!-- END SELECT-CATEGORY -->
        <div class="row user-statistic highlight">
            <div class="col-md-5 col-xs-12 user-info">
                <span class="avatar-80">
                    <?php 
echo et_get_avatar($user->ID, 80);
?>
                </span>
                <?php 
if ($current_user->ID != $user->ID) {
    ?>
                <p class="contact-block">
                    <button class="inbox" id="inbox"><?php 
    _e('Contact', ET_DOMAIN);
    ?>
</button>
                    <!-- <button class="follow" id="follow"><?php 
    _e('Follow', ET_DOMAIN);
    ?>
</button> -->
                </p>
开发者ID:herosrx,项目名称:qaengine,代码行数:31,代码来源:author.php


示例9: et_make_member_data

/**
 *
 */
function et_make_member_data($user)
{
    global $wpdb;
    $info = (array) $user->data + array('id' => $user->ID, 'question_count' => get_user_meta($user->ID, 'et_question_count', true) ? get_user_meta($user->ID, 'et_question_count', true) : 0, 'answer_count' => get_user_meta($user->ID, 'et_answer_count', true) ? get_user_meta($user->ID, 'et_answer_count', true) : 0, 'user_location' => get_user_meta($user->ID, 'user_location', true) ? get_user_meta($user->ID, 'user_location', true) : 'NA', 'date_text' => sprintf(__('Join on %s', ET_DOMAIN), date('jS M, Y', strtotime($user->user_registered))), 'role' => $user->roles[0], 'avatar' => et_get_avatar($user->ID), 'register_status' => get_user_meta($user->ID, 'register_status', true) == "unconfirm" ? "unconfirm" : '');
    $member_object = QA_Member::get_instance();
    $ban = get_user_meta($user->ID, $member_object->meta_ban_expired, true);
    if (!empty($ban)) {
        $info['banned'] = true;
        $info['ban_expired'] = date(get_option('date_format'), strtotime($ban));
    } else {
        $info = $info + array('banned' => false, 'ban_expired' => '');
    }
    return $info;
}
开发者ID:herosrx,项目名称:qaengine,代码行数:17,代码来源:members.php


示例10: qa_comment_post_template

/**
*
* TEMPLATE COMMENT FOR SINGLE POST
* @param array $comments , $args , int $depth
* @author ThaiNT
* @since 1.0
*
**/
function qa_comment_post_template($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>
	<li class="et-comment" id="comment-<?php 
    echo $comment->comment_ID;
    ?>
">
		<div class="et-comment-left">
			<div class="et-comment-thumbnail">
				<?php 
    echo et_get_avatar($comment->user_id);
    ?>
			</div>
		</div>
		<div class="et-comment-right">
			<div class="et-comment-header">
				<a href="<?php 
    comment_author_url();
    ?>
"><strong class="et-comment-author"><?php 
    comment_author();
    ?>
</strong></a>
				<span class="et-comment-time icon" data-icon="t"><?php 
    comment_date();
    ?>
</span>
			</div>
			<div class="et-comment-content">
				<?php 
    echo esc_attr(get_comment_text($comment->comment_ID));
    ?>
				<p class="et-comment-reply"><?php 
    comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
    ?>
</p>
			</div>
		</div>
		<div class="clearfix"></div>
<?php 
}
开发者ID:rinodung,项目名称:wp-question,代码行数:50,代码来源:template.php


示例11: widget

    function widget($args, $instance)
    {
        global $wpdb;
        if (!isset($instance['normal_question'])) {
            if (get_transient('hot_questions_query') === false) {
                $hour = 12;
                $today = strtotime("{$hour}:00:00");
                $last7days = strtotime('-7 day', $today);
                $last30days = strtotime('-30 day', $today);
                if ($instance['date'] == "last7days") {
                    $custom = "AND post_date >= '" . date("Y-m-d H:i:s", $last7days) . "' AND post_date <= '" . date("Y-m-d H:i:s", $today) . "' ";
                } elseif ($instance['date'] == "last30days") {
                    $custom = "AND post_date >= '" . date("Y-m-d H:i:s", $last30days) . "' AND post_date <= '" . date("Y-m-d H:i:s", $today) . "' ";
                } else {
                    $custom = "";
                }
                $query = "SELECT * FROM {$wpdb->posts} as post\r\n\t\t\t\t\t\tINNER JOIN {$wpdb->postmeta} as meta\r\n\t\t\t\t\t\tON post.ID = meta.post_id\r\n\t\t\t\t\t\tAND meta.meta_key  = 'et_answers_count'\r\n\t\t\t\t\t\tWHERE post_status = 'publish'\r\n\t\t\t\t\t\tAND post_type = 'question'\r\n\t\t\t\t\t";
                $query .= $custom;
                $query .= "\tORDER BY CAST(meta.meta_value AS SIGNED) DESC,post_date DESC\r\n\t\t\t\t\tLIMIT " . $instance['number'] . "\r\n\t\t\t\t\t";
                $questions = $wpdb->get_results($query);
                set_transient('hot_questions_query', $questions, apply_filters('qa_time_expired_transient', 24 * 60 * 60));
            } else {
                $questions = get_transient('hot_questions_query');
            }
        } else {
            if (get_transient('latest_questions_query') === false) {
                $query = "SELECT * FROM {$wpdb->posts} as post\r\n\t\t\t\t\t\tWHERE post_status = 'publish'\r\n\t\t\t\t\t\tAND post_type = 'question'\r\n\t\t\t\t\t\tORDER BY post_date DESC\r\n\t\t\t\t\t\tLIMIT " . $instance['number'] . "\r\n\t\t\t\t\t\t";
                $questions = $wpdb->get_results($query);
                set_transient('latest_questions_query', $questions, apply_filters('qa_time_expired_transient', 24 * 60 * 60));
            } else {
                $questions = get_transient('latest_questions_query');
            }
        }
        // delete_transient( 'latest_questions_query' );
        // delete_transient( 'hot_questions_query' );
        ?>
    <div class="widget widget-hot-questions">
        <h3><?php 
        echo esc_attr($instance['title']);
        ?>
</h3>
        <ul>
			<?php 
        foreach ($questions as $question) {
            ?>
            <li>
                <a href="<?php 
            echo get_permalink($question->ID);
            ?>
">
                    <span class="topic-avatar">
                    	<?php 
            echo et_get_avatar($question->post_author, 30);
            ?>
                    </span>
                    <span class="topic-title"><?php 
            echo $question->post_title;
            ?>
</span>
                </a>
            </li>
            <?php 
        }
        ?>
        </ul>
    </div><!-- END widget-related-tags -->
	<?php 
    }
开发者ID:rinodung,项目名称:wp-question,代码行数:68,代码来源:widget.php


示例12: et_make_member_data

/**
 * 
 */
function et_make_member_data($user)
{
    global $wpdb;
    $info = (array) $user->data + array('id' => $user->ID, 'question_count' => get_user_meta($user->ID, 'et_question_count', true) ? get_user_meta($user->ID, 'et_question_count', true) : 0, 'answer_count' => get_user_meta($user->ID, 'et_answer_count', true) ? get_user_meta($user->ID, 'et_answer_count', true) : 0, 'user_location' => get_user_meta($user->ID, 'user_location', true) ? get_user_meta($user->ID, 'user_location', true) : 'NA', 'date_text' => sprintf(__('Join on %s', ET_DOMAIN), date('jS M, Y', strtotime($user->user_registered))), 'role' => $user->roles[0], 'avatar' => et_get_avatar($user->ID), 'register_status' => get_user_meta($user->ID, 'register_status', true) == "unconfirm" ? "unconfirm" : '');
    return $info;
}
开发者ID:callmeaatrey,项目名称:zap-query,代码行数:9,代码来源:members.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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