当前位置: 首页>>代码示例>>PHP>>正文


PHP bp_activity_recurse_comments函数代码示例

本文整理汇总了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');
开发者ID:JeffreyBue,项目名称:jb,代码行数:31,代码来源:comment.php

示例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);
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:24,代码来源:bp-activity-template.php

示例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);
}
开发者ID:divemasterza,项目名称:Checkedin,代码行数:23,代码来源:bp-activity-template.php

示例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> &middot; ' . 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 .= ' &middot; <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);
}
开发者ID:picassentviu,项目名称:AMMPro,代码行数:26,代码来源:bp-sitewide-activity.php

示例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> &middot; ' . 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"> &middot; <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 .= ' &middot; <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 );
		}
开发者ID:n-sane,项目名称:zaroka,代码行数:33,代码来源:bp-activity-templatetags.php


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