本文整理汇总了PHP中bp_activity_thread_permalink函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_activity_thread_permalink函数的具体用法?PHP bp_activity_thread_permalink怎么用?PHP bp_activity_thread_permalink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_activity_thread_permalink函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: my_bp_activity_entry_content
function my_bp_activity_entry_content()
{
if (bp_get_activity_object_name() == 'blogs' && bp_get_activity_type() == 'new_blog_post') {
?>
<a class="view-post view-group-blog-comment" href="<?php
bp_activity_thread_permalink();
?>
">View group blog</a>
<?php
}
if (bp_get_activity_object_name() == 'blogs' && bp_get_activity_type() == 'new_blog_comment') {
?>
<a class="view-post view-group-blog-comment" href="<?php
bp_activity_thread_permalink();
?>
">View group blog</a>
<?php
}
if (bp_get_activity_object_name() == 'activity' && bp_get_activity_type() == 'activity_update') {
?>
<a class="view-post view-group-activity" href="<?php
bp_activity_thread_permalink();
?>
">View status update</a>
<?php
}
if (bp_get_activity_object_name() == 'groups' && bp_get_activity_type() == 'new_forum_topic') {
?>
<a class="view-thread view-group-discussion-topic" href="<?php
bp_activity_thread_permalink();
?>
">View group discussion</a>
<?php
}
if (bp_get_activity_object_name() == 'groups' && bp_get_activity_type() == 'new_forum_post') {
?>
<a class="view-post view-group-discussion-post" href="<?php
bp_activity_thread_permalink();
?>
">View group discussion</a>
<?php
}
}
示例2: _e
</div>
<?php
if ('activity_comment' == bp_get_activity_type()) {
?>
<div class="activity-inreplyto">
<strong><?php
_e('In reply to: ', 'firmasite');
?>
</strong><?php
bp_activity_parent_content();
?>
<a href="<?php
bp_activity_thread_permalink();
?>
" class="view" title="<?php
_e('View Thread / Permalink', 'firmasite');
?>
"><?php
_e('View', 'firmasite');
?>
</a>
</div>
<?php
}
?>
</div>
示例3: output
/**
* Output the RSS feed.
*/
protected function output()
{
$this->http_headers();
echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '"?' . '>';
?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
<?php
/**
* Fires at the end of the opening RSS tag for feed output so plugins can add extra attributes.
*
* @since 1.8.0
*/
do_action('bp_activity_feed_rss_attributes');
?>
>
<channel>
<title><?php
echo $this->title;
?>
</title>
<link><?php
echo $this->link;
?>
</link>
<atom:link href="<?php
self_link();
?>
" rel="self" type="application/rss+xml" />
<description><?php
echo $this->description;
?>
</description>
<lastBuildDate><?php
echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false);
?>
</lastBuildDate>
<generator>https://buddypress.org/?v=<?php
bp_version();
?>
</generator>
<language><?php
bloginfo_rss('language');
?>
</language>
<ttl><?php
echo $this->ttl;
?>
</ttl>
<sy:updatePeriod><?php
echo $this->update_period;
?>
</sy:updatePeriod>
<sy:updateFrequency><?php
echo $this->update_frequency;
?>
</sy:updateFrequency>
<?php
/**
* Fires at the end of channel elements list in RSS feed so plugins can add extra channel elements.
*
* @since 1.8.0
*/
do_action('bp_activity_feed_channel_elements');
?>
<?php
if (bp_has_activities($this->activity_args)) {
?>
<?php
while (bp_activities()) {
bp_the_activity();
?>
<item>
<guid isPermaLink="false"><?php
bp_activity_feed_item_guid();
?>
</guid>
<title><?php
echo stripslashes(bp_get_activity_feed_item_title());
?>
</title>
<link><?php
bp_activity_thread_permalink();
?>
</link>
<pubDate><?php
echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false);
?>
</pubDate>
<?php
//.........这里部分代码省略.........
示例4: output
/**
* Output the RSS feed.
*/
protected function output()
{
// set up some additional headers if not on a directory page
// this is done b/c BP uses pseudo-pages
if (!bp_is_directory()) {
global $wp_query;
$wp_query->is_404 = false;
status_header(200);
}
header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '"?' . '>';
?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
<?php
do_action('bp_activity_feed_rss_attributes');
?>
>
<channel>
<title><?php
echo $this->title;
?>
</title>
<link><?php
echo $this->link;
?>
</link>
<atom:link href="<?php
self_link();
?>
" rel="self" type="application/rss+xml" />
<description><?php
echo $this->description;
?>
</description>
<lastBuildDate><?php
echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false);
?>
</lastBuildDate>
<generator>http://buddypress.org/?v=<?php
bp_version();
?>
</generator>
<language><?php
bloginfo_rss('language');
?>
</language>
<ttl><?php
echo $this->ttl;
?>
</ttl>
<sy:updatePeriod><?php
echo $this->update_period;
?>
</sy:updatePeriod>
<sy:updateFrequency><?php
echo $this->update_frequency;
?>
</sy:updateFrequency>
<?php
do_action('bp_activity_feed_channel_elements');
?>
<?php
if (bp_has_activities($this->activity_args)) {
?>
<?php
while (bp_activities()) {
bp_the_activity();
?>
<item>
<guid isPermaLink="false"><?php
bp_activity_feed_item_guid();
?>
</guid>
<title><?php
echo stripslashes(bp_get_activity_feed_item_title());
?>
</title>
<link><?php
bp_activity_thread_permalink();
?>
</link>
<pubDate><?php
echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false);
?>
</pubDate>
<?php
if (bp_get_activity_feed_item_description()) {
?>
<content:encoded><![CDATA[<?php
//.........这里部分代码省略.........
示例5: 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>
示例6: bp_site_name
<channel>
<title><?php echo bp_site_name() ?> | <?php echo $bp->displayed_user->fullname; ?> | <?php _e( 'Mentions', 'buddypress' ) ?></title>
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
<link><?php echo site_url( BP_ACTIVITY_SLUG . '/#mentions/' ) ?></link>
<description><?php echo $bp->displayed_user->fullname; ?> - <?php _e( 'Mentions', 'buddypress' ) ?></description>
<pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate>
<generator>http://buddypress.org/?v=<?php echo BP_VERSION ?></generator>
<language><?php echo get_option('rss_language'); ?></language>
<?php do_action('bp_activity_mentions_feed_head'); ?>
<?php if ( bp_has_activities( 'max=50&display_comments=stream&search_terms=@' . bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) ) : ?>
<?php while ( bp_activities() ) : bp_the_activity(); ?>
<item>
<guid><?php bp_activity_thread_permalink() ?></guid>
<title><![CDATA[<?php bp_activity_feed_item_title() ?>]]></title>
<link><?php echo bp_activity_thread_permalink() ?></link>
<pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false); ?></pubDate>
<description>
<![CDATA[
<?php bp_activity_feed_item_description() ?>
<?php if ( bp_activity_can_comment() ) : ?>
<p><?php printf( __( 'Comments: %s', 'buddypress' ), bp_activity_get_comment_count() ); ?></p>
<?php endif; ?>
<?php if ( 'activity_comment' == bp_get_activity_action_name() ) : ?>
<br /><strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> -
<?php bp_activity_parent_content() ?>
<?php endif; ?>
]]>
示例7: swa_activity_entry
//.........这里部分代码省略.........
bp_activity_unfavorite_link();
?>
" class="unfav" title="<?php
_e('Remove Favorite', 'swa');
?>
"><?php
_e('Remove Favorite', 'swa');
?>
</a>
<?php
}
?>
<?php
}
?>
<?php
do_action('bp_activity_entry_meta');
?>
</div>
<div class="clear" ></div>
</div>
<?php
if ('activity_comment' == bp_get_activity_type()) {
?>
<div class="swa-activity-inreplyto">
<strong><?php
_e('In reply to', 'swa');
?>
</strong> - <?php
bp_activity_parent_content();
?>
·
<a href="<?php
bp_activity_thread_permalink();
?>
" class="view" title="<?php
_e('View Thread / Permalink', 'swa');
?>
"><?php
_e('View', 'swa');
?>
</a>
</div>
<?php
}
?>
<?php
if (bp_activity_can_comment()) {
?>
<div class="swa-activity-comments">
<?php
bp_activity_comments();
?>
<?php
if (is_user_logged_in()) {
?>
<form action="<?php
bp_activity_comment_form_action();
?>
" method="post" id="swa-ac-form-<?php
bp_activity_id();
?>
" class="swa-ac-form"<?php
bp_activity_comment_form_nojs_display();
?>
>
示例8: if
<?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', 'buddypress' ) ?>"><?php _e( 'Favorite', 'buddypress' ) ?></a>
<?php else : ?>
<a href="<?php bp_activity_unfavorite_link() ?>" class="unfav" title="<?php _e( 'Remove Favorite', 'buddypress' ) ?>"><?php _e( 'Remove Favorite', 'buddypress' ) ?></a>
<?php endif; ?>
<?php endif;?>
<?php do_action( 'bp_activity_entry_meta' ) ?>
</div>
</div>
<?php if ( 'activity_comment' == bp_get_activity_type() ) : ?>
<div class="activity-inreplyto">
<strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> - <?php bp_activity_parent_content() ?> ·
<a href="<?php bp_activity_thread_permalink() ?>" class="view" title="<?php _e( 'View Thread / Permalink', 'buddypress' ) ?>"><?php _e( 'View', 'buddypress' ) ?></a>
</div>
<?php endif; ?>
<?php do_action( 'bp_before_activity_entry_comments' ) ?>
<?php if ( bp_activity_can_comment() ) : ?>
<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>
示例9: add_stream_facebooklike_button
function add_stream_facebooklike_button()
{
if (is_user_logged_in()) {
?>
<p style="margin: 14px 0px; float:left; width: 100%; clear:both;"><iframe src="http://www.facebook.com/plugins/like.php?href=<?php
bp_activity_thread_permalink();
?>
&layout=standard&show-faces=true&width=450&action=like&font=arial&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; float: left; width: 100%; height: 30px; overflow:hidden;"></iframe>
</p>
<?php
}
}
示例10: render_activity_entry_link
/**
* Render a special activity entry anchor
*
* @param string $class
* @param string $title
*/
protected function render_activity_entry_link($class, $title)
{
// render the link
?>
<a class="<?php
print esc_attr($class);
?>
button" href="<?php
bp_activity_thread_permalink();
?>
"><?php
print $title;
?>
</a><?php
}
示例11: embed_comments_button
/**
* Prints the markup for the activity embed comments button.
*
* Basically a copy of {@link print_embed_comments_button()}, but modified for
* the BP activity component.
*
* @since 2.6.0
*/
public function embed_comments_button()
{
if (!did_action('bp_embed_content') || !bp_is_single_activity()) {
return;
}
// Make sure our custom permalink shows up in the 'WordPress Embed' block.
add_filter('the_permalink', array($this, 'filter_embed_url'));
// Only show comment bubble if we have some activity comments.
$count = bp_activity_get_comment_count();
if (empty($count)) {
return;
}
?>
<div class="wp-embed-comments">
<a href="<?php
bp_activity_thread_permalink();
?>
">
<span class="dashicons dashicons-admin-comments"></span>
<?php
printf(_n('%s <span class="screen-reader-text">Comment</span>', '%s <span class="screen-reader-text">Comments</span>', $count, 'buddypress'), number_format_i18n($count));
?>
</a>
</div>
<?php
}