Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/15/2020 04:53:02 AM (6 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 *
Note: See TracChangeset for help on using the changeset viewer.