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


PHP BP_Component::setup_title方法代码示例

本文整理汇总了PHP中BP_Component::setup_title方法的典型用法代码示例。如果您正苦于以下问题:PHP BP_Component::setup_title方法的具体用法?PHP BP_Component::setup_title怎么用?PHP BP_Component::setup_title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BP_Component的用法示例。


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

示例1: setup_title

 /**
  * Set up the title for pages and <title>.
  */
 public function setup_title()
 {
     $bp = buddypress();
     if (bp_is_my_profile()) {
         $bp->bp_options_title = __('You', 'buddypress');
     } elseif (bp_is_user()) {
         $bp->bp_options_title = bp_get_displayed_user_fullname();
         $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => bp_displayed_user_id(), 'type' => 'thumb', 'alt' => sprintf(__('Profile picture of %s', 'buddypress'), $bp->bp_options_title)));
     }
     parent::setup_title();
 }
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:14,代码来源:bp-members-loader.php

示例2:

 /**
  * Sets up the title for pages and <title>
  *
  * @global obj $bp
  */
 function setup_title()
 {
     global $bp;
     if (bp_is_messages_component()) {
         if (bp_is_my_profile()) {
             $bp->bp_options_title = __('My Messages', 'buddypress');
         } else {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => $bp->displayed_user->id, 'type' => 'thumb'));
             $bp->bp_options_title = $bp->displayed_user->fullname;
         }
     }
     parent::setup_title();
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:18,代码来源:bp-messages-loader.php

示例3: elseif

 /**
  * Sets up the title for pages and <title>
  *
  * @global obj $bp
  */
 function setup_title()
 {
     global $bp;
     if (bp_is_my_profile()) {
         $bp->bp_options_title = __('You', 'buddypress');
     } elseif (bp_is_user()) {
         $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => bp_displayed_user_id(), 'type' => 'thumb'));
         $bp->bp_options_title = $bp->displayed_user->fullname;
     }
     parent::setup_title();
 }
开发者ID:newington,项目名称:buddypress,代码行数:16,代码来源:bp-members-loader.php

示例4: setup_title

 /**
  * Set up the title for pages and <title>.
  *
  * @since 1.9.0
  */
 public function setup_title()
 {
     // Adjust title.
     if (bp_is_notifications_component()) {
         $bp = buddypress();
         if (bp_is_my_profile()) {
             $bp->bp_options_title = __('Notifications', 'buddypress');
         } else {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => bp_displayed_user_id(), 'type' => 'thumb', 'alt' => sprintf(__('Profile picture of %s', 'buddypress'), bp_get_displayed_user_fullname())));
             $bp->bp_options_title = bp_get_displayed_user_fullname();
         }
     }
     parent::setup_title();
 }
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:19,代码来源:class-bp-notifications-component.php

示例5: setup_title

 /**
  * Setup title for various screens
  * 
  */
 public function setup_title()
 {
     parent::setup_title();
 }
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:8,代码来源:mpp-bp-component.php

示例6: setup_title

 /**
  * Set up the title for pages and <title>.
  */
 public function setup_title()
 {
     if (bp_is_groups_component()) {
         $bp = buddypress();
         if (bp_is_my_profile() && !bp_is_single_item()) {
             $bp->bp_options_title = _x('Memberships', 'My Groups page <title>', 'buddypress');
         } elseif (!bp_is_my_profile() && !bp_is_single_item()) {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => bp_displayed_user_id(), 'type' => 'thumb', 'alt' => sprintf(__('Profile picture of %s', 'buddypress'), bp_get_displayed_user_fullname())));
             $bp->bp_options_title = bp_get_displayed_user_fullname();
             // We are viewing a single group, so set up the
             // group navigation menu using the $this->current_group global.
         } elseif (bp_is_single_item()) {
             $bp->bp_options_title = $this->current_group->name;
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => $this->current_group->id, 'object' => 'group', 'type' => 'thumb', 'avatar_dir' => 'group-avatars', 'alt' => __('Group Profile Photo', 'buddypress')));
             if (empty($bp->bp_options_avatar)) {
                 $bp->bp_options_avatar = '<img src="' . esc_url(bp_core_avatar_default_thumb()) . '" alt="' . esc_attr__('No Group Profile Photo', 'buddypress') . '" class="avatar" />';
             }
         }
     }
     parent::setup_title();
 }
开发者ID:JeroenNouws,项目名称:BuddyPress,代码行数:24,代码来源:bp-groups-loader.php

示例7: setup_title

 /**
  * Sets up the title for pages and <title>
  *
  * @global BuddyPress $bp The one true BuddyPress instance
  */
 public function setup_title()
 {
     $bp = buddypress();
     if (bp_is_buddyblog_component()) {
         if (bp_is_my_profile() && !bp_is_single_item()) {
             $bp->bp_options_title = __('Posts', 'buddyblog');
         } elseif (!bp_is_my_profile() && !bp_is_single_item()) {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => bp_displayed_user_id(), 'type' => 'thumb', 'alt' => sprintf(__('Profile picture of %s', 'buddyblog'), bp_get_displayed_user_fullname())));
             $bp->bp_options_title = bp_get_displayed_user_fullname();
             // We are viewing a single group, so set up the
             // group navigation menu using the $this->current_group global.
         }
     }
     parent::setup_title();
 }
开发者ID:poweronio,项目名称:mbsite,代码行数:20,代码来源:buddyblog-loader.php

示例8: setup_title

 /**
  * Set up the title for pages and <title>.
  *
  * @since BuddyPress (1.5.0)
  *
  * @uses bp_is_activity_component()
  * @uses bp_is_my_profile()
  * @uses bp_core_fetch_avatar()
  */
 public function setup_title()
 {
     $bp = buddypress();
     // Adjust title based on view
     if (bp_is_activity_component()) {
         if (bp_is_my_profile()) {
             $bp->bp_options_title = _x('My Activity', 'Page and <title>', 'buddypress');
         } else {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => bp_displayed_user_id(), 'type' => 'thumb', 'alt' => sprintf(__('Profile picture of %s', 'buddypress'), bp_get_displayed_user_fullname())));
             $bp->bp_options_title = bp_get_displayed_user_fullname();
         }
     }
     parent::setup_title();
 }
开发者ID:kosir,项目名称:thatcamp-org,代码行数:23,代码来源:bp-activity-loader.php

示例9: sprintf

 /**
  * Sets up the title for pages and <title>
  *
  * @global BuddyPress $bp The one true BuddyPress instance
  */
 function setup_title()
 {
     global $bp;
     // Adjust title
     if (bp_is_friends_component()) {
         if (bp_is_my_profile()) {
             $bp->bp_options_title = __('Friendships', 'buddypress');
         } else {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => bp_displayed_user_id(), 'type' => 'thumb', 'alt' => sprintf(__('Profile picture of %s', 'buddypress'), bp_get_displayed_user_fullname())));
             $bp->bp_options_title = bp_get_displayed_user_fullname();
         }
     }
     parent::setup_title();
 }
开发者ID:adisonc,项目名称:MaineLearning,代码行数:19,代码来源:bp-friends-loader.php

示例10:

 /**
  * Sets up the title for pages and <title>
  *
  * @since 1.5.0
  *
  * @global object $bp BuddyPress global settings
  * @uses bp_is_activity_component()
  * @uses bp_is_my_profile()
  * @uses bp_core_fetch_avatar()
  */
 function setup_title()
 {
     global $bp;
     // Adjust title based on view
     if (bp_is_activity_component()) {
         if (bp_is_my_profile()) {
             $bp->bp_options_title = __('My Activity', 'buddypress');
         } else {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => $bp->displayed_user->id, 'type' => 'thumb'));
             $bp->bp_options_title = $bp->displayed_user->fullname;
         }
     }
     parent::setup_title();
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:24,代码来源:bp-activity-loader.php

示例11: setup_title

	/**
	 * Set up the title for pages and <title>
	 */
	public function setup_title() {
		$bp = buddypress();

		// Set up the component options navigation for Site
		if ( bp_is_blogs_component() ) {
			if ( bp_is_my_profile() ) {
				if ( bp_is_active( 'xprofile' ) ) {
					$bp->bp_options_title = __( 'My Sites', 'buddypress' );
				}

			// If we are not viewing the logged in user, set up the current
			// users avatar and name
			} else {
				$bp->bp_options_avatar = bp_core_fetch_avatar( array(
					'item_id' => bp_displayed_user_id(),
					'type'    => 'thumb',
					'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
				) );
				$bp->bp_options_title = bp_get_displayed_user_fullname();
			}
		}

		parent::setup_title();
	}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:27,代码来源:bp-blogs-loader.php

示例12: setup_title

 /**
  * Sets up the title for pages and <title>
  *
  * @since bbPress (r3552)
  */
 public function setup_title()
 {
     $bp = buddypress();
     // Adjust title based on view
     if (bp_is_forums_component()) {
         if (bp_is_my_profile()) {
             $bp->bp_options_title = __('Forums', 'bbpress');
         } elseif (bp_is_user()) {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => bp_displayed_user_id(), 'type' => 'thumb'));
             $bp->bp_options_title = bp_get_displayed_user_fullname();
         }
     }
     parent::setup_title();
 }
开发者ID:danielcoats,项目名称:schoolpress,代码行数:19,代码来源:loader.php

示例13:

 /**
  * Sets up the title for pages and <title>
  *
  * @global obj $bp
  */
 function setup_title()
 {
     global $bp;
     // Set up the component options navigation for Blog
     if (bp_is_blogs_component()) {
         if (bp_is_my_profile()) {
             if (bp_is_active('xprofile')) {
                 $bp->bp_options_title = __('My Sites', 'buddypress');
             }
             // If we are not viewing the logged in user, set up the current
             // users avatar and name
         } else {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => $bp->displayed_user->id, 'type' => 'thumb'));
             $bp->bp_options_title = $bp->displayed_user->fullname;
         }
     }
     parent::setup_title();
 }
开发者ID:hornetalcala,项目名称:trunk,代码行数:23,代码来源:bp-blogs-loader.php

示例14:

 /**
  * Sets up the title for pages and <title>
  *
  * @global obj $bp
  */
 function setup_title()
 {
     global $bp;
     if (bp_is_groups_component()) {
         if (bp_is_my_profile() && !bp_is_single_item()) {
             $bp->bp_options_title = __('Memberships', 'buddypress');
         } else {
             if (!bp_is_my_profile() && !bp_is_single_item()) {
                 $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => $bp->displayed_user->id, 'type' => 'thumb'));
                 $bp->bp_options_title = $bp->displayed_user->fullname;
                 // We are viewing a single group, so set up the
                 // group navigation menu using the $this->current_group global.
             } else {
                 if (bp_is_single_item()) {
                     $bp->bp_options_title = $this->current_group->name;
                     $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => $this->current_group->id, 'object' => 'group', 'type' => 'thumb', 'avatar_dir' => 'group-avatars', 'alt' => __('Group Avatar', 'buddypress')));
                     if (empty($bp->bp_options_avatar)) {
                         $bp->bp_options_avatar = '<img src="' . esc_attr($group->avatar_full) . '" class="avatar" alt="' . esc_attr($group->name) . '" />';
                     }
                 }
             }
         }
     }
     parent::setup_title();
 }
开发者ID:hornetalcala,项目名称:trunk,代码行数:30,代码来源:bp-groups-loader.php

示例15:

 /**
  * Sets up the title for pages and <title>
  *
  * @global obj $bp
  */
 function setup_title()
 {
     global $bp;
     // Adjust title
     if (bp_is_friends_component()) {
         if (bp_is_my_profile()) {
             $bp->bp_options_title = __('Friendships', 'buddypress');
         } else {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => bp_displayed_user_id(), 'type' => 'thumb'));
             $bp->bp_options_title = $bp->displayed_user->fullname;
         }
     }
     parent::setup_title();
 }
开发者ID:newington,项目名称:buddypress,代码行数:19,代码来源:bp-friends-loader.php


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