Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/02/2018 01:04:42 PM (6 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-core/bp-core-options.php

    r11764 r11780  
    690690
    691691/**
     692 * Check whether bbPress plugin-powered Group Forums are enabled.
     693 *
     694 * @since 1.6.0
     695 * @since 3.0.0 $default argument's default value changed from true to false.
     696 * @deprecated 3.0.0 No longer used in core, but supported for third-party code.
     697 *
     698 * @param bool $default Optional. Fallback value if not found in the database.
     699 *                      Default: false.
     700 * @return bool True if group forums are active, otherwise false.
     701 */
     702function bp_is_group_forums_active( $default = false ) {
     703    $is_active = function_exists( 'bbp_is_group_forums_active' ) ? bbp_is_group_forums_active( $default ) : $default;
     704
     705    /**
     706     * Filters whether or not bbPress plugin-powered Group Forums are enabled.
     707     *
     708     * @since 1.6.0
     709     * @deprecated 3.0.0 No longer used in core, but supported for third-party code.
     710     *
     711     * @param bool $value Whether or not bbPress plugin-powered Group Forums are enabled.
     712     */
     713    return (bool) apply_filters( 'bp_is_group_forums_active', $is_active );
     714}
     715
     716/**
    692717 * Check whether Akismet is enabled.
    693718 *
Note: See TracChangeset for help on using the changeset viewer.