Changeset 6249
- Timestamp:
- 08/08/2012 05:13:00 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r6198 r6249 752 752 } 753 753 754 /** 755 * Get the id of the currently displayed user 756 * 757 * @uses apply_filters() Filter 'bp_displayed_user_id' to change this value 758 * @return int 759 */ 760 function bp_displayed_user_id() { 761 762 static $id = 0; 763 764 if ( empty( $id ) ) { 765 global $bp; 766 $id = !empty( $bp->displayed_user->id ) ? $bp->displayed_user->id : 0; 767 } 768 769 return apply_filters( 'bp_displayed_user_id', $id ); 770 } 771 772 /** 773 * Get the id of the currently logged-in user 774 * 775 * @uses apply_filters() Filter 'bp_loggedin_user_id' to change this value 776 * @return int 777 */ 778 function bp_loggedin_user_id() { 779 780 static $id = 0; 781 782 if ( empty( $id ) ) { 783 global $bp; 784 $id = !empty( $bp->loggedin_user->id ) ? $bp->loggedin_user->id : 0; 785 } 786 787 return apply_filters( 'bp_loggedin_user_id', $id ); 788 } 789 754 790 /** is_() functions to determine the current page *****************************/ 755 791 -
trunk/bp-members/bp-members-template.php
r6152 r6249 863 863 } 864 864 function bp_user_link() { bp_displayed_user_domain(); } // Deprecated. 865 866 function bp_displayed_user_id() {867 868 static $id = 0;869 870 if ( empty( $id ) ) {871 global $bp;872 $id = !empty( $bp->displayed_user->id ) ? $bp->displayed_user->id : 0;873 }874 875 return apply_filters( 'bp_displayed_user_id', $id );876 }877 878 function bp_loggedin_user_id() {879 880 static $id = 0;881 882 if ( empty( $id ) ) {883 global $bp;884 $id = !empty( $bp->loggedin_user->id ) ? $bp->loggedin_user->id : 0;885 }886 887 return apply_filters( 'bp_loggedin_user_id', $id );888 }889 865 890 866 function bp_current_user_id() { return bp_displayed_user_id(); }
Note: See TracChangeset
for help on using the changeset viewer.