[buddypress-trac] [BuddyPress Trac] #8764: Improve Activity/Group Activity function to post updates

buddypress-trac noreply at wordpress.org
Sun Nov 13 12:51:01 UTC 2022


#8764: Improve Activity/Group Activity function to post updates
-----------------------+---------------------
 Reporter:  imath      |       Owner:  imath
     Type:  task       |      Status:  closed
 Priority:  high       |   Milestone:  11.0.0
Component:  Activity   |     Version:
 Severity:  normal     |  Resolution:  fixed
 Keywords:  has-patch  |
-----------------------+---------------------
Changes (by imath):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"13367" 13367]:
 {{{
 #!CommitTicketReference repository="" revision="13367"
 Improve Activity & Group Activity `post_update` functions

 1. Improve the `bp_activity_post_update()` function's extensibility
 including a filter name (`'activity_post_update'`) into the
 `bp_parse_args()` function used to merge given arguments with default
 ones. This allows Plugins or BuddyPress add-ons such as BP Attachments to
 create a content from a different input than the Activity Post Form's
 textarea using one of these two filters:
  - `'bp_before_activity_post_update_parse_args'` or
  - `'bp_after_activity_post_update_parse_args'`

 2. `groups_post_update()` now completely respects the `$error_type`
 argument making sure to return a WP_Error object when it is defined to
 `wp_error`. If not, it returns `false`.

 3. To avoid code/i18n string duplication adapt
 `bp_nouveau_ajax_post_update()` so that it enjoys the 2 above
 improvements.

 Closes https://github.com/buddypress/buddypress/pull/37
 Fixes #8764
 }}}

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


More information about the buddypress-trac mailing list