Exemplo n.º 1
0
 /**
  * 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();
 }
Exemplo n.º 2
0
 /**
  * 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();
 }
Exemplo n.º 3
0
 /**
  * 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();
 }
 /**
  * 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();
 }
 /**
  * Setup title for various screens
  * 
  */
 public function setup_title()
 {
     parent::setup_title();
 }
Exemplo n.º 6
0
 /**
  * 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();
 }
Exemplo n.º 7
0
 /**
  * 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();
 }
Exemplo n.º 8
0
 /**
  * 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();
 }
Exemplo n.º 9
0
 /**
  * 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();
 }
Exemplo n.º 10
0
 /**
  * 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();
 }
Exemplo n.º 11
0
	/**
	 * 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();
	}
Exemplo n.º 12
0
 /**
  * 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();
 }
Exemplo n.º 13
0
 /**
  * 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();
 }
Exemplo n.º 14
0
 /**
  * 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();
 }
Exemplo n.º 15
0
 /**
  * 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();
 }