Changeset 9194 for trunk/src/bp-blogs/bp-blogs-activity.php
- Timestamp:
- 11/27/2014 05:13:29 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-activity.php
r8747 r9194 34 34 __( 'New site created', 'buddypress' ), 35 35 'bp_blogs_format_activity_action_new_blog', 36 __( 'New Sites', 'buddypress' ) 36 __( 'New Sites', 'buddypress' ), 37 0 37 38 ); 38 39 } 39 40 40 bp_activity_set_action( 41 $bp->blogs->id, 42 'new_blog_post', 43 __( 'New post published', 'buddypress' ), 44 'bp_blogs_format_activity_action_new_blog_post', 45 __( 'Posts', 'buddypress' ), 46 array( 'activity', 'member' ) 47 ); 48 49 bp_activity_set_action( 50 $bp->blogs->id, 51 'new_blog_comment', 52 __( 'New post comment posted', 'buddypress' ), 53 'bp_blogs_format_activity_action_new_blog_comment', 54 __( 'Comments', 'buddypress' ), 55 array( 'activity', 'member' ) 56 ); 41 // Only add the comment type if the 'post' post type is trackable 42 if ( post_type_supports( 'post', 'buddypress-activity' ) ) { 43 bp_activity_set_action( 44 $bp->blogs->id, 45 'new_blog_comment', 46 __( 'New post comment posted', 'buddypress' ), 47 'bp_blogs_format_activity_action_new_blog_comment', 48 __( 'Comments', 'buddypress' ), 49 array( 'activity', 'member' ), 50 10 51 ); 52 } 57 53 58 54 do_action( 'bp_blogs_register_activity_actions' ); … … 109 105 } 110 106 111 $post_url = add_query_arg( 'p', $activity->secondary_item_id, trailingslashit( $blog_url ) ); 112 113 $post_title = bp_activity_get_meta( $activity->id, 'post_title' ); 107 if ( empty( $activity->post_url ) ) { 108 $post_url = add_query_arg( 'p', $activity->secondary_item_id, trailingslashit( $blog_url ) ); 109 } else { 110 $post_url = $activity->post_url; 111 } 112 113 if ( empty( $activity->post_title ) ) { 114 $post_title = bp_activity_get_meta( $activity->id, 'post_title' ); 115 } else { 116 $post_title = $activity->post_title; 117 } 114 118 115 119 // Should only be empty at the time of post creation
Note: See TracChangeset
for help on using the changeset viewer.