本文整理汇总了PHP中bp_activity_avatar函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_activity_avatar函数的具体用法?PHP bp_activity_avatar怎么用?PHP bp_activity_avatar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_activity_avatar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: x_buddypress_activity_list_item_header
function x_buddypress_activity_list_item_header()
{
?>
<div class="x-list-item-header">
<div class="x-list-item-avatar-wrap activity-avatar">
<a href="<?php
bp_activity_user_link();
?>
">
<?php
bp_activity_avatar();
?>
</a>
</div>
<div class="x-list-item-header-info">
<?php
bp_activity_action();
?>
</div>
</div>
<?php
}
示例2: do_action
<?php
do_action('bp_before_activity_comment');
?>
<li id="acomment-<?php
bp_activity_comment_id();
?>
">
<div class="acomment-avatar">
<a href="<?php
bp_activity_comment_user_link();
?>
">
<?php
bp_activity_avatar('type=thumb&user_id=' . bp_get_activity_comment_user_id());
?>
</a>
</div>
<div class="acomment-meta">
<?php
/* translators: 1: user profile link, 2: user name, 3: activity permalink, 3: activity timestamp */
printf(__('<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress'), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded());
?>
</div>
<div class="acomment-content"><?php
bp_activity_comment_content();
?>
</div>
示例3: bp_activity_css_class
?>
<li class="<?php
bp_activity_css_class();
?>
" id="activity-<?php
bp_activity_id();
?>
">
<div class="activity-avatar">
<a href="<?php
bp_activity_user_link();
?>
">
<?php
bp_activity_avatar('type=full&width=100&height=100');
?>
</a>
</div>
<div class="activity-content">
<div class="activity-header">
<?php
bp_activity_action();
?>
</div>
<?php
if (bp_get_activity_content_body()) {
?>
示例4: esc_url
<div class="bboss_ajax_search_item bboss_ajax_search_item_activity">
<a href='<?php
echo esc_url(add_query_arg(array('no_frame' => '1'), bp_activity_thread_permalink()));
?>
'>
<div class="item-avatar">
<?php
bp_activity_avatar(array('type' => 'thumb', 'height' => 50, 'width' => 50));
?>
</div>
<div class="item">
<div class="item-title">
<?php
echo wp_strip_all_tags(bp_get_activity_action());
?>
</div>
<?php
if (bp_activity_has_content()) {
?>
<div class="item-desc">
<?php
echo buddyboss_global_search_activity_intro(30);
?>
</div>
<?php
}
?>
</div>
</a>
示例5: bp_activity_id
?>
<li id="bp-activity-<?php
bp_activity_id();
?>
" class="<?php
bp_activity_css_class();
?>
">
<div class="activity-header">
<div class="activity-avatar">
<a href="<?php
bp_activity_user_link();
?>
">
<?php
bp_activity_avatar('type=thumb');
?>
</a>
</div>
<?php
bp_activity_action();
?>
</div>
<div class="activity-body">
<div class="activity-content">
<?php
if (bp_activity_has_content()) {
?>
<?php
bp_activity_content_body();
示例6: bp_activity_user_link
<li class="bboss_search_item bboss_search_item_activity">
<div class="activity-avatar">
<a href="<?php
bp_activity_user_link();
?>
">
<?php
bp_activity_avatar('type=full&width=70&height=70');
?>
</a>
</div>
<div class="activity-content">
<div class="activity-header">
<?php
bp_activity_action();
?>
</div>
<?php
if (bp_activity_has_content()) {
?>
<div class="activity-inner">
示例7: bp_dtheme_new_activity_comment
function bp_dtheme_new_activity_comment() {
global $bp;
/* Check the nonce */
check_admin_referer( 'new_activity_comment', '_wpnonce_new_activity_comment' );
if ( !is_user_logged_in() ) {
echo '-1';
return false;
}
if ( empty( $_POST['content'] ) ) {
echo '-1<div id="message" class="error"><p>' . __( 'Please do not leave the comment area blank.', 'buddypress' ) . '</p></div>';
return false;
}
if ( empty( $_POST['form_id'] ) || empty( $_POST['comment_id'] ) || !is_numeric( $_POST['form_id'] ) || !is_numeric( $_POST['comment_id'] ) ) {
echo '-1<div id="message" class="error"><p>' . __( 'There was an error posting that reply, please try again.', 'buddypress' ) . '</p></div>';
return false;
}
$comment_id = bp_activity_new_comment( array(
'content' => $_POST['content'],
'activity_id' => $_POST['form_id'],
'parent_id' => $_POST['comment_id']
));
if ( !$comment_id ) {
echo '-1<div id="message" class="error"><p>' . __( 'There was an error posting that reply, please try again.', 'buddypress' ) . '</p></div>';
return false;
}
if ( bp_has_activities ( 'include=' . $comment_id ) ) : ?>
<?php while ( bp_activities() ) : bp_the_activity(); ?>
<li id="acomment-<?php bp_activity_id() ?>">
<div class="acomment-avatar">
<?php bp_activity_avatar() ?>
</div>
<div class="acomment-meta">
<?php echo bp_core_get_userlink( bp_get_activity_user_id() ) ?> · <?php printf( __( '%s ago', 'buddypress' ), bp_core_time_since( bp_core_current_time() ) ) ?> ·
<a class="acomment-reply" href="#acomment-<?php bp_activity_id() ?>" id="acomment-reply-<?php echo esc_attr( $_POST['form_id'] ) ?>"><?php _e( 'Reply', 'buddypress' ) ?></a>
· <a href="<?php echo wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . bp_get_activity_id() . '?cid=' . $comment_id, 'bp_activity_delete_link' ) ?>" class="delete acomment-delete confirm"><?php _e( 'Delete', 'buddypress' ) ?></a>
</div>
<div class="acomment-content">
<?php bp_activity_content_body() ?>
</div>
</li>
<?php endwhile; ?>
<?php endif;
}
示例8: widget
function widget($args, $instance)
{
global $bp;
extract($args);
$link_title = !empty($instance['link_title']);
echo $before_widget;
echo $before_title;
if ($link_title) {
$dir_link = trailingslashit(bp_get_root_domain()) . trailingslashit(bp_get_blogs_root_slug());
$title = '<a href="' . $dir_link . '">' . $instance['title'] . '</a>';
} else {
$title = $instance['title'];
}
echo $title;
echo $after_title;
if (empty($instance['max_posts']) || !$instance['max_posts']) {
$instance['max_posts'] = 10;
}
// Load more items that we need, because many will be filtered out by privacy
$real_max = $instance['max_posts'] * 10;
$counter = 0;
$query_string = empty($instance['include_groupblog']) ? 'action=new_blog_post' : 'action=new_blog_post,new_groupblog_post';
$query_string .= '&max=' . $real_max . '&per_page=' . $real_max;
if (bp_has_activities($query_string)) {
?>
<ul id="blog-post-list" class="activity-list item-list">
<?php
while (bp_activities()) {
bp_the_activity();
?>
<?php
if ($counter >= $instance['max_posts']) {
break;
}
?>
<li>
<div class="activity-content" style="margin: 0">
<div class="activity-avatar">
<?php
bp_activity_avatar();
?>
</div>
<div class="activity-header">
<?php
bp_activity_action();
?>
</div>
<?php
if (bp_get_activity_content_body()) {
?>
<?php
bp_activity_content_body();
?>
<?php
}
?>
</div>
</li>
<?php
$counter++;
?>
<?php
}
?>
</ul>
<p class="cac-more-link"><a href="<?php
bp_blogs_directory_permalink();
?>
">More Blogs</a></p>
<?php
} else {
?>
<div id="message" class="info">
<p><?php
_e('Sorry, there were no blog posts found. Why not write one?', 'buddypress');
?>
</p>
</div>
<?php
}
?>
<?php
echo $after_widget;
?>
<?php
//.........这里部分代码省略.........
示例9: bp_activity_css_class
<li class="<?php
bp_activity_css_class();
?>
" id="activity-<?php
bp_activity_id();
?>
">
<div class="activity-avatar">
<a href="<?php
bp_activity_user_link();
?>
">
<?php
bp_activity_avatar('width=35&height=35');
?>
</a>
</div>
<div class="activity-content">
<div class="activity-header">
<?php
bp_activity_action();
?>
</div>
示例10: do_action
* @package myfossil
* @subpackage theme
*/
do_action('bp_before_activity_comment');
?>
<div id="acomment-<?php
bp_activity_comment_id();
?>
" class="acomment activity-entry">
<div class="activity-heading">
<div class="acomment-meta">
<?php
bp_activity_avatar('class=avatar&type=thumb&user_id=' . bp_get_activity_comment_user_id() . '&width=30&height=30');
?>
<?php
/* translators: 1: user profile link, 2: user name, 3: activity permalink, 4: activity timestamp */
printf(__('<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress'), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_comment_permalink(), bp_get_activity_comment_date_recorded());
?>
</div>
</div>
<div class="activity-body">
<div class="acomment-content">
<?php
bp_activity_comment_content();
?>
</div>
示例11: bp_activity_css_class
<li class="<?php
if (bpgr_is_group_reviews()) {
bp_activity_css_class();
}
?>
" id="activity-<?php
bp_activity_id();
?>
">
<div class="activity-avatar">
<a href="<?php
bp_activity_user_link();
?>
">
<?php
bp_activity_avatar('type=thumb&width=30&height=30');
?>
</a>
</div>
<div class="activity-content">
<div class="activity-header">
<?php
echo bpgr_get_review_rating_html(bp_activity_get_meta(bp_get_activity_id(), 'bpgr_rating'));
?>
<?php
printf(__('By %s', 'bpgr'), bp_core_get_userlink(bp_get_activity_user_id()));
?>
(<?php
printf(__('%s ago', 'bpgr'), bp_core_time_since(bp_get_activity_date_recorded()));
示例12: get_current_user_id
<?php
if (!defined('WPINC')) {
die;
}
$user_id = get_current_user_id();
$user_avatar = bp_activity_avatar(array('user_id' => $user_id));
?>
<!-- START row -->
<div
class="row">
<!-- Left / Top Side -->
<div class="col-lg-3">
<!-- tab menu -->
<ul class="list-group list-group-tabs">
<li class="list-group-item active"><a href="#profile"
data-toggle="tab"><i class="ico-user2 mr5"></i> Profile</a></li>
<li class="list-group-item"><a href="#account" data-toggle="tab"><i
class="ico-archive2 mr5"></i> Account</a></li>
</ul>
<!-- tab menu -->
<hr>
<!-- horizontal line -->
<!-- figure with progress -->
<ul class="list-table">
<li style="width: 70px;"><img class="img-circle img-bordered"
src="<?php
echo $user_avatar;
?>
示例13: bp_activity_comment_id
?>
<li id="acomment-<?php
bp_activity_comment_id();
?>
" class="well well-sm">
<div class="acomment-content text-left"><?php
bp_activity_comment_content();
?>
</div>
<div class="acomment-meta text-right">
<?php
/* translators: 1: user profile link, 2: user name, 3: activity permalink, 4: activity timestamp */
printf(__('<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'firmasite'), bp_get_activity_comment_user_link(), bp_activity_avatar('type=thumb&width=20&user_id=' . bp_get_activity_comment_user_id()) . bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded());
?>
</div>
<div class="acomment-options text-right">
<?php
if (is_user_logged_in() && bp_activity_can_comment_reply(bp_activity_current_comment())) {
?>
<a href="#acomment-<?php
bp_activity_comment_id();
?>
" class="acomment-reply bp-primary-action text-success btn-xs" id="acomment-reply-<?php
bp_activity_id();
?>
示例14: do_action
<?php
do_action('bp_before_activity_comment');
?>
<li id="acomment-<?php
bp_activity_comment_id();
?>
">
<div class="acomment-avatar">
<a href="<?php
bp_activity_comment_user_link();
?>
">
<?php
bp_activity_avatar(array('type' => 'thumb', 'user_id' => bp_get_activity_comment_user_id()));
?>
</a>
</div>
<div class="acomment-meta">
<?php
/* translators: 1: user profile link, 2: user name, 3: activity permalink, 4: activity timestamp */
printf(__('<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress'), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded());
?>
</div>
<div class="acomment-content"><?php
bp_activity_comment_content();
?>
</div>
示例15: swa_activity_entry
function swa_activity_entry($show_avatar = false)
{
?>
<?php
do_action('bp_before_activity_entry');
?>
<li class="<?php
bp_activity_css_class();
?>
" id="activity-<?php
bp_activity_id();
?>
">
<?php
if ($show_avatar == "yes") {
?>
<div class="swa-activity-avatar">
<a href="<?php
bp_activity_user_link();
?>
">
<?php
bp_activity_avatar('type=thumb&width=50&height=50');
?>
</a>
</div>
<?php
}
?>
<div class="swa-activity-content">
<div class="swa-activity-header">
<?php
bp_activity_action();
?>
</div>
<?php
if (bp_activity_has_content()) {
?>
<div class="swa-activity-inner">
<?php
bp_activity_content_body();
?>
</div>
<?php
}
?>
<?php
do_action('bp_activity_entry_content');
?>
<div class="swa-activity-meta">
<?php
if (is_user_logged_in() && bp_activity_can_comment()) {
?>
<a href="<?php
bp_activity_comment_link();
?>
" class="acomment-reply" id="acomment-comment-<?php
bp_activity_id();
?>
"><?php
_e('Reply', 'buddypress');
?>
(<span><?php
bp_activity_comment_count();
?>
</span>)</a>
<?php
}
?>
<?php
if (is_user_logged_in()) {
?>
<?php
if (!bp_get_activity_is_favorite()) {
?>
<a href="<?php
bp_activity_favorite_link();
?>
" class="fav" title="<?php
_e('Mark as Favorite', 'swa');
?>
"><?php
_e('Favorite', 'swa');
?>
</a>
<?php
} else {
?>
<a href="<?php
bp_activity_unfavorite_link();
?>
" class="unfav" title="<?php
_e('Remove Favorite', 'swa');
?>
"><?php
_e('Remove Favorite', 'swa');
?>
//.........这里部分代码省略.........