Changeset 1205 for trunk/bp-friends/bp-friends-templatetags.php
- Timestamp:
- 03/12/2009 06:19:36 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/bp-friends/bp-friends-templatetags.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends/bp-friends-templatetags.php
r1138 r1205 122 122 } 123 123 124 function bp_has_users() {125 bp_has_friendships();126 }127 128 124 function bp_the_friendship() { 129 125 global $friends_template; 130 126 return $friends_template->the_friendship(); 131 127 } 132 function bp_the_user() {133 bp_the_friendship();134 }135 128 136 129 function bp_user_friendships() { … … 138 131 return $friends_template->user_friendships(); 139 132 } 140 function bp_friends_user_users() {141 bp_friends_user_friendships();142 }143 133 144 134 function bp_friend_avatar_thumb( $template = false ) { … … 150 140 echo apply_filters( 'bp_friend_avatar_thumb', $template->avatar_thumb ); 151 141 } 152 function bp_user_avatar_thumb() {153 global $friends_template;154 bp_friend_avatar_thumb( $friends_template->friendship );155 }156 142 157 143 function bp_friend_status( $template = false ) { … … 164 150 echo apply_filters( 'bp_friend_status', $template->status ); 165 151 } 166 function bp_user_status_message() { 167 global $friends_template; 168 bp_friend_status( $friends_template->friendship ); 169 } 170 152 153 function bp_friend_name( $template = false ) { 154 global $friends_template; 155 156 if ( !$template ) 157 $template = &$friends_template->friendship->friend; 158 159 echo apply_filters( 'bp_friend_name', strip_tags( $template->user_link ) ); 160 } 161 171 162 function bp_friend_link( $template = false ) { 172 163 global $friends_template; … … 177 168 echo apply_filters( 'bp_friend_link', $template->user_link ); 178 169 } 179 function bp_user_url() { 180 global $friends_template; 181 bp_friend_link( $friends_template->friendship ); 182 } 170 171 function bp_friend_url( $template = false ) { 172 global $friends_template; 173 174 if ( !$template ) 175 $template = &$friends_template->friendship->friend; 176 177 echo apply_filters( 'bp_friend_url', $template->user_url ); 178 } 183 179 184 180 function bp_friend_last_active( $time = false, $template = false ) { … … 193 189 echo apply_filters( 'bp_friend_last_active', $time ); 194 190 } 195 function bp_user_last_active( $time = false ) {196 global $friends_template;197 bp_friend_last_active( $time, $friends_template->friendship );198 }199 191 200 192 function bp_friend_last_profile_update( $template = false ) { … … 206 198 echo apply_filters( 'bp_friend_last_profile_update', $template->profile_last_updated ); 207 199 } 208 function bp_user_last_profile_update() {209 global $friends_template;210 bp_friend_last_profile_update( $friends_template->friendship );211 }212 200 213 201 function bp_friend_last_status_update( $template = false ) { … … 219 207 echo apply_filters( 'bp_friend_last_status_update', $template->profile_last_updated ); 220 208 } 221 function bp_user_last_status_update() { 222 global $friends_template; 223 bp_friend_last_status_update( $friends_template->friendship ); 224 } 209 225 210 226 211 function bp_friend_last_content_update( $template = false ) { … … 232 217 echo apply_filters( 'bp_friend_last_content_update', $template->content_last_updated ); 233 218 } 234 function bp_user_last_content_update() {235 global $friends_template;236 bp_friend_last_content_update( $friends_template->friendship );237 }238 219 239 220 function bp_friend_time_since_requested() {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)