Ticket #8146: 8146.patch
File 8146.patch, 4.8 KB (added by , 6 years ago) |
---|
-
new file src/bp-core/deprecated/6.0.php
diff --git src/bp-core/deprecated/6.0.php src/bp-core/deprecated/6.0.php new file mode 100644 index 000000000..0753cfc8b
- + 1 <?php 2 /** 3 * Deprecated functions. 4 * 5 * @deprecated 6.0.0 6 */ 7 8 // Exit if accessed directly. 9 defined( 'ABSPATH' ) || exit; 10 11 /** 12 * Output the status of the current group in the loop. 13 * 14 * Either 'Public' or 'Private'. 15 * 16 * @since 1.0.0 17 * @deprecated 6.0.0 Not used anymore. 18 * 19 * @param object|bool $group Optional. Group object. 20 * Default: current group in loop. 21 */ 22 function bp_group_public_status( $group = false ) { 23 _deprecated_function( __FUNCTION__, '6.0' ); 24 } 25 /** 26 * Return the status of the current group in the loop. 27 * 28 * Either 'Public' or 'Private'. 29 * 30 * @since 1.0.0 31 * @deprecated 6.0.0 Not used anymore. 32 * 33 * @param object|bool $group Optional. Group object. 34 * Default: current group in loop. 35 * @return string 36 */ 37 function bp_get_group_public_status( $group = false ) { 38 _deprecated_function( __FUNCTION__, '6.0' ); 39 } 40 41 /** 42 * Output whether the current group in the loop is public. 43 * 44 * No longer used in BuddyPress. 45 * 46 * @deprecated 6.0.0 Not used anymore. 47 * 48 * @param object|bool $group Optional. Group object. 49 * Default: current group in loop. 50 */ 51 function bp_group_is_public( $group = false ) { 52 _deprecated_function( __FUNCTION__, '6.0' ); 53 } 54 /** 55 * Return whether the current group in the loop is public. 56 * 57 * No longer used in BuddyPress. 58 * 59 * @deprecated 6.0.0 Not used anymore. 60 * 61 * @param object|bool $group Optional. Group object. 62 * Default: current group in loop. 63 * @return mixed 64 */ 65 function bp_get_group_is_public( $group = false ) { 66 _deprecated_function( __FUNCTION__, '6.0' ); 67 } -
src/bp-groups/bp-groups-template.php
diff --git src/bp-groups/bp-groups-template.php src/bp-groups/bp-groups-template.php index 3ccfd2a22..ad172e72b 100644
function bp_group_description_excerpt( $group = false, $length = 225 ) { 1301 1301 return apply_filters( 'bp_get_group_description_excerpt', bp_create_excerpt( $group->description, $length ), $group ); 1302 1302 } 1303 1303 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 1304 /** 1381 1305 * Output the created date of the current group in the loop. 1382 1306 * -
src/class-buddypress.php
diff --git src/class-buddypress.php src/class-buddypress.php index 756dd5009..90d29afe0 100644
class BuddyPress { 508 508 require( $this->plugin_dir . 'bp-core/deprecated/2.9.php' ); 509 509 require( $this->plugin_dir . 'bp-core/deprecated/3.0.php' ); 510 510 require( $this->plugin_dir . 'bp-core/deprecated/4.0.php' ); 511 require( $this->plugin_dir . 'bp-core/deprecated/6.0.php' ); 511 512 } 512 513 513 514 // Load wp-cli module if PHP 5.4+