Changeset 569
- Timestamp:
- 11/21/2008 10:11:59 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-wire/bp-wire-templatetags.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-wire/bp-wire-templatetags.php
r531 r569 225 225 } 226 226 227 function bp_wire_post_date( $date_format = null ) {227 function bp_wire_post_date( $date_format = null, $echo = true ) { 228 228 global $wire_posts_template; 229 229 … … 231 231 $date_format = get_option('date_format'); 232 232 233 echo mysql2date( $date_format, $wire_posts_template->wire_post->date_posted ); 234 } 235 236 function bp_wire_post_author_name() { 233 if ( $echo ) 234 echo mysql2date( $date_format, $wire_posts_template->wire_post->date_posted ); 235 else 236 return mysql2date( $date_format, $wire_posts_template->wire_post->date_posted ); 237 } 238 239 function bp_wire_post_author_name( $echo = true ) { 237 240 global $wire_posts_template; 238 241 … … 274 277 } 275 278 276 function bp_wire_poster_name() { 277 global $bp; 278 279 echo '<a href="' . $bp['loggedin_domain'] . $bp['profile']['slug'] . '">' . __('You', 'buddypress') . '</a>'; 280 } 281 282 function bp_wire_poster_date( $date_format = null ) { 279 function bp_wire_poster_name( $echo = true ) { 280 global $bp; 281 282 if ( $echo ) 283 echo '<a href="' . $bp['loggedin_domain'] . $bp['profile']['slug'] . '">' . __('You', 'buddypress') . '</a>'; 284 else 285 return '<a href="' . $bp['loggedin_domain'] . $bp['profile']['slug'] . '">' . __('You', 'buddypress') . '</a>'; 286 } 287 288 function bp_wire_poster_date( $date_format = null, $echo = true ) { 283 289 if ( !$date_format ) 284 290 $date_format = get_option('date_format'); 285 291 286 echo mysql2date( $date_format, date("Y-m-d H:i:s") ); 292 if ( $echo ) 293 echo mysql2date( $date_format, date("Y-m-d H:i:s") ); 294 else 295 return mysql2date( $date_format, date("Y-m-d H:i:s") ); 287 296 } 288 297
Note: See TracChangeset
for help on using the changeset viewer.