Skip to:
Content

BuddyPress.org

Changeset 12568


Ignore:
Timestamp:
03/15/2020 04:53:02 AM (5 years ago)
Author:
imath
Message:

Groups: deprecate 4 functions no more used in BuddyPress

Deprecated functions are:

  • bp_group_public_status()
  • bp_get_group_public_status()
  • bp_group_is_public()
  • bp_get_group_is_public()

Props mattjones2207, espellcaste

Fixes #8146

Location:
trunk/src
Files:
3 edited

Legend:

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

    r12562 r12568  
    8686    bp_members_screen_change_avatar();
    8787}
     88
     89/**
     90 * Output the status of the current group in the loop.
     91 *
     92 * Either 'Public' or 'Private'.
     93 *
     94 * @since 1.0.0
     95 * @deprecated 6.0.0 Not used anymore.
     96 *
     97 * @param object|bool $group Optional. Group object.
     98 *                           Default: current group in loop.
     99 */
     100function bp_group_public_status( $group = false ) {
     101    _deprecated_function( __FUNCTION__, '6.0' );
     102}
     103    /**
     104     * Return the status of the current group in the loop.
     105     *
     106     * Either 'Public' or 'Private'.
     107     *
     108     * @since 1.0.0
     109     * @deprecated 6.0.0 Not used anymore.
     110     *
     111     * @param object|bool $group Optional. Group object.
     112     *                           Default: current group in loop.
     113     * @return string
     114     */
     115    function bp_get_group_public_status( $group = false ) {
     116        _deprecated_function( __FUNCTION__, '6.0' );
     117    }
     118
     119/**
     120 * Output whether the current group in the loop is public.
     121 *
     122 * No longer used in BuddyPress.
     123 *
     124 * @deprecated 6.0.0 Not used anymore.
     125 *
     126 * @param object|bool $group Optional. Group object.
     127 *                           Default: current group in loop.
     128 */
     129function bp_group_is_public( $group = false ) {
     130    _deprecated_function( __FUNCTION__, '6.0' );
     131}
     132    /**
     133     * Return whether the current group in the loop is public.
     134     *
     135     * No longer used in BuddyPress.
     136     *
     137     * @deprecated 6.0.0 Not used anymore.
     138     *
     139     * @param object|bool $group Optional. Group object.
     140     *                           Default: current group in loop.
     141     * @return mixed
     142     */
     143    function bp_get_group_is_public( $group = false ) {
     144        _deprecated_function( __FUNCTION__, '6.0' );
     145    }
  • trunk/src/bp-groups/bp-groups-template.php

    r12558 r12568  
    13031303
    13041304/**
    1305  * Output the status of the current group in the loop.
    1306  *
    1307  * Either 'Public' or 'Private'.
    1308  *
    1309  * @since 1.0.0
    1310  *
    1311  * @param object|bool $group Optional. Group object.
    1312  *                           Default: current group in loop.
    1313  */
    1314 function bp_group_public_status( $group = false ) {
    1315     echo bp_get_group_public_status( $group );
    1316 }
    1317     /**
    1318      * Return the status of the current group in the loop.
    1319      *
    1320      * Either 'Public' or 'Private'.
    1321      *
    1322      * @since 1.0.0
    1323      *
    1324      * @param object|bool $group Optional. Group object.
    1325      *                           Default: current group in loop.
    1326      * @return string
    1327      */
    1328     function bp_get_group_public_status( $group = false ) {
    1329         global $groups_template;
    1330 
    1331         if ( empty( $group ) ) {
    1332             $group =& $groups_template->group;
    1333         }
    1334 
    1335         if ( $group->is_public ) {
    1336             return __( 'Public', 'buddypress' );
    1337         } else {
    1338             return __( 'Private', 'buddypress' );
    1339         }
    1340     }
    1341 
    1342 /**
    1343  * Output whether the current group in the loop is public.
    1344  *
    1345  * No longer used in BuddyPress.
    1346  *
    1347  * @param object|bool $group Optional. Group object.
    1348  *                           Default: current group in loop.
    1349  */
    1350 function bp_group_is_public( $group = false ) {
    1351     echo bp_get_group_is_public( $group );
    1352 }
    1353     /**
    1354      * Return whether the current group in the loop is public.
    1355      *
    1356      * No longer used in BuddyPress.
    1357      *
    1358      * @param object|bool $group Optional. Group object.
    1359      *                           Default: current group in loop.
    1360      * @return mixed
    1361      */
    1362     function bp_get_group_is_public( $group = false ) {
    1363         global $groups_template;
    1364 
    1365         if ( empty( $group ) ) {
    1366             $group =& $groups_template->group;
    1367         }
    1368 
    1369         /**
    1370          * Filters whether the current group in the loop is public.
    1371          *
    1372          * @since 2.5.0 Added the `$group` parameter.
    1373          *
    1374          * @param bool   $public True if the group is public.
    1375          * @param object $group Group object.
    1376          */
    1377         return apply_filters( 'bp_get_group_is_public', $group->is_public, $group );
    1378     }
    1379 
    1380 /**
    13811305 * Output the created date of the current group in the loop.
    13821306 *
  • trunk/src/class-buddypress.php

    r12535 r12568  
    509509            require( $this->plugin_dir . 'bp-core/deprecated/3.0.php' );
    510510            require( $this->plugin_dir . 'bp-core/deprecated/4.0.php' );
     511            require( $this->plugin_dir . 'bp-core/deprecated/6.0.php' );
    511512        }
    512513
Note: See TracChangeset for help on using the changeset viewer.