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


PHP bp_get_displayed_user_fullname函数代码示例

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


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

示例1: devb_aawire_translate_whats_new_text

function devb_aawire_translate_whats_new_text($translated_text, $text, $domain)
{
    if ($text == "What's new, %s?" && $domain == 'buddypress' && !bp_is_my_profile() && bp_is_user()) {
        $translated_text = sprintf(__("Write something to %s?", 'buddypress'), bp_get_displayed_user_fullname());
    }
    return $translated_text;
}
开发者ID:poweronio,项目名称:mbsite,代码行数:7,代码来源:bp-activity-as-wire.php

示例2: bp_members_admin_bar_user_admin_menu

/**
 * Adds the User Admin top-level menu to user pages
 *
 * @package BuddyPress
 * @since 1.5
 */
function bp_members_admin_bar_user_admin_menu()
{
    global $bp, $wp_admin_bar;
    // Only show if viewing a user
    if (!bp_is_user()) {
        return false;
    }
    // Don't show this menu to non site admins or if you're viewing your own profile
    if (!current_user_can('edit_users') || bp_is_my_profile()) {
        return false;
    }
    // User avatar
    $avatar = bp_core_fetch_avatar(array('item_id' => $bp->displayed_user->id, 'email' => $bp->displayed_user->userdata->user_email, 'width' => 16, 'height' => 16));
    // Unique ID for the 'My Account' menu
    $bp->user_admin_menu_id = !empty($avatar) ? 'user-admin-with-avatar' : 'user-admin';
    // Add the top-level User Admin button
    $wp_admin_bar->add_menu(array('id' => $bp->user_admin_menu_id, 'title' => $avatar . bp_get_displayed_user_fullname(), 'href' => bp_displayed_user_domain()));
    // User Admin > Edit this user's profile
    $wp_admin_bar->add_menu(array('parent' => $bp->user_admin_menu_id, 'id' => 'edit-profile', 'title' => __("Edit Profile", 'buddypress'), 'href' => bp_get_members_component_link('profile', 'edit')));
    // User Admin > Edit this user's avatar
    $wp_admin_bar->add_menu(array('parent' => $bp->user_admin_menu_id, 'id' => 'change-avatar', 'title' => __("Edit Avatar", 'buddypress'), 'href' => bp_get_members_component_link('profile', 'change-avatar')));
    // User Admin > Spam/unspam
    if (!bp_core_is_user_spammer(bp_displayed_user_id())) {
        $wp_admin_bar->add_menu(array('parent' => $bp->user_admin_menu_id, 'id' => 'spam-user', 'title' => __('Mark as Spammer', 'buddypress'), 'href' => wp_nonce_url(bp_displayed_user_domain() . 'admin/mark-spammer/', 'mark-unmark-spammer'), 'meta' => array('onclick' => 'confirm(" ' . __('Are you sure you want to mark this user as a spammer?', 'buddypress') . '");')));
    } else {
        $wp_admin_bar->add_menu(array('parent' => $bp->user_admin_menu_id, 'id' => 'unspam-user', 'title' => __('Not a Spammer', 'buddypress'), 'href' => wp_nonce_url(bp_displayed_user_domain() . 'admin/unmark-spammer/', 'mark-unmark-spammer'), 'meta' => array('onclick' => 'confirm(" ' . __('Are you sure you want to mark this user as not a spammer?', 'buddypress') . '");')));
    }
    // User Admin > Delete Account
    $wp_admin_bar->add_menu(array('parent' => $bp->user_admin_menu_id, 'id' => 'delete-user', 'title' => __('Delete Account', 'buddypress'), 'href' => wp_nonce_url(bp_displayed_user_domain() . 'admin/delete-user/', 'delete-user'), 'meta' => array('onclick' => 'confirm(" ' . __("Are you sure you want to delete this user's account?", 'buddypress') . '");')));
}
开发者ID:hornetalcala,项目名称:trunk,代码行数:36,代码来源:bp-members-adminbar.php

示例3: bebop_get_feed_description

function bebop_get_feed_description()
{
    global $this_bp_feed;
    if (!empty($this_bp_feed)) {
        return bebop_feed_type() . ' Feed for ' . bp_get_displayed_user_fullname();
    } else {
        return false;
    }
}
开发者ID:adisonc,项目名称:MaineLearning,代码行数:9,代码来源:bebop-feeds.php

示例4: bp_dtheme_js_terms

function bp_dtheme_js_terms()
{
    ?>
<script type="text/javascript">
<?php 
    if (get_option('priority_loading') == 'enable') {
        ?>
head.ready(function() {
<?php 
    }
    ?>
	var bp_terms_my_favs = '<?php 
    _e("My Favorites", "buddypress");
    ?>
';
	var bp_terms_accepted = '<?php 
    _e("Accepted", "buddypress");
    ?>
';
	var bp_terms_rejected = '<?php 
    _e("Rejected", "buddypress");
    ?>
';
	var bp_terms_show_all_comments = '<?php 
    _e("Show all comments for this thread", "buddypress");
    ?>
';
	var bp_terms_show_all = '<?php 
    _e("Show all", "buddypress");
    ?>
';
	var bp_terms_comments = '<?php 
    _e("comments", "buddypress");
    ?>
';
	var bp_terms_close = '<?php 
    _e("Close", "buddypress");
    ?>
';
	var bp_terms_mention_explain = '<?php 
    printf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", "buddypress"), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname()));
    ?>
';
<?php 
    if (get_option('priority_loading') == 'enable') {
        ?>
});
<?php 
    }
    ?>
</script>
<?php 
}
开发者ID:ConceptHaus,项目名称:backup,代码行数:53,代码来源:functions-buddypress.php

示例5: remove_wpseo_from_buddypress

 function remove_wpseo_from_buddypress($title)
 {
     global $bp, $post;
     if (empty($this->bp_pages)) {
         $this->bp_pages = get_option('bp-pages');
     }
     if (function_exists('bp_is_directory') && bp_is_directory() || in_array($post->ID, $this->bp_pages)) {
         $title = sprintf(_x('%s Directory - %s', 'Directory Title format', 'vibe'), ucfirst(bp_current_component()), get_bloginfo('name'));
     }
     if (function_exists('bp_is_user') && bp_is_user()) {
         //$title = sprintf(_x('%1s group - %2s','Member Name',ucfirst(bp_get_displayed_user_fullname()),get_bloginfo('name')));
         $title = ucfirst(bp_get_displayed_user_fullname()) . ' - ' . get_bloginfo('name');
     }
     if (function_exists('bp_is_group') && bp_is_group()) {
         //$title = sprintf(_x('%1s group - %2s','Group Name',ucfirst(bp_get_current_group_name()),get_bloginfo('name')));
         $title = ucfirst(bp_get_current_group_name()) . ' - ' . get_bloginfo('name');
     }
     return $title;
 }
开发者ID:nikitansk,项目名称:devschool,代码行数:19,代码来源:filters.php

示例6: bp_tpack_init

function bp_tpack_init()
{
    global $wp_themes;
    /* Check to make sure the active theme is not bp-default */
    if ('bp-default' == get_option('template')) {
        return false;
    }
    /* Load the default BuddyPress AJAX functions */
    if (!(int) get_option('bp_tpack_disable_js')) {
        require_once BP_PLUGIN_DIR . '/bp-themes/bp-default/_inc/ajax.php';
        /* Load the default BuddyPress javascript */
        wp_enqueue_script('bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array('jquery'));
        // Add words that we need to use in JS to the end of the page so they can be
        // translated and still used.
        $params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'), 'mention_explain' => sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname())));
        wp_localize_script('bp-js', 'BP_DTheme', $params);
    }
    /* Add the wireframe BP page styles */
    if (!(int) get_option('bp_tpack_disable_css')) {
        wp_enqueue_style('bp-css', plugins_url($path = basename(dirname(__FILE__))) . '/bp.css');
    }
}
开发者ID:Nightgunner5,项目名称:Pubcomp-CMS,代码行数:22,代码来源:bp-template-pack.php

示例7: bp_core_action_delete_user

/**
 * Process user deletion requests.
 *
 * Note: No longer called here. See the Settings component.
 */
function bp_core_action_delete_user()
{
    if (!bp_current_user_can('bp_moderate') || bp_is_my_profile() || !bp_displayed_user_id()) {
        return false;
    }
    if (bp_is_current_component('admin') && bp_is_current_action('delete-user')) {
        // Check the nonce
        check_admin_referer('delete-user');
        $errors = false;
        do_action('bp_core_before_action_delete_user', $errors);
        if (bp_core_delete_account(bp_displayed_user_id())) {
            bp_core_add_message(sprintf(__('%s has been deleted from the system.', 'buddypress'), bp_get_displayed_user_fullname()));
        } else {
            bp_core_add_message(sprintf(__('There was an error deleting %s from the system. Please try again.', 'buddypress'), bp_get_displayed_user_fullname()), 'error');
            $errors = true;
        }
        do_action('bp_core_action_delete_user', $errors);
        if ($errors) {
            bp_core_redirect(bp_displayed_user_domain());
        } else {
            bp_core_redirect(bp_loggedin_user_domain());
        }
    }
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:29,代码来源:bp-members-actions.php

示例8: bp_tpack_enqueue_scripts

/**
 * Enqueues BuddyPress JS and related AJAX functions
 *
 * @since 1.2
 */
function bp_tpack_enqueue_scripts()
{
    // Do not enqueue JS if it's disabled
    if (get_option('bp_tpack_disable_js')) {
        return;
    }
    // Add words that we need to use in JS to the end of the page so they can be translated and still used.
    $params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'));
    // BP 1.5+
    if (version_compare(BP_VERSION, '1.3', '>')) {
        // Bump this when changes are made to bust cache
        $version = '20110818';
        $params['view'] = __('View', 'buddypress');
    } else {
        $version = '20110729';
        if (bp_displayed_user_id()) {
            $params['mention_explain'] = sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname()));
        }
    }
    // Enqueue the global JS - Ajax will not work without it
    nxt_enqueue_script('dtheme-ajax-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array('jquery'), $version);
    // Localize the JS strings
    nxt_localize_script('dtheme-ajax-js', 'BP_DTheme', $params);
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:29,代码来源:bpt-functions.php

示例9: bp_displayed_user_fullname

bp_displayed_user_fullname();
?>
 | <?php 
_e('Friends Activity', 'buddypress');
?>
</title>
	<atom:link href="<?php 
self_link();
?>
" rel="self" type="application/rss+xml" />
	<link><?php 
echo bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/feed';
?>
</link>
	<description><?php 
printf(__('%s - Friends Activity Feed', 'buddypress'), bp_get_displayed_user_fullname());
?>
</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 
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:31,代码来源:bp-activity-friends-feed.php

示例10: rt_theme_compat_reset_post

 function rt_theme_compat_reset_post($args = array())
 {
     global $wp_query, $post;
     // Switch defaults if post is set
     global $rtmedia_query;
     if (isset($wp_query->post)) {
         if (isset($rtmedia_query->query) && isset($rtmedia_query->query["media_type"]) && $rtmedia_query->query["media_type"] == "album" && isset($rtmedia_query->media_query["album_id"])) {
             foreach ($rtmedia_query->album as $al) {
                 if ($al->id == $rtmedia_query->media_query["album_id"]) {
                     $wp_query->post = get_post($al->media_id);
                     break;
                 }
             }
         } else {
             if (isset($rtmedia_query->media) && count($rtmedia_query->media) == 1 && $rtmedia_query->media) {
                 $wp_query->post = get_post($rtmedia_query->media[0]->media_id);
             }
         }
         $dummy = wp_parse_args($args, array('ID' => $wp_query->post->ID, 'post_status' => $wp_query->post->post_status, 'post_author' => $wp_query->post->post_author, 'post_parent' => $wp_query->post->post_parent, 'post_type' => 'rtmedia', 'post_date' => $wp_query->post->post_date, 'post_date_gmt' => $wp_query->post->post_date_gmt, 'post_modified' => $wp_query->post->post_modified, 'post_modified_gmt' => $wp_query->post->post_modified_gmt, 'post_content' => $wp_query->post->post_content, 'post_title' => $wp_query->post->post_title, 'post_excerpt' => $wp_query->post->post_excerpt, 'post_content_filtered' => $wp_query->post->post_content_filtered, 'post_mime_type' => $wp_query->post->post_mime_type, 'post_password' => $wp_query->post->post_password, 'post_name' => $wp_query->post->post_name, 'guid' => $wp_query->post->guid, 'menu_order' => $wp_query->post->menu_order, 'pinged' => $wp_query->post->pinged, 'to_ping' => $wp_query->post->to_ping, 'ping_status' => $wp_query->post->ping_status, 'comment_status' => $wp_query->post->comment_status, 'comment_count' => $wp_query->post->comment_count, 'filter' => $wp_query->post->filter, 'is_404' => false, 'is_page' => false, 'is_single' => false, 'is_archive' => false, 'is_tax' => false));
     } else {
         $dummy = wp_parse_args($args, array('ID' => 0, 'post_status' => 'public', 'post_author' => 0, 'post_parent' => 0, 'post_type' => 'bp_member', 'post_date' => 0, 'post_date_gmt' => 0, 'post_modified' => 0, 'post_modified_gmt' => 0, 'post_content' => '', 'post_title' => '', 'post_excerpt' => '', 'post_content_filtered' => '', 'post_mime_type' => '', 'post_password' => '', 'post_name' => '', 'guid' => '', 'menu_order' => 0, 'pinged' => '', 'to_ping' => '', 'ping_status' => '', 'comment_status' => 'closed', 'comment_count' => 0, 'filter' => 'raw', 'is_404' => false, 'is_page' => false, 'is_single' => false, 'is_archive' => false, 'is_tax' => false));
     }
     if (function_exists("bp_is_group")) {
         if (bp_is_group()) {
             $dummy['post_type'] = "bp_group";
             if ("bp-default" != get_option('stylesheet')) {
                 $dummy['post_title'] = '<a href="' . bp_get_group_permalink(groups_get_current_group()) . '">' . bp_get_current_group_name() . '</a>';
             }
         } else {
             $dummy['post_type'] = "bp_member";
             if ("bp-default" != get_option('stylesheet')) {
                 $dummy['post_title'] = '<a href="' . bp_get_displayed_user_link() . '">' . bp_get_displayed_user_fullname() . '</a>';
             }
         }
     } else {
         global $rtmedia_query;
         $dummy['comment_status'] = 'closed';
         if (isset($rtmedia_query->media_query)) {
             if (isset($rtmedia_query->media_query["media_author"])) {
                 $dummy["post_author"] = $rtmedia_query->media_query["media_author"];
             }
             if (isset($rtmedia_query->media_query["id"])) {
                 //var_dump($rtmedia_query);
                 //echo $rtmedia_query->media_query["id"];
             }
         }
     }
     // Bail if dummy post is empty
     if (empty($dummy)) {
         return;
     }
     // Set the $post global
     $post = new WP_Post((object) $dummy);
     // Copy the new post global into the main $wp_query
     $wp_query->post = $post;
     $wp_query->posts = array($post);
     // Prevent comments form from appearing
     $wp_query->post_count = 1;
     $wp_query->is_404 = $dummy['is_404'];
     $wp_query->is_page = $dummy['is_page'];
     $wp_query->is_single = $dummy['is_single'];
     $wp_query->is_archive = $dummy['is_archive'];
     $wp_query->is_tax = $dummy['is_tax'];
     // Clean up the dummy post
     unset($dummy);
     /**
      * Force the header back to 200 status if not a deliberate 404
      *
      * @see http://bbpress.trac.wordpress.org/ticket/1973
      */
     if (!$wp_query->is_404()) {
         status_header(200);
     }
 }
开发者ID:fs-contributor,项目名称:rtMedia,代码行数:74,代码来源:RTMediaRouter.php

示例11: widget

    /**
     * Display the widget.
     *
     * @param array $args Widget arguments.
     * @param array $instance The widget settings, as saved by the user.
     */
    function widget($args, $instance)
    {
        extract($args);
        if (!bp_displayed_user_id()) {
            return;
        }
        $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
        wp_enqueue_script('bp_core_widget_friends-js', buddypress()->plugin_url . "bp-friends/js/widget-friends{$min}.js", array('jquery'), bp_get_version());
        $user_id = bp_displayed_user_id();
        $link = trailingslashit(bp_displayed_user_domain() . bp_get_friends_slug());
        $instance['title'] = sprintf(__('%s&#8217;s Friends', 'buddypress'), bp_get_displayed_user_fullname());
        if (empty($instance['friend_default'])) {
            $instance['friend_default'] = 'active';
        }
        $title = apply_filters('widget_title', $instance['title']);
        echo $before_widget;
        $title = $instance['link_title'] ? '<a href="' . esc_url($link) . '">' . esc_html($title) . '</a>' : esc_html($title);
        echo $before_title . $title . $after_title;
        $members_args = array('user_id' => absint($user_id), 'type' => sanitize_text_field($instance['friend_default']), 'max' => absint($instance['max_friends']), 'populate_extras' => 1);
        ?>

		<?php 
        if (bp_has_members($members_args)) {
            ?>
			<div class="item-options" id="friends-list-options">
				<a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="newest-friends" <?php 
            if ($instance['friend_default'] == 'newest') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Newest', 'buddypress');
            ?>
</a>
				| <a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="recently-active-friends" <?php 
            if ($instance['friend_default'] == 'active') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Active', 'buddypress');
            ?>
</a>
				| <a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="popular-friends" <?php 
            if ($instance['friend_default'] == 'popular') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Popular', 'buddypress');
            ?>
</a>
			</div>

			<ul id="friends-list" class="item-list">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<li class="vcard">
						<div class="item-avatar">
							<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title fn"><a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_name();
//.........这里部分代码省略.........
开发者ID:danielcoats,项目名称:schoolpress,代码行数:101,代码来源:bp-friends-widgets.php

示例12: bp_modify_page_title

/**
 * Filter the page title for BuddyPress pages.
 *
 * @since BuddyPress (1.5.0)
 *
 * @see wp_title()
 * @global object $bp BuddyPress global settings.
 *
 * @param string $title Original page title.
 * @param string $sep How to separate the various items within the page title.
 * @param string $seplocation Direction to display title.
 * @return string New page title.
 */
function bp_modify_page_title( $title, $sep = '', $seplocation = '' ) {
	global $bp;

	// If this is not a BP page, just return the title produced by WP
	if ( bp_is_blog_page() ) {
		return $title;
	}

	// If this is a 404, let WordPress handle it
	if ( is_404() ) {
		return $title;
	}

	// If this is the front page of the site, return WP's title
	if ( is_front_page() || is_home() ) {
		return $title;
	}

	$title = '';

	// Displayed user
	if ( bp_get_displayed_user_fullname() && ! is_404() ) {
		// Get the component's ID to try and get its name
		$component_id = $component_name = bp_current_component();

		// Use the component nav name
		if ( ! empty( $bp->bp_nav[$component_id] ) ) {
			// Remove counts that are added by the nav item
			$span = strpos( $bp->bp_nav[ $component_id ]['name'], '<span' );
			if ( false !== $span ) {
				$component_name = substr( $bp->bp_nav[ $component_id ]['name'], 0, $span - 1 );

			} else {
				$component_name = $bp->bp_nav[ $component_id ]['name'];
			}

		// Fall back on the component ID
		} elseif ( ! empty( $bp->{$component_id}->id ) ) {
			$component_name = ucwords( $bp->{$component_id}->id );
		}

		// Append action name if we're on a member component sub-page
		if ( ! empty( $bp->bp_options_nav[ $component_id ] ) && ! empty( $bp->canonical_stack['action'] ) ) {
			$component_subnav_name = wp_filter_object_list( $bp->bp_options_nav[ $component_id ], array( 'slug' => bp_current_action() ), 'and', 'name' );

			if ( $component_subnav_name ) {
				$component_subnav_name = array_shift( $component_subnav_name );
			} else {
				$component_subnav_name = '';
			}

		} else {
			$component_subnav_name = '';
		}

		// If on the user profile's landing page, just use the fullname
		if ( bp_is_current_component( $bp->default_component ) && bp_get_requested_url() === bp_displayed_user_domain() ) {
			$title = bp_get_displayed_user_fullname();

		// Use component name on member pages
		} else {
			// If we have a subnav name, add it separately for localization
			if ( ! empty( $component_subnav_name ) ) {
				// translators: construct the page title. 1 = user name, 2 = component name, 3 = separator, 4 = component subnav name
				$title = strip_tags( sprintf( __( '%1$s %3$s %2$s %3$s %4$s', 'buddypress' ), bp_get_displayed_user_fullname(), $component_name, $sep, $component_subnav_name ) );

			} else {
				// translators: construct the page title. 1 = user name, 2 = component name, 3 = separator
				$title = strip_tags( sprintf( __( '%1$s %3$s %2$s', 'buddypress' ), bp_get_displayed_user_fullname(), $component_name, $sep ) );
			}
		}

	// A single group
	} elseif ( bp_is_active( 'groups' ) && ! empty( $bp->groups->current_group ) && ! empty( $bp->bp_options_nav[ $bp->groups->current_group->slug ] ) ) {
		$subnav = isset( $bp->bp_options_nav[ $bp->groups->current_group->slug ][ bp_current_action() ]['name'] ) ? $bp->bp_options_nav[ $bp->groups->current_group->slug ][ bp_current_action() ]['name'] : '';
		// translators: 1 = group name, 2 = group nav section name, 3 = separator
		$title = sprintf( __( '%1$s %3$s %2$s', 'buddypress' ), $bp->bp_options_title, $subnav, $sep );

	// A single item from a component other than groups
	} elseif ( bp_is_single_item() ) {
		// translators: 1 = component item name, 2 = component nav section name, 3 = separator
		$title = sprintf( __( '%1$s %3$s %2$s', 'buddypress' ), $bp->bp_options_title, $bp->bp_options_nav[ bp_current_item() ][ bp_current_action() ]['name'], $sep );

	// An index or directory
	} elseif ( bp_is_directory() ) {
		$current_component = bp_current_component();

//.........这里部分代码省略.........
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:101,代码来源:bp-core-filters.php

示例13: set_title

 function set_title($default, $sep = "|")
 {
     global $wp_query;
     global $rtmedia_seo_title;
     if (!array_key_exists(RTMEDIA_MEDIA_SLUG, $wp_query->query_vars)) {
         return $default;
     }
     $title = "";
     $oldSep = " " . $sep . " ";
     $sep = "";
     global $bp;
     global $rtmedia_query;
     if (isset($rtmedia_query->query) && isset($rtmedia_query->query["media_type"])) {
         if ($rtmedia_query->query["media_type"] == "album") {
             if (isset($rtmedia_query->media_query) && isset($rtmedia_query->media_query["album_id"])) {
                 //print_r( $rtmedia_query ); die();
                 if (is_array($rtmedia_query->album) && count($rtmedia_query->album) > 0) {
                     foreach ($rtmedia_query->album as $single_album) {
                         if (intval($single_album->id) == intval($rtmedia_query->media_query["album_id"])) {
                             $title .= $sep . stripslashes(esc_html(ucfirst($single_album->media_title)));
                             $sep = $oldSep;
                         }
                     }
                 }
             }
         } else {
             if (isset($rtmedia_query->media) && $rtmedia_query->media && count($rtmedia_query->media) > 0) {
                 $title .= $sep . stripslashes(esc_html(ucfirst($rtmedia_query->media[0]->media_title)));
                 $sep = $oldSep;
             }
             $title .= $sep . ucfirst($rtmedia_query->query["media_type"]);
             $sep = $oldSep;
         }
     } else {
         if (isset($rtmedia_query->action_query) && isset($rtmedia_query->action_query->media_type)) {
             $title .= $sep . ucfirst($rtmedia_query->action_query->media_type);
             $sep = $oldSep;
         }
     }
     if (function_exists("bp_is_group")) {
         if (bp_is_group() or bp_is_group_forum() or bp_is_group_forum_topic()) {
             if (bp_is_group_forum_topic()) {
                 $title .= $sep . bp_get_the_topic_title();
                 $sep = $oldSep;
             }
             $title .= $sep . bp_get_current_group_name();
             $sep = $oldSep;
         }
     }
     if (function_exists("bp_get_displayed_user_fullname") && bp_displayed_user_id() != 0) {
         $title .= $sep . bp_get_displayed_user_fullname();
         $sep = $oldSep;
     } else {
         $user_info = get_userdata(get_current_user_id());
         if (isset($user_info->data->display_name)) {
             $title .= $sep . $user_info->data->display_name;
             $sep = $oldSep;
         }
     }
     $title .= $sep . RTMEDIA_MEDIA_LABEL;
     $sep = $oldSep;
     if (isset($this->context->type)) {
         switch ($this->context->type) {
             case 'group':
                 $title .= $sep . ucfirst($bp->groups->slug);
                 break;
             case 'profile':
                 if (class_exists('BuddyPress')) {
                     $title .= $sep . ucfirst($bp->profile->slug);
                 } else {
                     $title .= $sep . get_query_var('author_name');
                 }
                 break;
             default:
                 $title .= $sep . get_post_field('post_title', $this->context->id);
                 break;
         }
     }
     $title .= $sep . get_bloginfo('name');
     $rtmedia_seo_title = $title;
     return apply_filters("rtmedia_wp_title", $title, $default, $sep);
 }
开发者ID:fs-contributor,项目名称:rtMedia,代码行数:82,代码来源:RTMediaInteraction.php

示例14: bp_user_fullname

/**
 * Alias of {@link bp_get_displayed_user_fullname()}.
 */
function bp_user_fullname()
{
    echo bp_get_displayed_user_fullname();
}
开发者ID:mawilliamson,项目名称:wordpress,代码行数:7,代码来源:bp-members-template.php

示例15: bp_activity_action_favorites_feed

/**
 * Load a user's favorites feed.
 *
 * @since 1.2.0
 *
 * @uses bp_is_user_activity()
 * @uses bp_is_current_action()
 * @uses bp_is_action_variable()
 * @uses status_header()
 *
 * @return bool False on failure.
 */
function bp_activity_action_favorites_feed()
{
    if (!bp_is_user_activity() || !bp_is_current_action('favorites') || !bp_is_action_variable('feed', 0)) {
        return false;
    }
    // Get displayed user's favorite activity IDs.
    $favs = bp_activity_get_user_favorites(bp_displayed_user_id());
    $fav_ids = implode(',', (array) $favs);
    // Setup the feed.
    buddypress()->activity->feed = new BP_Activity_Feed(array('id' => 'favorites', 'title' => sprintf(__('%1$s | %2$s | Favorites', 'buddypress'), bp_get_site_name(), bp_get_displayed_user_fullname()), 'link' => bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/', 'description' => sprintf(__("Activity feed of %s's favorites.", 'buddypress'), bp_get_displayed_user_fullname()), 'activity_args' => 'include=' . $fav_ids));
}
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:23,代码来源:bp-activity-actions.php


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