[buddypress-trac] [BuddyPress Trac] #6482: Comment syncing between activity and post comments for Custom Post Types

buddypress-trac noreply at wordpress.org
Wed Jan 20 21:42:47 UTC 2016


#6482: Comment syncing between activity and post comments for Custom Post Types
--------------------------------------------------+-----------------------
 Reporter:  shanebp                               |       Owner:  imath
     Type:  enhancement                           |      Status:  assigned
 Priority:  normal                                |   Milestone:  2.5
Component:  Component - Blogs                     |     Version:  2.2
 Severity:  normal                                |  Resolution:
 Keywords:  needs-testing dev-feedback has-patch  |
--------------------------------------------------+-----------------------

Comment (by r-a-y):

 Thanks for making these changes, imath.

 Here are my thoughts:

 > So i see no objections having only one function instead of 2, but i
 think the name should then look like bp_activity_post_type_supports.

 The function name change to `bp_activity_post_type_supports()` sounded
 good to me at first.  But then, the way we are using this function is to
 check all activity types to see if it has post type functionality on
 certain activity hooks.  (See bp-blogs-activity.php.)

 For example, `bp_activity_post_type_supports( 'activity_update', 'comment-
 reply' )` doesn't really make sense as  'activity_update' is not a post
 type.

 Perhaps we can use `bp_activity_type_supports()`, but namespace the post
 type support checks.

 eg. `bp_activity_type_supports( 'activity_update', 'post-type-comment-
 reply' )`

 > For instance, i've tried to use your idea for the activity_comment
 support for any activity, and i gave up because of a headache.

 Regarding `'activity_comment'`, would this mean the `'activity_comment'`
 parameter in `register_post_type()`?

 Or more generic activity comment support, which would be similar to how
 `bp_activity_can_comment()` works?  (Maybe even an alias of that
 function?)

 I think it would be great to expand on the feature set for this function
 in the future, but I do not think this is a dealbreaker as we already have
 the `bp_activity_can_comment()` function.

 Do you have any other concerns that I might not be thinking of?

 > As long as the component is known as the "Site tracking" component, i
 think we should keep some code relative to site tracking in it. But i'm
 not strongly opposed about it :)

 Yeah, after reading the description for the "Site Tracking" component --
 `Record activity for new posts and comments from your site` -- I'm
 inclined to agree with you.

 I keep thinking that the Blogs component just handles tracking user blogs.

 However, we do have a bunch of code in `bp-activity-actions.php`
 referencing activity post type tracking.  I guess we can make a decision
 about this at a later point.

 > 2. Potential problem with wp_new_comment()
 > Is this problem introduced by the patch ? Or is it existing since the
 introduction of synchronization ?

 Definitely not a problem with the patch!

 ----

 My only minor issue is with the `bp_activity_post_type_supports()`
 function.  I think another dev needs to chime in here.

 Other than that, I think the patch is very close to committing!

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6482#comment:26>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list