Skip to:
Content

BuddyPress.org

Ticket #6823: groups_post_update-6823.diff

File groups_post_update-6823.diff, 975 bytes (added by tw2113, 9 years ago)
  • src/bp-groups/bp-groups-functions.php

    diff --git src/bp-groups/bp-groups-functions.php src/bp-groups/bp-groups-functions.php
    index 5556ac6..4380f08 100644
    function groups_is_user_creator( $user_id, $group_id ) { 
    893893/**
    894894 * Post an Activity status update affiliated with a group.
    895895 *
    896  * @todo Should bail out when the Activity component is not active.
    897  *
    898896 * @param array|string $args {
    899897 *     Array of arguments.
    900898 *     @type string $content  The content of the update.
    function groups_is_user_creator( $user_id, $group_id ) { 
    903901 *     @type int    $group_id Optional. ID of the group to be affiliated with the
    904902 *                            update. Default: ID of the current group.
    905903 * }
    906  * @return int
     904 * @return int|bool
    907905 */
    908906function groups_post_update( $args = '' ) {
     907
     908        if ( ! bp_is_active( 'activity' ) ) {
     909                return false;
     910        }
     911
    909912        $bp = buddypress();
    910913
    911914        $defaults = array(