Changeset 5562
- Timestamp:
- 12/16/2011 08:49:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-functions.php
r5355 r5562 181 181 if ( 'publish' == $post->post_status && empty( $post->post_password ) ) { 182 182 if ( $is_blog_public || !is_multisite() ) { 183 183 184 // Record this in activity streams 184 185 $post_permalink = get_permalink( $post_id ); … … 188 189 else 189 190 $activity_action = sprintf( __( '%1$s wrote a new post, %2$s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ); 191 192 // Make sure there's not an existing entry for this post (prevent bumping) 193 $existing = bp_activity_get( array( 194 'filter' => array( 195 'user_id' => (int)$post->post_author, 196 'action' => 'new_blog_post', 197 'primary_id' => $blog_id, 198 'secondary_id' => $post_id, 199 ) 200 ) ); 201 202 if ( !empty( $existing['activities'] ) ) { 203 return; 204 } 190 205 191 206 $activity_content = $post->post_content;
Note: See TracChangeset
for help on using the changeset viewer.