Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/13/2022 12:50:54 PM (3 years ago)
Author:
imath
Message:

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'
  1. 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.
  1. 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

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.