Changeset 4959
- Timestamp:
- 08/09/2011 08:11:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-functions.php
r4907 r4959 206 206 * password protected. 207 207 * 208 * @global object $wpdb209 208 * @global $bp $bp 210 209 * @param int $comment_id … … 213 212 */ 214 213 function bp_blogs_record_comment( $comment_id, $is_approved = true ) { 215 global $ wpdb, $bp;214 global $bp; 216 215 217 216 // Get the users comment … … 235 234 236 235 // Get blog and post data 237 $blog_id = (int)$wpdb->blogid;236 $blog_id = get_current_blog_id(); 238 237 $recorded_comment->post = get_post( $recorded_comment->comment_post_ID ); 238 239 if ( empty( $recorded_comment->post ) || is_wp_error( $recorded_comment->post ) ) 240 return false; 239 241 240 242 // If this is a password protected post, don't record the comment 241 243 if ( !empty( $recorded_comment->post->post_password ) ) 244 return false; 245 246 // Don't record activity if the comment's associated post isn't a WordPress Post 247 if ( 'post' != $recorded_comment->post->post_type ) 242 248 return false; 243 249
Note: See TracChangeset
for help on using the changeset viewer.