Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/02/2018 01:04:42 PM (7 years ago)
Author:
djpaul
Message:

Groups: reinstate functions bp_is_group_forums_active(), bp_group_new_topic_button(), bp_get_group_new_topic_button().

The first function has been reinstated for compatibility with third-party plugins, "BuddyPress for Sensei" and "BuddyPress for LearnDash".

The latter two functions rendered a "new topic" button on a Group screen.
Current proposal is that bbPress is updated to add this back, because otherwise we have to make assumptions about bbPress' permalinks, or rely on calling a bbPress function (which feels conceptually wrong from an integration perspective).

Also fix a PHP Notice caused by an incomplete prior removal of bp_group_new_topic_button() (see bp-legacy/buddypress-functions.php).

See #5351

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-template.php

    r11776 r11780  
    31903190
    31913191/**
     3192 * Output a 'New Topic' button for a group.
     3193 *
     3194 * @since 1.2.7
     3195 * @deprecated 3.0.0 No longer used in core, but supported for third-party code.
     3196 *
     3197 * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, boolean false if not passed.
     3198 */
     3199function bp_group_new_topic_button( $group = false ) {
     3200}
     3201
     3202    /**
     3203     * Return a 'New Topic' button for a group.
     3204     *
     3205     * @since 1.2.7
     3206     * @deprecated 3.0.0 No longer used in core, but supported for third-party code.
     3207     *
     3208     * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, boolean false if not passed.
     3209     *
     3210     * @return false
     3211     */
     3212    function bp_get_group_new_topic_button( $group = false ) {
     3213        return false;
     3214    }
     3215
     3216/**
    31923217 * Output button to join a group.
    31933218 *
Note: See TracChangeset for help on using the changeset viewer.