Advertisement
valuser

member-header.php

Mar 13th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.99 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * BuddyPress - Users Header
  5.  *
  6.  * @package BuddyPress
  7.  * @subpackage bp-legacy
  8.  */
  9.  
  10. ?>
  11.  
  12. <?php do_action( 'bp_before_member_header' ); ?>
  13.  
  14. <div id="item-header-avatar" class="rounded">
  15.     <a href="<?php bp_displayed_user_link(); ?>">
  16.  
  17.         <?php bp_displayed_user_avatar( 'type=full' ); ?>
  18.  
  19.     </a>
  20.   <?php do_action('bp_member_online_status', bp_displayed_user_id()); ?>
  21. </div><!-- #item-header-avatar -->
  22.  
  23. <div id="item-header-content" <?php if (isset($_COOKIE['bp-profile-header']) && $_COOKIE['bp-profile-header'] == 'small') {echo 'style="display:none;"';} ?>>
  24.  
  25.     <?php if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?>
  26.         <h4 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h4>
  27.     <?php endif; ?>
  28.  
  29.     <span class="activity"><?php bp_last_activity( bp_displayed_user_id() ); ?></span>
  30.  
  31.     <?php do_action( 'bp_before_member_header_meta' ); ?>
  32.  
  33.     <div id="item-meta">
  34.  
  35.         <?php if ( bp_is_active( 'activity' ) ) : ?>
  36.  
  37.             <div id="latest-update">
  38.  
  39.                 <?php bp_activity_latest_update( bp_displayed_user_id() ); ?>
  40.                 <!-- addedbyval -->
  41.                 <?php global $bp, $wpdb; $user_id = bp_displayed_user_id();
  42. $member_genre = str_replace("local.","http://",get_user_meta($user_id, 'genre', true));
  43. $user_info = get_userdata( $user_id);
  44. $username = $user_info->user_login;
  45. if ($member_genre != network_site_url() ) {
  46. $data = '<a href="'.$member_genre.'members/'.$username.'/profile/'.'">Home Place Profile</a>';
  47. echo $data;
  48. }
  49. ?>
  50.  
  51.             </div>
  52.  
  53.         <?php endif; ?>
  54.  
  55.         <div id="item-buttons">
  56.  
  57.             <?php do_action( 'bp_member_header_actions' ); ?>
  58.  
  59.         </div><!-- #item-buttons -->
  60.  
  61.         <?php
  62.         /***
  63.          * If you'd like to show specific profile fields here use:
  64.          * bp_member_profile_data( 'field=About Me' ); -- Pass the name of the field
  65.          */
  66.          do_action( 'bp_profile_header_meta' );
  67.  
  68.          ?>
  69.  
  70.     </div><!-- #item-meta -->
  71.  
  72. </div><!-- #item-header-content -->
  73.  
  74. <?php do_action( 'bp_after_member_header' ); ?>
  75.  
  76. <?php do_action( 'template_notices' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement