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


PHP bp_get_activity_root_slug函数代码示例

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


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

示例1: bp_reshare_replace_activity_delete_link

function bp_reshare_replace_activity_delete_link($link)
{
    // if activity type is a reshare, then we replace the delete link behavior
    if (bp_get_activity_type() == 'reshare_update') {
        $class = 'delete-reshare';
        $action_url = wp_nonce_url(bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/?delete_reshare=' . bp_get_activity_id(), '_reshare_delete');
        $link = '<a href="' . $action_url . '" class="button item-button bp-secondary-action ' . $class . ' confirm" rel="nofollow">' . __('Delete', 'bp-reshare') . '</a>';
    }
    return apply_filters('bp_reshare_replace_activity_delete_link', $link);
}
开发者ID:KristianI,项目名称:bp-reshare,代码行数:10,代码来源:bp-reshare-filters.php

示例2: bp_reshare_add_reshare_button

function bp_reshare_add_reshare_button()
{
    global $bp;
    if (!is_user_logged_in()) {
        return false;
    }
    $activity_types_resharable = bp_reshare_activity_types();
    if (!in_array(bp_get_activity_type(), $activity_types_resharable)) {
        return false;
    }
    if (bp_reshare_activity_is_hidden()) {
        return false;
    }
    if (bp_reshare_is_user_profile_reshares() && $bp->displayed_user->id != $bp->loggedin_user->id) {
        return false;
    }
    $activity_first_id = bp_get_activity_id();
    if ('reshare_update' == bp_get_activity_type()) {
        $activity_first_id = bp_get_activity_secondary_item_id();
    }
    $rs_count = bp_activity_get_meta($activity_first_id, 'reshared_count');
    $rs_count = !empty($rs_count) ? $rs_count : 0;
    if ($bp->loggedin_user->id == bp_get_activity_user_id() || bp_reshare_user_did_reshared($activity_first_id)) {
        $reshared_class = 'reshared';
    }
    $action_url = wp_nonce_url(bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/?to_reshare=' . $activity_first_id, '_reshare_update');
    if ($_POST['scope'] == 'reshares' || bp_reshare_is_user_profile_reshares() || bp_is_activity_component() && !bp_displayed_user_id() && $_COOKIE['bp-activity-scope'] == 'reshares') {
        $extra_class = 'unshare';
        $action_url = wp_nonce_url(bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/?delete_reshare=' . bp_get_activity_id(), '_reshare_delete');
    }
    ?>
	
	<a href="<?php 
    echo $action_url;
    ?>
" class="button bp-primary-action bp-agu-reshare" id="bp-agu-reshare-<?php 
    bp_activity_id();
    ?>
" rel="<?php 
    echo $activity_first_id;
    ?>
"><span class="bp-agu-reshare-img <?php 
    echo $reshared_class . ' ' . $extra_class;
    ?>
"></span><span class="rs-count"><?php 
    echo $rs_count;
    ?>
</span></a>
	<?php 
}
开发者ID:KristianI,项目名称:bp-reshare,代码行数:50,代码来源:bp-reshare-screens.php

示例3: bp_get_sitewide_activity_feed_link

/**
 * Returns the sitewide activity feed link
 *
 * @since 1.0.0
 *
 * @uses home_url()
 * @uses bp_get_activity_root_slug()
 * @uses apply_filters() To call the 'bp_get_sitewide_activity_feed_link' hook
 *
 * @return string The sitewide activity feed link
 */
function bp_get_sitewide_activity_feed_link()
{
    return apply_filters('bp_get_sitewide_activity_feed_link', home_url(bp_get_activity_root_slug() . '/feed/'));
}
开发者ID:hornetalcala,项目名称:trunk,代码行数:15,代码来源:bp-activity-template.php

示例4: column_comment

 /**
  * Content column, and "quick admin" rollover actions.
  *
  * Called "comment" in the CSS so we can re-use some WP core CSS.
  *
  * @param array $item A singular item (one full row)
  * @see WP_List_Table::single_row_columns()
  * @since 1.6
  */
 function column_comment($item)
 {
     // Determine what type of item (row) we're dealing with
     if ($item['is_spam']) {
         $item_status = 'spam';
     } else {
         $item_status = 'all';
     }
     // Preorder items: Reply | Edit | Spam | Delete Permanently
     $actions = array('reply' => '', 'edit' => '', 'spam' => '', 'unspam' => '', 'delete' => '');
     // Build actions URLs
     $base_url = network_admin_url('admin.php?page=bp-activity&amp;aid=' . $item['id']);
     $spam_nonce = esc_html('_wpnonce=' . wp_create_nonce('spam-activity_' . $item['id']));
     $delete_url = $base_url . "&amp;action=delete&amp;{$spam_nonce}";
     $edit_url = $base_url . '&amp;action=edit';
     $ham_url = $base_url . "&amp;action=ham&amp;{$spam_nonce}";
     $spam_url = $base_url . "&amp;action=spam&amp;{$spam_nonce}";
     // Rollover actions
     // Reply - javascript only; implemented by AJAX.
     if ('spam' != $item_status) {
         $actions['reply'] = sprintf('<a href="#" class="reply hide-if-no-js">%s</a>', __('Reply', 'buddypress'));
         // Edit
         $actions['edit'] = sprintf('<a href="%s">%s</a>', $edit_url, __('Edit', 'buddypress'));
     }
     // Spam/unspam
     if ('spam' == $item_status) {
         $actions['unspam'] = sprintf('<a href="%s">%s</a>', $ham_url, __('Not Spam', 'buddypress'));
     } else {
         $actions['spam'] = sprintf('<a href="%s">%s</a>', $spam_url, __('Spam', 'buddypress'));
     }
     // Delete
     $actions['delete'] = sprintf('<a href="%s" onclick="%s">%s</a>', $delete_url, "javascript:return confirm('" . esc_js(__('Are you sure?', 'buddypress')) . "'); ", __('Delete Permanently', 'buddypress'));
     // Start timestamp
     echo '<div class="submitted-on">';
     // Other plugins can filter which actions are shown
     $actions = apply_filters('bp_activity_admin_comment_row_actions', array_filter($actions), $item);
     /* translators: 2: activity admin ui date/time */
     printf(__('Submitted on <a href="%1$s">%2$s at %3$s</a>', 'buddypress'), bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $item['id'] . '/', date_i18n(get_option('date_format'), strtotime($item['date_recorded'])), date_i18n(get_option('time_format'), strtotime($item['date_recorded'])));
     // End timestamp
     echo '</div>';
     // Get activity content - if not set, use the action
     if (!empty($item['content'])) {
         $content = apply_filters_ref_array('bp_get_activity_content_body', array($item['content']));
     } else {
         $content = apply_filters_ref_array('bp_get_activity_action', array($item['action']));
     }
     echo $content . ' ' . $this->row_actions($actions);
 }
开发者ID:adisonc,项目名称:MaineLearning,代码行数:57,代码来源:bp-activity-admin.php

示例5: bp_dtheme_activity_template_loader

/**
 * Load the activity loop template when activity is requested via AJAX,
 *
 * @return string JSON object containing 'contents' (output of the template loop for the Activity component) and 'feed_url' (URL to the relevant RSS feed).
 * @since BuddyPress (1.2)
 */
function bp_dtheme_activity_template_loader()
{
    // Bail if not a POST action
    if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
        return;
    }
    $scope = '';
    if (!empty($_POST['scope'])) {
        $scope = $_POST['scope'];
    }
    // We need to calculate and return the feed URL for each scope
    switch ($scope) {
        case 'friends':
            $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/friends/feed/';
            break;
        case 'groups':
            $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/groups/feed/';
            break;
        case 'favorites':
            $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/feed/';
            break;
        case 'mentions':
            $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/feed/';
            bp_activity_clear_new_mentions(bp_loggedin_user_id());
            break;
        default:
            $feed_url = home_url(bp_get_activity_root_slug() . '/feed/');
            break;
    }
    // Buffer the loop in the template to a var for JS to spit out.
    ob_start();
    locate_template(array('activity/activity-loop.php'), true);
    $result['contents'] = ob_get_contents();
    $result['feed_url'] = apply_filters('bp_dtheme_activity_feed_url', $feed_url, $scope);
    ob_end_clean();
    exit(json_encode($result));
}
开发者ID:raminjan,项目名称:logicalbones_hug,代码行数:43,代码来源:ajax.php

示例6: bp_activity_get_permalink

/**
 * Get the permalink for a single activity item.
 *
 * When only the $activity_id param is passed, BP has to instantiate a new
 * BP_Activity_Activity object. To save yourself some processing overhead,
 * be sure to pass the full $activity_obj parameter as well, if you already
 * have it available.
 *
 * @since BuddyPress (1.2.0)
 *
 * @uses bp_get_root_domain()
 * @uses bp_get_activity_root_slug()
 * @uses apply_filters_ref_array() To call the 'bp_activity_get_permalink' hook.
 *
 * @param int $activity_id The unique id of the activity object.
 * @param object $activity_obj Optional. The activity object.
 * @return string $link Permalink for the activity item.
 */
function bp_activity_get_permalink($activity_id, $activity_obj = false)
{
    if (empty($activity_obj)) {
        $activity_obj = new BP_Activity_Activity($activity_id);
    }
    if (isset($activity_obj->current_comment)) {
        $activity_obj = $activity_obj->current_comment;
    }
    if ('new_blog_post' == $activity_obj->type || 'new_blog_comment' == $activity_obj->type || 'new_forum_topic' == $activity_obj->type || 'new_forum_post' == $activity_obj->type) {
        $link = $activity_obj->primary_link;
    } else {
        if ('activity_comment' == $activity_obj->type) {
            $link = bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $activity_obj->item_id . '/';
        } else {
            $link = bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $activity_obj->id . '/';
        }
    }
    return apply_filters_ref_array('bp_activity_get_permalink', array($link, &$activity_obj));
}
开发者ID:eresyyl,项目名称:mk,代码行数:37,代码来源:bp-activity-functions.php

示例7: site_url

									<ul class="submenu">
									<?php 
    if ('activity' != bp_dtheme_page_on_front() && bp_is_active('activity')) {
        ?>
										<li<?php 
        if (bp_is_activity_component() && !bp_is_user_activity()) {
            ?>
 class="selected"<?php 
        }
        ?>
>
											<a href="<?php 
        echo site_url();
        ?>
/<?php 
        echo bp_get_activity_root_slug();
        ?>
/" title="<?php 
        _e('Activity', 'framemarket');
        ?>
"><?php 
        _e('Activity', 'framemarket');
        ?>
</a>
										</li>
									<?php 
    }
    ?>

									<li<?php 
    if (bp_is_members_component() || bp_is_user()) {
开发者ID:JeffreyBue,项目名称:jb,代码行数:31,代码来源:header.php

示例8: bp_activity_get_permalink

/**
 * Get the permalink for a single activity item.
 *
 * When only the $activity_id param is passed, BP has to instantiate a new
 * BP_Activity_Activity object. To save yourself some processing overhead,
 * be sure to pass the full $activity_obj parameter as well, if you already
 * have it available.
 *
 * @since 1.2.0
 *
 * @uses bp_get_root_domain()
 * @uses bp_get_activity_root_slug()
 * @uses apply_filters_ref_array() To call the 'bp_activity_get_permalink' hook.
 *
 * @param int         $activity_id  The unique id of the activity object.
 * @param object|bool $activity_obj Optional. The activity object.
 * @return string $link Permalink for the activity item.
 */
function bp_activity_get_permalink($activity_id, $activity_obj = false)
{
    $bp = buddypress();
    if (empty($activity_obj)) {
        $activity_obj = new BP_Activity_Activity($activity_id);
    }
    if (isset($activity_obj->current_comment)) {
        $activity_obj = $activity_obj->current_comment;
    }
    $use_primary_links = array('new_blog_post', 'new_blog_comment', 'new_forum_topic', 'new_forum_post');
    if (!empty($bp->activity->track)) {
        $use_primary_links = array_merge($use_primary_links, array_keys($bp->activity->track));
    }
    if (false !== array_search($activity_obj->type, $use_primary_links)) {
        $link = $activity_obj->primary_link;
    } else {
        if ('activity_comment' == $activity_obj->type) {
            $link = bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $activity_obj->item_id . '/';
        } else {
            $link = bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $activity_obj->id . '/';
        }
    }
    /**
     * Filters the activity permalink for the specified activity item.
     *
     * @since 1.2.0
     *
     * @param array $array Array holding activity permalink and activity item object.
     */
    return apply_filters_ref_array('bp_activity_get_permalink', array($link, &$activity_obj));
}
开发者ID:humanmade,项目名称:BuddyPress,代码行数:49,代码来源:bp-activity-functions.php

示例9: bp_activity_screen_single_activity_permalink

/**
 * Reset the logged-in user's new mentions data when he visits his mentions screen
 *
 * @since BuddyPress (1.2)
 *
 * @global object $bp BuddyPress global settings
 * @uses bp_is_activity_component()
 * @uses bp_activity_get_specific()
 * @uses bp_current_action()
 * @uses bp_action_variables()
 * @uses bp_do_404()
 * @uses bp_is_active()
 * @uses groups_get_group()
 * @uses groups_is_user_member()
 * @uses apply_filters_ref_array() To call the 'bp_activity_permalink_access' hook
 * @uses do_action() To call the 'bp_activity_screen_single_activity_permalink' hook
 * @uses bp_core_add_message()
 * @uses is_user_logged_in()
 * @uses bp_core_redirect()
 * @uses site_url()
 * @uses esc_url()
 * @uses bp_get_root_domain()
 * @uses bp_get_activity_root_slug()
 * @uses bp_core_load_template()
 * @uses apply_filters() To call the 'bp_activity_template_profile_activity_permalink' hook
 */
function bp_activity_screen_single_activity_permalink()
{
    global $bp;
    // No displayed user or not viewing activity component
    if (!bp_is_activity_component()) {
        return false;
    }
    if (!bp_current_action() || !is_numeric(bp_current_action())) {
        return false;
    }
    // Get the activity details
    $activity = bp_activity_get_specific(array('activity_ids' => bp_current_action(), 'show_hidden' => true, 'spam' => 'ham_only'));
    // 404 if activity does not exist
    if (empty($activity['activities'][0]) || bp_action_variables()) {
        bp_do_404();
        return;
    } else {
        $activity = $activity['activities'][0];
    }
    // Default access is true
    $has_access = true;
    // If activity is from a group, do an extra cap check
    if (isset($bp->groups->id) && $activity->component == $bp->groups->id) {
        // Activity is from a group, but groups is currently disabled
        if (!bp_is_active('groups')) {
            bp_do_404();
            return;
        }
        // Check to see if the group is not public, if so, check the
        // user has access to see this activity
        if ($group = groups_get_group(array('group_id' => $activity->item_id))) {
            // Group is not public
            if ('public' != $group->status) {
                // User is not a member of group
                if (!groups_is_user_member(bp_loggedin_user_id(), $group->id)) {
                    $has_access = false;
                }
            }
        }
    }
    // Allow access to be filtered
    $has_access = apply_filters_ref_array('bp_activity_permalink_access', array($has_access, &$activity));
    // Allow additional code execution
    do_action('bp_activity_screen_single_activity_permalink', $activity, $has_access);
    // Access is specifically disallowed
    if (false === $has_access) {
        // User feedback
        bp_core_add_message(__('You do not have access to this activity.', 'buddypress'), 'error');
        // Redirect based on logged in status
        is_user_logged_in() ? bp_core_redirect(bp_loggedin_user_domain()) : bp_core_redirect(site_url('wp-login.php?redirect_to=' . esc_url(bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . bp_current_action() . '/')));
    }
    bp_core_load_template(apply_filters('bp_activity_template_profile_activity_permalink', 'members/single/activity/permalink'));
}
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:79,代码来源:bp-activity-screens.php

示例10: about_screen

        /**
         * Output the about screen
         *
         * @since BuddyPress (1.7)
         */
        public function about_screen()
        {
            global $wp_rewrite;
            $is_new_install = !empty($_GET['is_new_install']);
            $pretty_permalinks_enabled = !empty($wp_rewrite->permalink_structure);
            list($display_version) = explode('-', bp_get_version());
            ?>

		<div class="wrap about-wrap">
			<h1><?php 
            printf(__('Welcome to BuddyPress %s', 'buddypress'), $display_version);
            ?>
</h1>
			<div class="about-text">
				<?php 
            if ($is_new_install) {
                ?>
					<?php 
                printf(__('BuddyPress %s is our safest, fastest, most flexible version ever.', 'buddypress'), $display_version);
                ?>
				<?php 
            } else {
                ?>
					<?php 
                printf(__('Thank you for updating! BuddyPress %s is our safest, fastest, most flexible version ever.', 'buddypress'), $display_version);
                ?>
				<?php 
            }
            ?>
			</div>
			<div class="bp-badge"><?php 
            printf(__('Version %s', 'buddypress'), $display_version);
            ?>
</div>

			<h2 class="nav-tab-wrapper">
				<a class="nav-tab nav-tab-active" href="<?php 
            echo esc_url(bp_get_admin_url(add_query_arg(array('page' => 'bp-about'), 'index.php')));
            ?>
">
					<?php 
            _e('What&#8217;s New', 'buddypress');
            ?>
				</a><a class="nav-tab" href="<?php 
            echo esc_url(bp_get_admin_url(add_query_arg(array('page' => 'bp-credits'), 'index.php')));
            ?>
">
					<?php 
            _e('Credits', 'buddypress');
            ?>
				</a>
			</h2>

			<?php 
            if ($is_new_install) {
                ?>
			<h3><?php 
                _e('Getting Started', 'buddypress');
                ?>
</h3>

				<div class="feature-section">
					<h4><?php 
                _e('Your Default Setup', 'buddypress');
                ?>
</h4>
					<p><?php 
                printf(__('BuddyPress&#8217;s powerful features help your users connect and collaborate. To help get your community started, we&#8217;ve activated two of the most commonly used tools in BP: <strong>Extended Profiles</strong> and <strong>Activity Streams</strong>. See these components in action at the %1$s and %2$s directories, and be sure to spend a few minutes <a href="%3$s">configuring user profiles</a>. Want to explore more of BP&#8217;s features? Visit the <a href="%4$s">Components panel</a>.', 'buddypress'), $pretty_permalinks_enabled ? '<a href="' . trailingslashit(bp_get_root_domain() . '/' . bp_get_members_root_slug()) . '">' . __('Members', 'buddypress') . '</a>' : __('Members', 'buddypress'), $pretty_permalinks_enabled ? '<a href="' . trailingslashit(bp_get_root_domain() . '/' . bp_get_activity_root_slug()) . '">' . __('Activity', 'buddypress') . '</a>' : __('Activity', 'buddypress'), bp_get_admin_url(add_query_arg(array('page' => 'bp-profile-setup'), 'users.php')), bp_get_admin_url(add_query_arg(array('page' => 'bp-components'), $this->settings_page)));
                ?>
</p>

					<h4><?php 
                _e('Community and Support', 'buddypress');
                ?>
</h4>
					<p><?php 
                _e('Looking for help? The <a href="http://codex.buddypress.org/">BuddyPress Codex</a> has you covered, with dozens of user-contributed guides on how to configure and use your BP site. Can&#8217;t find what you need? Stop by <a href="http://buddypress.org/support/">our support forums</a>, where a vibrant community of BuddyPress users and developers is waiting to share tips, show off their sites, talk about the future of BuddyPress, and much more.', 'buddypress');
                ?>
</p>
				</div>

			<?php 
            }
            ?>

			<div class="changelog">
				<h3><?php 
            _e('Improved Theme Integration', 'buddypress');
            ?>
</h3>

				<div class="feature-section">
					<h4><?php 
            _e('Hey, Good Lookin&#8217;', 'buddypress');
            ?>
//.........这里部分代码省略.........
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:101,代码来源:bp-core-admin.php

示例11: _expand_macro

 private function _expand_macro($macro)
 {
     $value = false;
     $user = wp_get_current_user();
     switch ($macro) {
         case 'BP_ACTIVITY_SLUG':
             if (function_exists('bp_get_activity_root_slug')) {
                 $value = bp_get_activity_root_slug();
             }
             break;
         case 'BP_GROUPS_SLUG':
             if (function_exists('bp_get_groups_slug')) {
                 $value = bp_get_groups_slug();
             }
             break;
         case 'BP_MEMBERS_SLUG':
             if (function_exists('bp_get_members_slug')) {
                 $value = bp_get_members_slug();
             }
             break;
     }
     return apply_filters('logout_redirect-macro_value', $value, $macro);
 }
开发者ID:brycefrees,项目名称:dunia,代码行数:23,代码来源:logout-redirect.php

示例12: wdfb_expand_buddypress_macros

/**
 * Expands some basic supported BuddyPress macros.
 */
function wdfb_expand_buddypress_macros($str)
{
    if (!defined('BP_VERSION')) {
        return $str;
    }
    if (function_exists('bp_get_activity_root_slug')) {
        $str = preg_replace('/\\bBP_ACTIVITY_SLUG\\b/', bp_get_activity_root_slug(), $str);
    }
    if (function_exists('bp_get_groups_slug')) {
        $str = preg_replace('/\\bBP_GROUPS_SLUG\\b/', bp_get_groups_slug(), $str);
    }
    if (function_exists('bp_get_members_slug')) {
        $str = preg_replace('/\\bBP_MEMBERS_SLUG\\b/', bp_get_members_slug(), $str);
    }
    return $str;
}
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:19,代码来源:wdfb_utilities.php

示例13: buddyreshare_activity_filter_action_url

/**
 * Filters the reshare action url if the delete action is possible
 *
 * @package BP Reshare
 * @since    1.0
 * 
 * @param  string $action_url
 * @uses   buddyreshare_can_unshare() to check if the context is good to allow delete action
 * @uses   wp_nonce_url() for security reason
 * @uses   bp_get_root_domain() to get the blog's url
 * @uses   bp_get_activity_root_slug() to get the activity slug
 * @uses   buddyreshare_get_component_slug() to get the component's slug
 * @uses   bp_get_activity_id() to get the activity id [description]
 * @return string $action_url
 */
function buddyreshare_activity_filter_action_url($action_url = '')
{
    if (buddyreshare_can_unshare()) {
        $action_url = wp_nonce_url(bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/' . buddyreshare_get_component_slug() . '/delete/' . bp_get_activity_id() . '/', 'buddyreshare_delete');
    }
    return $action_url;
}
开发者ID:socialray,项目名称:surfied-2-0,代码行数:22,代码来源:filters.php

示例14: bpcustom_activity_template_loader

function bpcustom_activity_template_loader()
{
    global $bp;
    // Bail if not a POST action
    if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
        return;
    }
    bpcustom_setup_components();
    $action = bpcustom_get_current_action();
    $scope = $action;
    // We need to calculate and return the feed URL for each scope
    switch ($scope) {
        case 'friends':
            $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/friends/feed/';
            break;
        case 'groups':
            $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/groups/feed/';
            break;
        case 'favorites':
            $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/favorites/feed/';
            break;
        case 'mentions':
            $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/mentions/feed/';
            bp_activity_clear_new_mentions($bp->loggedin_user->id);
            break;
        default:
            $feed_url = home_url(bp_get_activity_root_slug() . '/feed/');
            break;
    }
    /* Buffer the loop in the template to a var for JS to spit out. */
    ob_start();
    locate_template(array('members/single/activity.php'), true);
    $result = array();
    $result['contents'] = ob_get_contents();
    $result['feed_url'] = apply_filters('bp_dtheme_activity_feed_url', $feed_url, $scope);
    ob_end_clean();
    echo json_encode($result);
}
开发者ID:wesavetheworld,项目名称:bp-default-ajaxed-profile-tab,代码行数:38,代码来源:functions.php

示例15: about_screen

        /**
         * Output the about screen.
         *
         * @since BuddyPress (1.7.0)
         */
        public function about_screen()
        {
            global $wp_rewrite;
            $is_new_install = !empty($_GET['is_new_install']);
            $pretty_permalinks_enabled = !empty($wp_rewrite->permalink_structure);
            $image_base = buddypress()->plugin_url . 'bp-core/images/bp20/';
            list($display_version) = explode('-', bp_get_version());
            ?>

		<div class="wrap about-wrap">
			<h1><?php 
            printf(__('Welcome to BuddyPress %s', 'buddypress'), $display_version);
            ?>
</h1>
			<div class="about-text">
				<?php 
            if ($is_new_install) {
                ?>
					<?php 
                printf(__('It&#8217;s a great time to use BuddyPress! With a focus on speed, admin tools, and developer enhancements, %s is our leanest and most powerful version yet.', 'buddypress'), $display_version);
                ?>
				<?php 
            } else {
                ?>
					<?php 
                printf(__('Thanks for updating! With a focus on speed, admin tools, and developer enhancements, BuddyPress %s is our leanest and most powerful version yet.', 'buddypress'), $display_version);
                ?>
				<?php 
            }
            ?>
			</div>

			<div class="bp-badge"></div>

			<h2 class="nav-tab-wrapper">
				<a class="nav-tab nav-tab-active" href="<?php 
            echo esc_url(bp_get_admin_url(add_query_arg(array('page' => 'bp-about'), 'index.php')));
            ?>
">
					<?php 
            _e('What&#8217;s New', 'buddypress');
            ?>
				</a><a class="nav-tab" href="<?php 
            echo esc_url(bp_get_admin_url(add_query_arg(array('page' => 'bp-credits'), 'index.php')));
            ?>
">
					<?php 
            _e('Credits', 'buddypress');
            ?>
				</a>
			</h2>

			<?php 
            if ($is_new_install) {
                ?>
			<h3><?php 
                _e('Getting Started', 'buddypress');
                ?>
</h3>

				<div class="feature-section">
					<h4><?php 
                _e('Your Default Setup', 'buddypress');
                ?>
</h4>

					<?php 
                if (bp_is_active('members') && bp_is_active('activity') && current_user_can($this->capability)) {
                    ?>
						<p><?php 
                    printf(__('BuddyPress&#8217;s powerful features help your users connect and collaborate. To help get your community started, we&#8217;ve activated two of the most commonly used tools in BP: <strong>Extended Profiles</strong> and <strong>Activity Streams</strong>. See these components in action at the %1$s and %2$s directories, and be sure to spend a few minutes <a href="%3$s">configuring user profiles</a>. Want to explore more of BP&#8217;s features? Visit the <a href="%4$s">Components panel</a>.', 'buddypress'), $pretty_permalinks_enabled ? '<a href="' . trailingslashit(bp_get_root_domain() . '/' . bp_get_members_root_slug()) . '">' . __('Members', 'buddypress') . '</a>' : __('Members', 'buddypress'), $pretty_permalinks_enabled ? '<a href="' . trailingslashit(bp_get_root_domain() . '/' . bp_get_activity_root_slug()) . '">' . __('Activity', 'buddypress') . '</a>' : __('Activity', 'buddypress'), bp_get_admin_url(add_query_arg(array('page' => 'bp-profile-setup'), 'users.php')), bp_get_admin_url(add_query_arg(array('page' => 'bp-components'), $this->settings_page)));
                    ?>
</p>

					<?php 
                } else {
                    ?>
						<p><?php 
                    printf(__('BuddyPress&#8217;s powerful features help your users connect and collaborate. Want to explore BP&#8217;s features? Visit the <a href="%s">Components panel</a>.', 'buddypress'), bp_get_admin_url(add_query_arg(array('page' => 'bp-components'), $this->settings_page)));
                    ?>
</p>

					<?php 
                }
                ?>

					<h4><?php 
                _e('Community and Support', 'buddypress');
                ?>
</h4>
					<p><?php 
                _e('Looking for help? The <a href="http://codex.buddypress.org/">BuddyPress Codex</a> has you covered, with dozens of user-contributed guides on how to configure and use your BP site. Can&#8217;t find what you need? Stop by <a href="http://buddypress.org/support/">our support forums</a>, where a vibrant community of BuddyPress users and developers is waiting to share tips, show off their sites, talk about the future of BuddyPress, and much more.', 'buddypress');
                ?>
</p>
				</div>
//.........这里部分代码省略.........
开发者ID:danielcoats,项目名称:schoolpress,代码行数:101,代码来源:bp-core-admin.php


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