Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/18/2018 05:10:13 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Engagements: Add relationship key and type to bbp_user_engagements_interface().

This allows for per-feature overloading of the engagement relationship type – useful if you want to store some data as a taxonomy, some data as meta, and other data in custom storage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/abstraction.php

    r6752 r6768  
    453453 * @since 2.6.0 bbPress (r6722)
    454454 *
     455 * @param string $rel_key  The key used to index this relationship
     456 * @param string $rel_type The type of meta to look in
     457 *
    455458 * @return string
    456459 */
    457 function bbp_user_engagements_interface() {
    458     return apply_filters( 'bbp_user_engagements_interface', bbpress()->engagements );
     460function bbp_user_engagements_interface( $rel_key = '', $rel_type = 'post' ) {
     461    return apply_filters( 'bbp_user_engagements_interface', bbpress()->engagements, $rel_key, $rel_type );
    459462}
    460463
Note: See TracChangeset for help on using the changeset viewer.