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


PHP bp_get_activity_thread_permalink函数代码示例

本文整理汇总了PHP中bp_get_activity_thread_permalink函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_activity_thread_permalink函数的具体用法?PHP bp_get_activity_thread_permalink怎么用?PHP bp_get_activity_thread_permalink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bp_get_activity_thread_permalink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bp_get_activity_favorite_link

         }
         if (is_user_logged_in()) {
             if (bp_activity_can_favorite()) {
                 if (!bp_get_activity_is_favorite()) {
                     $output .= '<a href="' . bp_get_activity_favorite_link() . '" class="fav bp-secondary-action" title="' . esc_attr(__('Mark as Favorite', 'buddypress')) . '"></a>';
                 } else {
                     $output .= '<a href="' . bp_get_activity_unfavorite_link() . '" class="unfav bp-secondary-action" title="' . esc_attr(__('Remove Favorite', 'buddypress')) . '"></a>';
                 }
             }
             if (bp_activity_user_can_delete()) {
                 $output .= bp_get_activity_delete_link();
             }
         }
         $output .= '</div>';
         if (bp_get_activity_type() == 'activity_comment') {
             $output .= '<a href="' . bp_get_activity_thread_permalink() . '" class="view bp-secondary-action" title="' . __('View', 'buddypress') . '">' . __('View', 'buddypress');
         }
         // end bp_get_activity_type()
         $output .= '</div>';
         // end activity content
         $output .= '</li>';
     }
     $output .= '</ul>';
 } else {
     $output .= '<div class="alert alert-info">Right now there is no activity to show</div>';
 }
 if ($show_button == 'yes') {
     $output .= '<a href="' . $button_link . '" title="" class="pull-right btn btn-large btn-primary">' . $button_label . '</a>';
 }
 $output .= '</div>';
 $output .= '</div>';
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:31,代码来源:kleo_bp_activity_stream.php

示例2: the_champ_render_sharing

/**
 * Enable sharing interface at selected areas.
 */
function the_champ_render_sharing($content)
{
    global $post;
    // hook to bypass sharing
    $disable = apply_filters('the_champ_bypass_sharing', $post, $content);
    // if $disable value is 1, return content without sharing interface
    if ($disable === 1) {
        return $content;
    }
    $sharingMeta = get_post_meta($post->ID, '_the_champ_meta', true);
    global $theChampSharingOptions, $theChampCounterOptions;
    $sharingBpActivity = false;
    $counterBpActivity = false;
    if (current_filter() == 'bp_activity_entry_meta') {
        if (isset($theChampSharingOptions['bp_activity'])) {
            $sharingBpActivity = true;
        }
        if (isset($theChampCounterOptions['bp_activity'])) {
            $counterBpActivity = true;
        }
    }
    if (isset($theChampCounterOptions['enable'])) {
        //counter interface
        if (isset($theChampCounterOptions['hor_enable']) && !(isset($sharingMeta['counter']) && $sharingMeta['counter'] == 1 && !is_front_page())) {
            if ($counterBpActivity) {
                $counterPostUrl = bp_get_activity_thread_permalink();
            } elseif (isset($theChampCounterOptions['horizontal_target_url'])) {
                if ($theChampCounterOptions['horizontal_target_url'] == 'default') {
                    $counterPostUrl = get_permalink($post->ID);
                } elseif ($theChampCounterOptions['horizontal_target_url'] == 'home') {
                    $counterPostUrl = site_url();
                } elseif ($theChampCounterOptions['horizontal_target_url'] == 'custom') {
                    $counterPostUrl = isset($theChampCounterOptions['horizontal_target_url_custom']) ? trim($theChampCounterOptions['horizontal_target_url_custom']) : get_permalink($post->ID);
                }
            } else {
                $counterPostUrl = get_permalink($post->ID);
            }
            $counterUrl = $counterPostUrl;
            // if bit.ly integration enabled, generate bit.ly short url
            if (isset($theChampCounterOptions['bitly_enable']) && isset($theChampCounterOptions['bitly_username']) && isset($theChampCounterOptions['bitly_username']) && $theChampCounterOptions['bitly_username'] != '' && isset($theChampCounterOptions['bitly_key']) && $theChampCounterOptions['bitly_key'] != '') {
                $shortUrl = the_champ_generate_counter_bitly_url($counterPostUrl);
                if ($shortUrl) {
                    $counterUrl = $shortUrl;
                }
            }
            $sharingDiv = the_champ_prepare_counter_html($counterPostUrl, 'horizontal', $counterUrl);
            $sharingContainerStyle = '';
            $sharingTitleStyle = 'style="font-weight:bold"';
            if (isset($theChampCounterOptions['hor_counter_alignment'])) {
                if ($theChampCounterOptions['hor_counter_alignment'] == 'right') {
                    $sharingContainerStyle = 'style="float: right"';
                } elseif ($theChampCounterOptions['hor_counter_alignment'] == 'center') {
                    $sharingContainerStyle = 'style="float: right;position: relative;left: -50%;text-align: left;"';
                    $sharingTitleStyle = 'style="font-weight: bold;list-style: none;position: relative;left: 50%;"';
                }
            }
            $horizontalDiv = "<div style='clear: both'></div><div " . $sharingContainerStyle . " class='the_champ_counter_container the_champ_horizontal_counter'><div " . $sharingTitleStyle . ">" . ucfirst($theChampCounterOptions['title']) . "</div>" . $sharingDiv . "</div><div style='clear: both'></div>";
            if ($counterBpActivity) {
                echo $horizontalDiv;
            }
            // show horizontal counter
            if (isset($theChampCounterOptions['home']) && is_front_page() || isset($theChampCounterOptions['category']) && is_category() || isset($theChampCounterOptions['post']) && is_single() && isset($post->post_type) && $post->post_type == 'post' || isset($theChampCounterOptions['page']) && is_page() && isset($post->post_type) && $post->post_type == 'page' || isset($theChampCounterOptions['excerpt']) && is_front_page() && current_filter() == 'get_the_excerpt' || isset($theChampCounterOptions['bb_reply']) && current_filter() == 'bbp_get_reply_content' || isset($theChampCounterOptions['bb_forum']) && (isset($theChampCounterOptions['top']) && current_filter() == 'bbp_template_before_single_forum' || isset($theChampCounterOptions['bottom']) && current_filter() == 'bbp_template_after_single_forum') || isset($theChampCounterOptions['bb_topic']) && (isset($theChampCounterOptions['top']) && in_array(current_filter(), array('bbp_template_before_single_topic', 'bbp_template_before_lead_topic')) || isset($theChampCounterOptions['bottom']) && in_array(current_filter(), array('bbp_template_after_single_topic', 'bbp_template_after_lead_topic')))) {
                if (in_array(current_filter(), array('bbp_template_before_single_topic', 'bbp_template_before_lead_topic', 'bbp_template_before_single_forum', 'bbp_template_after_single_topic', 'bbp_template_after_lead_topic', 'bbp_template_after_single_forum'))) {
                    echo '<div style="clear:both"></div>' . $horizontalDiv . '<div style="clear:both"></div>';
                } else {
                    if (isset($theChampCounterOptions['top']) && isset($theChampCounterOptions['bottom'])) {
                        $content = $horizontalDiv . '<br/>' . $content . '<br/>' . $horizontalDiv;
                    } else {
                        if (isset($theChampCounterOptions['top'])) {
                            $content = $horizontalDiv . $content;
                        } elseif (isset($theChampCounterOptions['bottom'])) {
                            $content = $content . $horizontalDiv;
                        }
                    }
                }
            }
        }
        if (isset($theChampCounterOptions['vertical_enable']) && !(isset($sharingMeta['vertical_counter']) && $sharingMeta['vertical_counter'] == 1 && !is_front_page())) {
            if (isset($theChampCounterOptions['vertical_target_url'])) {
                if ($theChampCounterOptions['vertical_target_url'] == 'default') {
                    $counterPostUrl = get_permalink($post->ID);
                } elseif ($theChampCounterOptions['vertical_target_url'] == 'home') {
                    $counterPostUrl = site_url();
                } elseif ($theChampCounterOptions['vertical_target_url'] == 'custom') {
                    $counterPostUrl = isset($theChampCounterOptions['vertical_target_url_custom']) ? trim($theChampCounterOptions['vertical_target_url_custom']) : get_permalink($post->ID);
                }
            } else {
                $counterPostUrl = get_permalink($post->ID);
            }
            $counterUrl = $counterPostUrl;
            // if bit.ly integration enabled, generate bit.ly short url
            if (isset($theChampCounterOptions['bitly_enable']) && isset($theChampCounterOptions['bitly_username']) && isset($theChampCounterOptions['bitly_username']) && $theChampCounterOptions['bitly_username'] != '' && isset($theChampCounterOptions['bitly_key']) && $theChampCounterOptions['bitly_key'] != '') {
                $shortUrl = the_champ_generate_counter_bitly_url($counterPostUrl);
                if ($shortUrl) {
                    $counterUrl = $shortUrl;
                }
            }
//.........这里部分代码省略.........
开发者ID:eq0rip,项目名称:Hamroreview.com,代码行数:101,代码来源:social_sharing.php

示例3: bp_activity_truncate_entry

/**
 * Truncate long activity entries when viewed in activity streams.
 *
 * This method can only be used inside the Activity loop.
 *
 * @since 1.5.0
 *
 * @uses bp_is_single_activity()
 * @uses apply_filters() To call the 'bp_activity_excerpt_append_text' hook.
 * @uses apply_filters() To call the 'bp_activity_excerpt_length' hook.
 * @uses bp_create_excerpt()
 * @uses bp_get_activity_id()
 * @uses bp_get_activity_thread_permalink()
 * @uses apply_filters() To call the 'bp_activity_truncate_entry' hook.
 *
 * @param string $text The original activity entry text.
 * @return string $excerpt The truncated text.
 */
function bp_activity_truncate_entry($text)
{
    global $activities_template;
    /**
     * Provides a filter that lets you choose whether to skip this filter on a per-activity basis.
     *
     * @since 2.3.0
     *
     * @param bool $value If true, text should be checked to see if it needs truncating.
     */
    $maybe_truncate_text = apply_filters('bp_activity_maybe_truncate_entry', isset($activities_template->activity->type) && !in_array($activities_template->activity->type, array('new_blog_post'), true));
    // The full text of the activity update should always show on the single activity screen.
    if (!$maybe_truncate_text || bp_is_single_activity()) {
        return $text;
    }
    /**
     * Filters the appended text for the activity excerpt.
     *
     * @since 1.5.0
     *
     * @param string $value Internationalized "Read more" text.
     */
    $append_text = apply_filters('bp_activity_excerpt_append_text', __('[Read more]', 'buddypress'));
    /**
     * Filters the excerpt length for the activity excerpt.
     *
     * @since 1.5.0
     *
     * @param int $value Number indicating how many words to trim the excerpt down to.
     */
    $excerpt_length = apply_filters('bp_activity_excerpt_length', 358);
    // Run the text through the excerpt function. If it's too short, the original text will be returned.
    $excerpt = bp_create_excerpt($text, $excerpt_length, array('ending' => __('&hellip;', 'buddypress')));
    /*
     * If the text returned by bp_create_excerpt() is different from the original text (ie it's
     * been truncated), add the "Read More" link. Note that bp_create_excerpt() is stripping
     * shortcodes, so we have strip them from the $text before the comparison.
     */
    if ($excerpt != strip_shortcodes($text)) {
        $id = !empty($activities_template->activity->current_comment->id) ? 'acomment-read-more-' . $activities_template->activity->current_comment->id : 'activity-read-more-' . bp_get_activity_id();
        $excerpt = sprintf('%1$s<span class="activity-read-more" id="%2$s"><a href="%3$s" rel="nofollow">%4$s</a></span>', $excerpt, $id, bp_get_activity_thread_permalink(), $append_text);
    }
    /**
     * Filters the composite activity excerpt entry.
     *
     * @since 1.5.0
     *
     * @param string $excerpt     Excerpt text and markup to be displayed.
     * @param string $text        The original activity entry text.
     * @param string $append_text The final append text applied.
     */
    return apply_filters('bp_activity_truncate_entry', $excerpt, $text, $append_text);
}
开发者ID:mawilliamson,项目名称:wordpress,代码行数:71,代码来源:bp-activity-filters.php

示例4: bp_activity_truncate_entry

/**
 * Truncates long activity entries when viewed in activity streams
 *
 * @since 1.5.0
 *
 * @param $text The original activity entry text
 *
 * @uses bp_is_single_activity()
 * @uses apply_filters() To call the 'bp_activity_excerpt_append_text' hook
 * @uses apply_filters() To call the 'bp_activity_excerpt_length' hook
 * @uses bp_create_excerpt()
 * @uses bp_get_activity_id()
 * @uses bp_get_activity_thread_permalink()
 * @uses apply_filters() To call the 'bp_activity_truncate_entry' hook
 *
 * @return string $excerpt The truncated text
 */
function bp_activity_truncate_entry($text)
{
    global $activities_template;
    // The full text of the activity update should always show on the single activity screen
    if (bp_is_single_activity()) {
        return $text;
    }
    $append_text = apply_filters('bp_activity_excerpt_append_text', __('[Read more]', 'buddypress'));
    $excerpt_length = apply_filters('bp_activity_excerpt_length', 358);
    // Run the text through the excerpt function. If it's too short, the original text will be
    // returned.
    $excerpt = bp_create_excerpt($text, $excerpt_length, array('ending' => __('&hellip;', 'buddypress')));
    // If the text returned by bp_create_excerpt() is different from the original text (ie it's
    // been truncated), add the "Read More" link.
    if ($excerpt != $text) {
        $id = !empty($activities_template->activity->current_comment->id) ? 'acomment-read-more-' . $activities_template->activity->current_comment->id : 'activity-read-more-' . bp_get_activity_id();
        $excerpt = sprintf('%1$s<span class="activity-read-more" id="%2$s"><a href="%3$s" rel="nofollow">%4$s</a></span>', $excerpt, $id, bp_get_activity_thread_permalink(), $append_text);
    }
    return apply_filters('bp_activity_truncate_entry', $excerpt, $text, $append_text);
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:37,代码来源:bp-activity-filters.php

示例5: bp_activity_thread_permalink

/**
 * Echoes the activity thread permalink
 *
 * @since 1.2.0
 *
 * @uses bp_get_activity_permalink_id()
 */
function bp_activity_thread_permalink()
{
    echo bp_get_activity_thread_permalink();
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:11,代码来源:bp-activity-template.php

示例6: buddy_social_button_activity_filter

 function buddy_social_button_activity_filter()
 {
     // buddypress activity
     $activity_type = bp_get_activity_type();
     $activity_link = bp_get_activity_thread_permalink();
     $activity_title = bp_get_activity_feed_item_title();
     echo '<div style="clear: both;\\"></div>';
     $options = $this->options;
     $essb_networks = $options['networks'];
     $buttons = "";
     foreach ($essb_networks as $k => $v) {
         if ($v[0] == 1) {
             if ($buttons != '') {
                 $buttons .= ",";
             }
             $buttons .= $k;
         }
     }
     $activity_title = str_replace('[&#8230;]', '', $activity_title);
     $need_counters = $options['show_counter'] ? 1 : 0;
     $links = do_shortcode('[easy-share buttons="' . $buttons . '" counters=0 native="no" url="' . urlencode($activity_link) . '" text="' . htmlspecialchars($activity_title) . '" nostats="yes" hide_names="yes"]');
     echo $links . '<div style="clear: both;\\"></div>';
 }
开发者ID:ajay786singh,项目名称:emc,代码行数:23,代码来源:essb.php

示例7: render_sharing

 /**
  * Enable sharing interface at selected areas.
  *
  * @since    1.0.0
  */
 public function render_sharing($content)
 {
     global $post;
     // hook to bypass sharing
     $disable_sharing = apply_filters('heateor_sss_disable_sharing', $post, $content);
     // if $disable_sharing value is 1, return content without sharing interface
     if ($disable_sharing === 1) {
         return $content;
     }
     $sharing_meta = get_post_meta($post->ID, '_heateor_sss_meta', true);
     $sharing_bp_activity = false;
     if (current_filter() == 'bp_activity_entry_meta') {
         if (isset($this->options['bp_activity'])) {
             $sharing_bp_activity = true;
         }
     }
     $post_types = get_post_types(array('public' => true), 'names', 'and');
     $post_types = array_diff($post_types, array('post', 'page'));
     // sharing interface
     if (isset($this->options['hor_enable']) && !(isset($sharing_meta['sharing']) && $sharing_meta['sharing'] == 1 && (!is_front_page() || is_front_page() && 'page' == get_option('show_on_front')))) {
         $post_id = $post->ID;
         // default post url
         $post_url = get_permalink($post->ID);
         if ($sharing_bp_activity) {
             $post_url = bp_get_activity_thread_permalink();
             $post_id = 0;
         } else {
             if ($this->options['horizontal_target_url'] == 'default') {
                 $post_url = get_permalink($post->ID);
                 if ($post_url == '') {
                     $post_url = html_entity_decode(esc_url($this->get_http_protocol() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]));
                 }
             } elseif ($this->options['horizontal_target_url'] == 'home') {
                 $post_url = site_url();
                 $post_id = 0;
             } elseif ($this->options['horizontal_target_url'] == 'custom') {
                 $post_url = $this->options['horizontal_target_url_custom'] ? $this->options['horizontal_target_url_custom'] : get_permalink($post->ID);
                 $post_id = 0;
             }
         }
         $sharing_url = $this->get_short_url($post_url, $post->ID);
         // share count transient ID
         $this->share_count_transient_id = $this->get_share_count_transient_id($post_url);
         $sharing_div = $this->prepare_sharing_html($sharing_url ? $sharing_url : $post_url, 'horizontal', isset($this->options['horizontal_counts']), isset($this->options['horizontal_total_shares']));
         $sharing_container_style = '';
         $sharing_title_style = 'style="font-weight:bold"';
         if ($this->options['hor_sharing_alignment'] == 'right') {
             $sharing_container_style = 'style="float: right"';
         } elseif ($this->options['hor_sharing_alignment'] == 'center') {
             $sharing_container_style = 'style="float: right;position: relative;left: -50%;text-align: left;"';
             $sharing_title_style = 'style="font-weight: bold;list-style: none;position: relative;left: 50%;"';
         }
         $horizontal_div = "<div style='clear: both'></div><div " . $sharing_container_style . " class='heateor_sss_sharing_container heateor_sss_horizontal_sharing' " . ($this->get_cached_share_count($this->share_count_transient_id) === false ? "heateor-sss-data-href='" . $post_url . "'" : '') . "><div class='heateor_sss_sharing_title' " . $sharing_title_style . " >" . ucfirst($this->options['title']) . "</div>" . $sharing_div . "</div><div style='clear: both'></div>";
         if ($sharing_bp_activity) {
             echo $horizontal_div;
         }
         // show horizontal sharing
         if (isset($this->options['home']) && is_front_page() || isset($this->options['category']) && is_category() || isset($this->options['archive']) && is_archive() || isset($this->options['post']) && is_single() && isset($post->post_type) && $post->post_type == 'post' || isset($this->options['page']) && is_page() && isset($post->post_type) && $post->post_type == 'page' || isset($this->options['excerpt']) && is_front_page() && current_filter() == 'get_the_excerpt' || isset($this->options['bb_reply']) && current_filter() == 'bbp_get_reply_content' || isset($this->options['bb_forum']) && (isset($this->options['top']) && current_filter() == 'bbp_template_before_single_forum' || isset($this->options['bottom']) && current_filter() == 'bbp_template_after_single_forum') || isset($this->options['bb_topic']) && (isset($this->options['top']) && in_array(current_filter(), array('bbp_template_before_single_topic', 'bbp_template_before_lead_topic')) || isset($this->options['bottom']) && in_array(current_filter(), array('bbp_template_after_single_topic', 'bbp_template_after_lead_topic'))) || isset($this->options['woocom_shop']) && current_filter() == 'woocommerce_after_shop_loop_item' || isset($this->options['woocom_product']) && current_filter() == 'woocommerce_share' || isset($this->options['woocom_thankyou']) && current_filter() == 'woocommerce_thankyou' || current_filter() == 'bp_before_group_header' && isset($this->options['bp_group'])) {
             if (in_array(current_filter(), array('bbp_template_before_single_topic', 'bbp_template_before_lead_topic', 'bbp_template_before_single_forum', 'bbp_template_after_single_topic', 'bbp_template_after_lead_topic', 'bbp_template_after_single_forum', 'woocommerce_after_shop_loop_item', 'woocommerce_share', 'woocommerce_thankyou', 'bp_before_group_header'))) {
                 echo '<div style="clear:both"></div>' . $horizontal_div . '<div style="clear:both"></div>';
             } else {
                 if (isset($this->options['top']) && isset($this->options['bottom'])) {
                     $content = $horizontal_div . '<br/>' . $content . '<br/>' . $horizontal_div;
                 } else {
                     if (isset($this->options['top'])) {
                         $content = $horizontal_div . $content;
                     } elseif (isset($this->options['bottom'])) {
                         $content = $content . $horizontal_div;
                     }
                 }
             }
         } elseif (count($post_types)) {
             foreach ($post_types as $post_type) {
                 if (isset($this->options[$post_type]) && (is_single() || is_page()) && isset($post->post_type) && $post->post_type == $post_type) {
                     if (isset($this->options['top']) && isset($this->options['bottom'])) {
                         $content = $horizontal_div . '<br/>' . $content . '<br/>' . $horizontal_div;
                     } else {
                         if (isset($this->options['top'])) {
                             $content = $horizontal_div . $content;
                         } elseif (isset($this->options['bottom'])) {
                             $content = $content . $horizontal_div;
                         }
                     }
                 }
             }
         }
     }
     if (isset($this->options['vertical_enable']) && !(isset($sharing_meta['vertical_sharing']) && $sharing_meta['vertical_sharing'] == 1 && (!is_front_page() || is_front_page() && 'page' == get_option('show_on_front')))) {
         $post_id = $post->ID;
         $post_url = get_permalink($post->ID);
         if ($this->options['vertical_target_url'] == 'default') {
             $post_url = get_permalink($post->ID);
             if ($post_url == '') {
                 $post_url = html_entity_decode(esc_url($this->get_http_protocol() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]));
             }
//.........这里部分代码省略.........
开发者ID:navetisyan,项目名称:asatryans,代码行数:101,代码来源:class-sassy-social-share-public.php

示例8: gears_get_activity_stream

 /**
  * @deprecated gears_get_activity_stream
  */
 function gears_get_activity_stream()
 {
     $output = '';
     $output .= '<li class="' . bp_get_activity_css_class() . '" id="activity-' . bp_get_activity_id() . '">';
     $output .= '<div class="activity-avatar">';
     $output .= '<a class="gears-activity-avatar" title="' . __('View Profile', 'gears') . '" href="' . bp_get_activity_user_link() . '">';
     $output .= bp_get_activity_avatar();
     $output .= '</a>';
     $output .= '</div>';
     // activity content
     $output .= '<div class="activity-content">';
     $output .= '<div class="activity-header">';
     $output .= bp_get_activity_action();
     $output .= '</div>';
     $output .= '<div class="activity-inner">';
     if (bp_activity_has_content()) {
         $output .= bp_get_activity_content_body();
     }
     $output .= '</div>';
     do_action('bp_activity_entry_content');
     $output .= '<div class="activity-meta">';
     if (bp_get_activity_type() == 'activity_comment') {
         $output .= '<a href="' . bp_get_activity_thread_permalink() . '" class="view bp-secondary-action" title="' . __('View Conversation', 'gears') . '">' . __('View Conversation', 'gears') . '</a>';
     }
     if (is_user_logged_in()) {
         if (bp_activity_can_favorite()) {
             if (!bp_get_activity_is_favorite()) {
                 $output .= '<a href="' . bp_get_activity_favorite_link() . '" class="fav bp-secondary-action" title="' . esc_attr(__('Mark as Favorite', 'gears')) . '">' . __('Favorite', 'gears') . '</a>';
             } else {
                 $output .= '<a href="' . bp_get_activity_unfavorite_link() . '" class="unfav bp-secondary-action" title="' . esc_attr(__('Remove Favorite', 'gears')) . '">' . __('Remove Favorite', 'gears') . '</a>';
             }
         }
         if (bp_activity_user_can_delete()) {
             $output .= bp_get_activity_delete_link();
         }
         do_action('bp_activity_entry_meta');
     }
     $output .= '</div>';
     if (bp_get_activity_type() == 'activity_comment') {
         $output .= '<a href="' . bp_get_activity_thread_permalink() . '" class="view bp-secondary-action" title="' . __('View Conversation', 'gears') . '">' . __('View Conversation', 'gears');
     }
     // end bp_get_activity_type()
     $output .= '</div>';
     // end activity content
     $output .= '</li>';
     return $output;
 }
开发者ID:poweronio,项目名称:mbsite,代码行数:50,代码来源:library.php

示例9: printf

	</div>

	<div class="acomment-content">
		<?php 
/* translators: 1: user profile link, 2: user name, 3: activity permalink, 3: activity timestamp */
printf(__('<strong><a href="%1$s">%2$s</a></strong> ', 'buddypress'), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded());
?>
		<?php 
bp_activity_comment_content();
?>

			<div class="acomment-options">
		
				<?php 
/* translators: 1: user profile link, 2: user name, 3: activity permalink, 3: activity timestamp */
printf(__('<span class="time-since">%4$s</span>', 'buddypress'), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded());
?>
		
				<?php 
if (is_user_logged_in() && bp_activity_can_comment_reply(bp_activity_current_comment())) {
    ?>
		
					&middot; <a href="#acomment-<?php 
    bp_activity_comment_id();
    ?>
" class="acomment-reply bp-primary-action" id="acomment-reply-<?php 
    bp_activity_id();
    ?>
-from-<?php 
    bp_activity_comment_id();
    ?>
开发者ID:par-orillonsoft,项目名称:Wishmagnet,代码行数:31,代码来源:comment.php

示例10: 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();
    ?>
开发者ID:jason-herndon,项目名称:bas-intranet,代码行数:31,代码来源:comment.php

示例11: BuddystreamShareButton

function BuddystreamShareButton()
{
    $buddyStreamExtensions = new BuddyStreamExtensions();
    $shares = array();
    foreach ($buddyStreamExtensions->getExtensionsConfigs() as $extension) {
        if (get_site_option("buddystream_" . $extension['name'] . "_share") == "on") {
            $shares[] = $extension['name'];
        }
    }
    $shares = implode(',', $shares);
    echo '<a href="' . BP_BUDDYSTREAM_URL . '/extensions/default/templates/ShareBox.php?content=' . urlencode(strip_tags(bp_get_activity_content_body())) . '&link=' . urlencode(bp_get_activity_thread_permalink()) . '&shares=' . $shares . ' " class="bs_lightbox button item-button">Sharebox!</a>';
}
开发者ID:BonoboDesigns,项目名称:buddystream,代码行数:12,代码来源:BuddyStreamCore.php

示例12: handle_buddypress_activity_integration

 function handle_buddypress_activity_integration()
 {
     if ($this->check_applicability_module('buddypress')) {
         $activity_type = bp_get_activity_type();
         $activity_link = bp_get_activity_thread_permalink();
         $activity_title = bp_get_activity_feed_item_title();
         printf('%1$s<div style="clear: both;"></div>', $this->generate_share_buttons('buddypress', 'share', array('only_share' => false, 'post_type' => 'buddypress', 'url' => $activity_link, 'title' => $activity_title)));
     }
 }
开发者ID:JSreactor,项目名称:MarketCrater.com,代码行数:9,代码来源:essb-core.php

示例13: bp_activity_thread_permalink

/**
 * Output the activity thread permalink.
 *
 * @since 1.2.0
 *
 */
function bp_activity_thread_permalink()
{
    echo esc_url(bp_get_activity_thread_permalink());
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:10,代码来源:bp-activity-template.php

示例14: buddyboss_pics_read_content_filter

/**
 * This filters pics content, when reading an item it will convert it to use pics language
 *
 * @since BuddyBoss 2.0
 */
function buddyboss_pics_read_content_filter($filter)
{
    global $buddyboss_pics_img_size, $activities_template;
    $curr_id = $activities_template->current_activity;
    $act_id = (int) $activities_template->activities[$curr_id]->id;
    // Check for activity ID in $_POST if this is a single
    // activity request from a [read more] action
    if ($act_id === 0 && !empty($_POST['activity_id'])) {
        $activity_array = bp_activity_get_specific(array('activity_ids' => $_POST['activity_id'], 'display_comments' => 'stream'));
        $activity = !empty($activity_array['activities'][0]) ? $activity_array['activities'][0] : false;
        $act_id = (int) $activity->id;
    }
    // This should never happen, but if it does, bail.
    if ($act_id === 0) {
        return $filter;
    }
    $buddyboss_pics_aid = bp_activity_get_meta($act_id, 'buddyboss_pics_aid');
    // Support for legacy BuddyBoss (we used to store meta keys with bboss_ before normalizing)
    if (!$buddyboss_pics_aid) {
        $buddyboss_pics_aid = bp_activity_get_meta($act_id, 'bboss_pics_aid');
    }
    $img_size = is_active_sidebar('Profile') ? 'buddyboss_pic_med' : 'buddyboss_pic_wide';
    $image = wp_get_attachment_image_src($buddyboss_pics_aid, $img_size);
    if (!empty($image) && is_array($image) && count($image) > 2) {
        $src = $image[0];
        $w = $image[1];
        $h = $image[2];
        $full = wp_get_attachment_image_src($buddyboss_pics_aid, 'full');
        $width_markup = $w > 0 ? ' width="' . $w . '"' : '';
        if ($full !== false && is_array($full) && count($full) > 2) {
            $filter .= '<a class="buddyboss-pics-photo-wrap" href="' . $full[0] . '">';
            $filter .= '<img data-permalink="' . bp_get_activity_thread_permalink() . '" class="buddyboss-pics-photo" src="' . $src . '"' . $width_markup . ' /></a>';
        } else {
            $filter .= '<img data-permalink="' . bp_get_activity_thread_permalink() . '" class="buddyboss-pics-photo" src="' . $src . '"' . $width_markup . ' /></a>';
        }
    }
    return $filter;
}
开发者ID:tvolmari,项目名称:hammydowns,代码行数:43,代码来源:buddyboss-pics-loader.php

示例15: the_champ_render_sharing

/**
 * Enable sharing interface at selected areas.
 */
function the_champ_render_sharing($content)
{
    global $post;
    // hook to bypass sharing
    $disable = apply_filters('the_champ_bypass_sharing', $post, $content);
    // if $disable value is 1, return content without sharing interface
    if ($disable === 1) {
        return $content;
    }
    $sharingMeta = get_post_meta($post->ID, '_the_champ_meta', true);
    global $theChampSharingOptions, $theChampCounterOptions;
    $sharingBpActivity = false;
    $counterBpActivity = false;
    if (current_filter() == 'bp_activity_entry_meta') {
        if (isset($theChampSharingOptions['bp_activity'])) {
            $sharingBpActivity = true;
        }
        if (isset($theChampCounterOptions['bp_activity'])) {
            $counterBpActivity = true;
        }
    }
    $post_types = get_post_types(array('public' => true), 'names', 'and');
    $post_types = array_diff($post_types, array('post', 'page'));
    if (isset($theChampCounterOptions['enable'])) {
        //counter interface
        if (isset($theChampCounterOptions['hor_enable']) && !(isset($sharingMeta['counter']) && $sharingMeta['counter'] == 1 && (!is_front_page() || is_front_page() && 'page' == get_option('show_on_front')))) {
            $postId = $post->ID;
            if ($counterBpActivity) {
                $counterPostUrl = bp_get_activity_thread_permalink();
            } elseif (isset($theChampCounterOptions['horizontal_target_url'])) {
                if ($theChampCounterOptions['horizontal_target_url'] == 'default') {
                    $counterPostUrl = get_permalink($post->ID);
                    if ($counterPostUrl == '') {
                        $counterPostUrl = html_entity_decode(esc_url(the_champ_get_http() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]));
                    }
                } elseif ($theChampCounterOptions['horizontal_target_url'] == 'home') {
                    $counterPostUrl = site_url();
                    $postId = 0;
                } elseif ($theChampCounterOptions['horizontal_target_url'] == 'custom') {
                    $counterPostUrl = isset($theChampCounterOptions['horizontal_target_url_custom']) ? trim($theChampCounterOptions['horizontal_target_url_custom']) : get_permalink($post->ID);
                    $postId = 0;
                }
            } else {
                $counterPostUrl = get_permalink($post->ID);
            }
            $counterUrl = $counterPostUrl;
            if (isset($theChampCounterOptions['use_shortlinks']) && function_exists('wp_get_shortlink')) {
                $counterUrl = wp_get_shortlink();
                // if bit.ly integration enabled, generate bit.ly short url
            } elseif (isset($theChampCounterOptions['bitly_enable']) && isset($theChampCounterOptions['bitly_username']) && isset($theChampCounterOptions['bitly_username']) && $theChampCounterOptions['bitly_username'] != '' && isset($theChampCounterOptions['bitly_key']) && $theChampCounterOptions['bitly_key'] != '') {
                $shortUrl = the_champ_generate_counter_bitly_url($counterPostUrl, $postId);
                if ($shortUrl) {
                    $counterUrl = $shortUrl;
                }
            }
            $sharingDiv = the_champ_prepare_counter_html($counterPostUrl, 'horizontal', $counterUrl);
            $sharingContainerStyle = '';
            $sharingTitleStyle = 'style="font-weight:bold"';
            if (isset($theChampCounterOptions['hor_counter_alignment'])) {
                if ($theChampCounterOptions['hor_counter_alignment'] == 'right') {
                    $sharingContainerStyle = 'style="float: right"';
                } elseif ($theChampCounterOptions['hor_counter_alignment'] == 'center') {
                    $sharingContainerStyle = 'style="float: right;position: relative;left: -50%;text-align: left;"';
                    $sharingTitleStyle = 'style="font-weight: bold;list-style: none;position: relative;left: 50%;"';
                }
            }
            $horizontalDiv = "<div style='clear: both'></div><div " . $sharingContainerStyle . " class='the_champ_counter_container the_champ_horizontal_counter'><div " . $sharingTitleStyle . ">" . ucfirst($theChampCounterOptions['title']) . "</div>" . $sharingDiv . "</div><div style='clear: both'></div>";
            if ($counterBpActivity) {
                echo $horizontalDiv;
            }
            // show horizontal counter
            if (isset($theChampCounterOptions['home']) && is_front_page() || isset($theChampCounterOptions['category']) && is_category() || isset($theChampCounterOptions['archive']) && is_archive() || isset($theChampCounterOptions['post']) && is_single() && isset($post->post_type) && $post->post_type == 'post' || isset($theChampCounterOptions['page']) && is_page() && isset($post->post_type) && $post->post_type == 'page' || isset($theChampCounterOptions['excerpt']) && (is_home() || current_filter() == 'the_excerpt') || isset($theChampCounterOptions['bb_reply']) && current_filter() == 'bbp_get_reply_content' || isset($theChampCounterOptions['bb_forum']) && (isset($theChampCounterOptions['top']) && current_filter() == 'bbp_template_before_single_forum' || isset($theChampCounterOptions['bottom']) && current_filter() == 'bbp_template_after_single_forum') || isset($theChampCounterOptions['bb_topic']) && (isset($theChampCounterOptions['top']) && in_array(current_filter(), array('bbp_template_before_single_topic', 'bbp_template_before_lead_topic')) || isset($theChampCounterOptions['bottom']) && in_array(current_filter(), array('bbp_template_after_single_topic', 'bbp_template_after_lead_topic'))) || isset($theChampCounterOptions['woocom_shop']) && current_filter() == 'woocommerce_after_shop_loop_item' || isset($theChampCounterOptions['woocom_product']) && current_filter() == 'woocommerce_share' || isset($theChampCounterOptions['woocom_thankyou']) && current_filter() == 'woocommerce_thankyou' || current_filter() == 'bp_before_group_header' && isset($theChampCounterOptions['bp_group'])) {
                if (in_array(current_filter(), array('bbp_template_before_single_topic', 'bbp_template_before_lead_topic', 'bbp_template_before_single_forum', 'bbp_template_after_single_topic', 'bbp_template_after_lead_topic', 'bbp_template_after_single_forum', 'woocommerce_after_shop_loop_item', 'woocommerce_share', 'woocommerce_thankyou', 'bp_before_group_header'))) {
                    echo '<div style="clear:both"></div>' . $horizontalDiv . '<div style="clear:both"></div>';
                } else {
                    if (isset($theChampCounterOptions['top']) && isset($theChampCounterOptions['bottom'])) {
                        $content = $horizontalDiv . '<br/>' . $content . '<br/>' . $horizontalDiv;
                    } else {
                        if (isset($theChampCounterOptions['top'])) {
                            $content = $horizontalDiv . $content;
                        } elseif (isset($theChampCounterOptions['bottom'])) {
                            $content = $content . $horizontalDiv;
                        }
                    }
                }
            } elseif (count($post_types)) {
                foreach ($post_types as $post_type) {
                    if (isset($theChampCounterOptions[$post_type]) && (is_single() || is_page()) && isset($post->post_type) && $post->post_type == $post_type) {
                        if (isset($theChampCounterOptions['top']) && isset($theChampCounterOptions['bottom'])) {
                            $content = $horizontalDiv . '<br/>' . $content . '<br/>' . $horizontalDiv;
                        } else {
                            if (isset($theChampCounterOptions['top'])) {
                                $content = $horizontalDiv . $content;
                            } elseif (isset($theChampCounterOptions['bottom'])) {
                                $content = $content . $horizontalDiv;
                            }
                        }
//.........这里部分代码省略.........
开发者ID:supahseppe,项目名称:path-of-gaming,代码行数:101,代码来源:social_sharing.php


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