[buddypress-trac] [BuddyPress Trac] #6630: Issue posting comment on links using buddypress

buddypress-trac noreply at wordpress.org
Wed Oct 14 18:19:24 UTC 2015


#6630: Issue posting comment on links using buddypress
--------------------------------------+-----------------------
 Reporter:  camaro4d                  |       Owner:
     Type:  defect (bug)              |      Status:  reopened
 Priority:  normal                    |   Milestone:  2.4
Component:  Component - Activity      |     Version:  1.7
 Severity:  normal                    |  Resolution:
 Keywords:  needs-patch dev-feedback  |
--------------------------------------+-----------------------
Changes (by r-a-y):

 * keywords:  needs-patch => needs-patch dev-feedback


Comment:

 > Alternatively, let's introduce a new filter that does what [9160] does.

 tl;dr - This is what I would go with as well.

 ----

 I think the filter we are most concerned about is the one in bp-legacy
 since that relies on AJAX / JS being enabled and is the one that is going
 to be used most of the time.

 The filter in `bp_activity_action_post_update()` only fires / occurs if JS
 is disabled.  I think we can leave that filter alone since that is rarely
 going to be used.

 @MrMaz - Doing a `list()` check would be applicable if you wanted to
 support older versions of BuddyPress <= 2.1, or the bp-default theme
 ([https://github.com/buddypress/BP-Default/blob/master/_inc/ajax.php#L287
 which doesn't include] r9160), or if you were posting custom activity
 updates without JS.

 r9160 was introduced since v2.2 so if we move back to 3 arguments, this
 will just cause more issues for devs.

 I see the following options:
 1. Rename the filter in bp-legacy.  Problem with this is devs would need
 to add another filter just for bp-legacy.  Only advanced plugins like
 MrMaz's and imath's that are re-using the "What's New" activity form would
 need to use this filter.  To me, this is quite rare.
 2. Rename the filter in `bp_activity_action_post_update()` to something
 else.  Problem with this is bp-default still uses the same filter name
 with different arguments.
 3. Do not alter any code, but add in-depth phpDoc to the filter in bp-
 legacy.  This could just confuse devs even more.

 Option 1 is probably the easiest, but plugins would need to update their
 code to use the new bp-legacy filter.

 Would be particularly interested in MrMaz and imath's feedback here.

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


More information about the buddypress-trac mailing list