Changeset 12568 for trunk/src/bp-groups/bp-groups-template.php
- Timestamp:
- 03/15/2020 04:53:02 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-groups/bp-groups-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r12558 r12568 1303 1303 1304 1304 /** 1305 * Output the status of the current group in the loop.1306 *1307 * Either 'Public' or 'Private'.1308 *1309 * @since 1.0.01310 *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.01323 *1324 * @param object|bool $group Optional. Group object.1325 * Default: current group in loop.1326 * @return string1327 */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 mixed1361 */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 /**1381 1305 * Output the created date of the current group in the loop. 1382 1306 *
Note: See TracChangeset
for help on using the changeset viewer.