Changeset 6697 for trunk/bp-core/bp-core-template.php
- Timestamp:
- 12/31/2012 02:20:16 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r6641 r6697 770 770 */ 771 771 function bp_displayed_user_id() { 772 773 static $id = 0; 774 775 if ( empty( $id ) ) { 776 global $bp; 777 $id = !empty( $bp->displayed_user->id ) ? $bp->displayed_user->id : 0; 778 } 779 780 return apply_filters( 'bp_displayed_user_id', $id ); 772 $bp = buddypress(); 773 $id = !empty( $bp->displayed_user->id ) ? $bp->displayed_user->id : 0; 774 775 return (int) apply_filters( 'bp_displayed_user_id', $id ); 781 776 } 782 777 … … 788 783 */ 789 784 function bp_loggedin_user_id() { 790 791 static $id = 0; 792 793 if ( empty( $id ) ) { 794 global $bp; 795 $id = !empty( $bp->loggedin_user->id ) ? $bp->loggedin_user->id : 0; 796 } 797 798 return apply_filters( 'bp_loggedin_user_id', $id ); 785 $bp = buddypress(); 786 $id = !empty( $bp->loggedin_user->id ) ? $bp->loggedin_user->id : 0; 787 788 return (int) apply_filters( 'bp_loggedin_user_id', $id ); 799 789 } 800 790
Note: See TracChangeset
for help on using the changeset viewer.