Changeset 1236
- Timestamp:
- 03/18/2009 07:14:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r1227 r1236 1062 1062 return $wpdb->get_col( $wpdb->prepare( "SELECT post_id FROM $wpdb->posts WHERE post_author = %d AND post_status = 'publish' AND post_type = 'post'", $user_id ) ); 1063 1063 } 1064 1065 /**1066 * bp_core_replace_comment_author_link()1067 *1068 * Replace the author link on comments to point to a user home base.1069 *1070 * @package BuddyPress Core1071 * @global $comment WordPress comment global for the current comment.1072 * @uses bp_core_get_userlink_by_email() Fetches a userlink via email address.1073 */1074 function bp_core_replace_comment_author_link( $author ) {1075 global $comment;1076 1077 if ( !$comment->comment_author_email ) {1078 $bp_author_link = bp_core_get_userlink_by_username( $comment->comment_author );1079 } else {1080 $bp_author_link = bp_core_get_userlink_by_email( $comment->comment_author_email );1081 }1082 1083 return ( !$bp_author_link ) ? $author : $bp_author_link;1084 }1085 add_filter( 'get_comment_author_link', 'bp_core_replace_comment_author_link', 10, 4 );1086 1064 1087 1065 /** … … 1363 1341 1364 1342 function bp_core_print_generation_time() { 1365 global $wpdb;1366 1343 ?> 1367 <!-- Generated in <?php timer_stop(1); ?> seconds. <?php echo $wpdb->num_queries ?> q.-->1344 <!-- Generated in <?php timer_stop(1); ?> seconds. --> 1368 1345 <?php 1369 1346 }
Note: See TracChangeset
for help on using the changeset viewer.