本文整理汇总了PHP中bp_activity_recurse_comments函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_activity_recurse_comments函数的具体用法?PHP bp_activity_recurse_comments怎么用?PHP bp_activity_recurse_comments使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_activity_recurse_comments函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_activity_comment_delete_link
?>
<?php
if (bp_activity_user_can_delete()) {
?>
<a href="<?php
bp_activity_comment_delete_link();
?>
" class="delete acomment-delete confirm bp-secondary-action" rel="nofollow"><?php
_e('Delete', 'buddypress');
?>
</a>
<?php
}
?>
<?php
do_action('bp_activity_comment_options');
?>
</div>
<?php
bp_activity_recurse_comments(bp_activity_current_comment());
?>
</li>
<?php
do_action('bp_after_activity_comment');
示例2: bp_activity_get_comments
/**
* Gets the comment markup for an activity item
*
* @since 1.2.0
*
* @todo deprecate $args param
*
* @todo Given that checks for children already happen in bp_activity_recurse_comments(),
* this function can probably be streamlined or removed.
*
* @param string $args Unused. Appears to be left over from an earlier implementation.
*
* @global object $activities_template {@link BP_Activity_Template}
* @global object $bp BuddyPress global settings
* @uses bp_activity_recurse_comments()
*/
function bp_activity_get_comments($args = '')
{
global $activities_template, $bp;
if (!isset($activities_template->activity->children) || !$activities_template->activity->children) {
return false;
}
bp_activity_recurse_comments($activities_template->activity);
}
示例3: bp_activity_get_comments
/**
* Get the comment markup for an activity item.
*
* @since 1.2.0
*
* @todo deprecate $args param
* @todo Given that checks for children already happen in bp_activity_recurse_comments(),
* this function can probably be streamlined or removed.
*
* @global object $activities_template {@link BP_Activity_Template}
* @uses bp_activity_recurse_comments()
*
* @param string $args Unused. Left over from an earlier implementation.
* @return bool
*/
function bp_activity_get_comments($args = '')
{
global $activities_template;
if (empty($activities_template->activity->children)) {
return false;
}
bp_activity_recurse_comments($activities_template->activity);
}
示例4: bp_swa_activity_recurse_comments
function bp_swa_activity_recurse_comments($comment)
{
global $activities_template, $bp;
if (!$comment->children) {
return false;
}
$content .= '<ul>';
foreach ((array) $comment->children as $comment) {
if (!$comment->user_fullname) {
$comment->user_fullname = $comment->display_name;
}
$content .= '<li id="swa-acomment-' . $comment->id . '">';
$content .= '<div class="swa-acomment-avatar"><a href="' . bp_core_get_user_domain($comment->user_id, $comment->user_nicename, $comment->user_login) . '">' . bp_core_fetch_avatar(array('item_id' => $comment->user_id, 'width' => 25, 'height' => 25, 'email' => $comment->user_email)) . '</a></div>';
$content .= '<div class="swa-acomment-meta"><a href="' . bp_core_get_user_domain($comment->user_id, $comment->user_nicename, $comment->user_login) . '">' . apply_filters('bp_get_member_name', $comment->user_fullname) . '</a> · ' . sprintf(__('%s ago', 'swa'), bp_core_time_since(strtotime($comment->date_recorded)));
/* Delete link */
if ($bp->loggedin_user->is_site_admin || $bp->loggedin_user->id == $comment->user_id) {
$content .= ' · <a href="' . wp_nonce_url($bp->root_domain . '/' . $bp->activity->slug . '/delete/?cid=' . $comment->id, 'bp_activity_delete_link') . '" class="delete acomment-delete">' . __('Delete', 'swa') . '</a>';
}
$content .= '</div>';
$content .= '<div class="swa-acomment-content">' . apply_filters('bp_get_activity_content', $comment->content) . '</div>';
$content .= bp_activity_recurse_comments($comment);
$content .= '</li>';
}
$content .= '</ul>';
return apply_filters('bp_swa_activity_recurse_comments', $content);
}
示例5: bp_activity_recurse_comments
function bp_activity_recurse_comments( $comment ) {
global $activities_template, $bp;
if ( !$comment->children )
return false;
$content .= '<ul>';
foreach ( (array)$comment->children as $comment ) {
if ( !$comment->user_fullname )
$comment->user_fullname = $comment->display_name;
$content .= '<li id="acomment-' . $comment->id . '">';
$content .= '<div class="acomment-avatar"><a href="' . bp_core_get_user_domain( $comment->user_id, $comment->user_nicename, $comment->user_login ) . '">' . bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => 20, 'height' => 20, 'email' => $comment->user_email ) ) . '</a></div>';
$content .= '<div class="acomment-meta"><a href="' . bp_core_get_user_domain( $comment->user_id, $comment->user_nicename, $comment->user_login ) . '">' . apply_filters( 'bp_acomment_name', $comment->user_fullname, $comment ) . '</a> · ' . sprintf( __( '%s ago', 'buddypress' ), bp_core_time_since( $comment->date_recorded ) );
/* Reply link - the span is so that threaded reply links can be hidden when JS is off. */
if ( is_user_logged_in() )
$content .= '<span class="acomment-replylink"> · <a href="#acomment-' . $comment->id . '" class="acomment-reply" id="acomment-reply-' . $activities_template->activity->id . '">' . __( 'Reply', 'buddypress' ) . '</a></span>';
/* Delete link */
if ( $bp->loggedin_user->is_super_admin || $bp->loggedin_user->id == $comment->user_id )
$content .= ' · <a href="' . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/?cid=' . $comment->id, 'bp_activity_delete_link' ) . '" class="delete acomment-delete">' . __( 'Delete', 'buddypress' ) . '</a>';
$content .= '</div>';
$content .= '<div class="acomment-content">' . apply_filters( 'bp_get_activity_content', $comment->content ) . '</div>';
$content .= bp_activity_recurse_comments( $comment );
$content .= '</li>';
}
$content .= '</ul>';
return apply_filters( 'bp_activity_recurse_comments', $content );
}