本文整理汇总了PHP中bp_activity_delete_link函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_activity_delete_link函数的具体用法?PHP bp_activity_delete_link怎么用?PHP bp_activity_delete_link使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_activity_delete_link函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _e
"><?php
_e('Remove Favorite', 'firmasite');
?>
</a>
<?php
}
?>
<?php
}
?>
<?php
if (bp_activity_user_can_delete()) {
bp_activity_delete_link();
}
?>
<?php
do_action('bp_activity_entry_meta');
?>
</div>
<?php
}
?>
</div>
示例2: show_comment_form
function show_comment_form() {
$activity_id = get_post_meta($this->id, 'bp_media_child_activity', true);
if (bp_has_activities(array(
'display_comments' => 'stream',
'include' => $activity_id,
'max' => 1
))) :
while (bp_activities()) : bp_the_activity();
do_action('bp_before_activity_entry');
?>
<div class="activity">
<ul id="activity-stream" class="activity-list item-list">
<li class="activity activity_update" id="activity-<?php echo $activity_id; ?>">
<div class="activity-content">
<?php do_action('bp_activity_entry_content'); ?>
<?php if (is_user_logged_in()) : ?>
<div class="activity-meta no-ajax">
<?php if (bp_activity_can_comment()) : ?>
<a href="<?php bp_get_activity_comment_link(); ?>" class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf(__('Comment <span>%s</span>', 'buddypress'), bp_activity_get_comment_count()); ?></a>
<?php endif; ?>
<?php if (bp_activity_can_favorite()) : ?>
<?php if (!bp_get_activity_is_favorite()) : ?>
<a href="<?php bp_activity_favorite_link(); ?>" class="button fav bp-secondary-action" title="<?php esc_attr_e('Mark as Favorite', 'buddypress'); ?>"><?php _e('Favorite', 'buddypress') ?></a>
<?php else : ?>
<a href="<?php bp_activity_unfavorite_link(); ?>" class="button unfav bp-secondary-action" title="<?php esc_attr_e('Remove Favorite', 'buddypress'); ?>"><?php _e('Remove Favorite', 'buddypress') ?></a>
<?php endif; ?>
<?php endif; ?>
<?php if (bp_activity_user_can_delete()) bp_activity_delete_link(); ?>
<?php do_action('bp_activity_entry_meta'); ?>
</div>
<?php endif; ?>
</div>
<?php do_action('bp_before_activity_entry_comments'); ?>
<?php if (( is_user_logged_in() && bp_activity_can_comment() ) || bp_activity_get_comment_count()) : ?>
<div class="activity-comments">
<?php bp_activity_comments(); ?>
<?php if (is_user_logged_in()) : ?>
<form action="<?php bp_activity_comment_form_action(); ?>" method="post" id="ac-form-<?php bp_activity_id(); ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display(); ?>>
<div class="ac-reply-avatar"><?php bp_loggedin_user_avatar('width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT); ?></div>
<div class="ac-reply-content">
<div class="ac-textarea">
<textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input" name="ac_input_<?php bp_activity_id(); ?>"></textarea>
</div>
<input type="submit" name="ac_form_submit" value="<?php _e('Post', 'buddypress'); ?>" /> <?php _e('or press esc to cancel.', 'buddypress'); ?>
<input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" />
</div>
<?php do_action('bp_activity_entry_comments'); ?>
<?php wp_nonce_field('new_activity_comment', '_wpnonce_new_activity_comment'); ?>
</form>
<?php endif; ?>
</div>
<?php endif; ?>
<?php do_action('bp_after_activity_entry_comments'); ?>
</li>
</ul>
</div>
<?php
endwhile;
else: ?>
<div class="activity">
<ul id="activity-stream" class="activity-list item-list">
<li class="activity activity_update" id="activity-<?php echo $activity_id; ?>">
<div class="activity-content">
<?php do_action('bp_activity_entry_content'); ?>
<?php if (is_user_logged_in()) : ?>
<div class="activity-meta no-ajax">
<a href="<?php echo $this->get_delete_url(); ?>" class="button item-button bp-secondary-action delete-activity-single confirm" rel="nofollow">Delete</a>
</div>
<?php endif; ?>
</div>
</li>
</ul>
</div>
<?
endif;
}