Skip to:
Content

BuddyPress.org

Changeset 11938


Ignore:
Timestamp:
04/02/2018 10:40:59 PM (4 years ago)
Author:
djpaul
Message:

Move (retired) Legacy Forum backwards compatibility functions into deprecated/3.0 file.

See #5351

Location:
trunk/src
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-options.php

    r11780 r11938  
    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  */
    702 function 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 /**
    717  * Check whether Akismet is enabled.
    718  *
    719  * @since 1.6.0
    720  *
    721  * @param bool $default Optional. Fallback value if not found in the database.
    722  *                      Default: true.
    723  * @return bool True if Akismet is enabled, otherwise false.
    724  */
    725 function bp_is_akismet_active( $default = true ) {
    726 
    727     /**
    728      * Filters whether or not Akismet is enabled.
    729      *
    730      * @since 1.6.0
    731      *
    732      * @param bool $value Whether or not Akismet is enabled.
    733      */
    734     return (bool) apply_filters( 'bp_is_akismet_active', (bool) bp_get_option( '_bp_enable_akismet', $default ) );
    735 }
    736 
    737 /**
    738692 * Check whether Activity Heartbeat refresh is enabled.
    739693 *
  • trunk/src/bp-core/bp-core-template.php

    r11937 r11938  
    24752475
    24762476/**
    2477  * Is this a user's forums page?
    2478  *
    2479  * Eg http://example.com/members/joe/forums/ (or a subpage thereof).
    2480  *
    2481  * @since 1.5.0
    2482  * @deprecated 3.0.0 No longer used in core, but supported for third-party code.
    2483  *
    2484  * @return false
    2485  */
    2486 function bp_is_user_forums() {
    2487     return false;
    2488 }
    2489 
    2490 /**
    24912477 * Is the current page part of a user's Groups page?
    24922478 *
     
    27202706function bp_is_group_admin_page() {
    27212707    return (bool) ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'admin' ) );
    2722 }
    2723 
    2724 /**
    2725  * Is the current page a group's (legacy bbPress) forum page?
    2726  *
    2727  * @since 1.1.0
    2728  * @since 3.0.0 Always returns false.
    2729  * @deprecated 3.0.0 No longer used in core, but supported for custom theme templates.
    2730  *
    2731  * @return bool
    2732  */
    2733 function bp_is_group_forum() {
    2734     return false;
    27352708}
    27362709
  • trunk/src/bp-groups/bp-groups-template.php

    r11896 r11938  
    470470 * Is the group accessible to the currently logged-in user?
    471471 * Despite the name of the function, it has historically checked
    472  * whether a user has access to a group. 
    473  * In BP 2.9, a property was added to the BP_Groups_Group class, 
     472 * whether a user has access to a group.
     473 * In BP 2.9, a property was added to the BP_Groups_Group class,
    474474 * `is_visible`, that describes whether a user can know the group exists.
    475  * If you wish to check that property, use the check: 
     475 * If you wish to check that property, use the check:
    476476 * bp_current_user_can( 'groups_see_group' ).
    477477 *
     
    32203220    return true;
    32213221}
    3222 
    3223 /**
    3224  * Output a 'New Topic' button for a group.
    3225  *
    3226  * @since 1.2.7
    3227  * @deprecated 3.0.0 No longer used in core, but supported for third-party code.
    3228  *
    3229  * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, boolean false if not passed.
    3230  */
    3231 function bp_group_new_topic_button( $group = false ) {
    3232 }
    3233 
    3234     /**
    3235      * Return a 'New Topic' button for a group.
    3236      *
    3237      * @since 1.2.7
    3238      * @deprecated 3.0.0 No longer used in core, but supported for third-party code.
    3239      *
    3240      * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, boolean false if not passed.
    3241      *
    3242      * @return false
    3243      */
    3244     function bp_get_group_new_topic_button( $group = false ) {
    3245         return false;
    3246     }
    32473222
    32483223/**
  • trunk/src/class-buddypress.php

    r11841 r11938  
    490490            require( $this->plugin_dir . 'bp-core/deprecated/2.8.php' );
    491491            require( $this->plugin_dir . 'bp-core/deprecated/2.9.php' );
     492            require( $this->plugin_dir . 'bp-core/deprecated/3.0.php' );
    492493        }
    493494    }
Note: See TracChangeset for help on using the changeset viewer.