PluginProbe
bbPress / 2.6.19
bbPress v2.6.19
2.6.19 2.6.18 2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 All 74 releases
← All changes | includes/extend/buddypress/groups.php +113 -68 2.6.17 → 2.6.19 View file →
@@ -42,9 +42,9 @@
42 42
43 43 /**
44 44 * Setup the group forums class variables
45 45 *
46 - * @since 2.1.0 bbPress (r3552)
46 + * @since 2.3.0 bbPress (r4553)
47 47 */
48 48 private function setup_variables() {
49 49
50 50 // Component Name
@@ -75,9 +75,9 @@
75 75
76 76 /**
77 77 * Setup the group forums class actions
78 78 *
79 - * @since 2.3.0 bbPress (r4552)
79 + * @since 2.3.0 bbPress (r4553)
80 80 */
81 81 private function setup_actions() {
82 82
83 83 // Possibly redirect
@@ -108,9 +108,9 @@
108 108
109 109 /**
110 110 * Setup the group forums class filters
111 111 *
112 - * @since 2.3.0 bbPress (r4552)
112 + * @since 2.3.0 bbPress (r4553)
113 113 */
114 114 private function setup_filters() {
115 115
116 116 // Group forum pagination
@@ -167,9 +167,9 @@
167 167
168 168 /**
169 169 * Check whether a user can view a private or hidden group forum.
170 170 *
171 - * @since 2.6.17
171 + * @since 2.6.17 bbPress (r7496)
172 172 *
173 173 * @param int $user_id User ID.
174 174 * @param int $forum_id Forum ID.
175 175 * @return bool|null Whether the user can view the group forum, or null when
@@ -202,9 +202,9 @@
202 202
203 203 /**
204 204 * Map read access for private and hidden group forums in every request.
205 205 *
206 - * @since 2.6.17
206 + * @since 2.6.17 bbPress (r7496)
207 207 *
208 208 * @param array $caps Capabilities for the meta capability.
209 209 * @param string $cap Capability name.
210 210 * @param int $user_id User ID.
@@ -235,9 +235,10 @@
235 235
236 236 /**
237 237 * Exclude private and hidden group forums a user cannot view.
238 238 *
239 - * @since 2.6.17
239 + * @since 2.6.17 bbPress (r7496)
240 + * @since 2.6.19 bbPress (r7678) Exclude unreadable descendants.
240 241 *
241 242 * @param array $forum_ids Forum IDs already excluded.
242 243 * @return array Forum IDs the user cannot view.
243 244 */
@@ -252,9 +253,36 @@
252 253 continue;
253 254 }
254 255
255 256 if ( ! user_can( $user_id, 'read_forum', $forum_id ) ) {
257 + // Exclude descendants too, except those this user can read.
258 + $parents = array( $forum_id );
259 + $seen = array( $forum_id => true );
260 + $readable = array();
256 261 $forum_ids[] = $forum_id;
262 +
263 + while ( ! empty( $parents ) ) {
264 + $parent_id = array_shift( $parents );
265 +
266 + foreach ( bbp_forum_query_all_subforum_ids( $parent_id ) as $child_id ) {
267 + $child_id = (int) $child_id;
268 +
269 + if ( isset( $seen[ $child_id ] ) ) {
270 + continue;
271 + }
272 +
273 + $seen[ $child_id ] = true;
274 + $parents[] = $child_id;
275 +
276 + if ( user_can( $user_id, 'read_forum', $child_id ) ) {
277 + $readable[] = $child_id;
278 + } else {
279 + $forum_ids[] = $child_id;
280 + }
281 + }
282 + }
283 +
284 + $forum_ids = array_diff( $forum_ids, $readable );
257 285 continue;
258 286 }
259 287
260 288 // Include readable descendants that inherited this restriction
@@ -280,9 +308,9 @@
280 308 *
281 309 * Unlike the request-specific capability mapping, this check accepts an
282 310 * explicit user ID so it can validate subscription recipients.
283 311 *
284 - * @since 2.6.17
312 + * @since 2.6.17 bbPress (r7494)
285 313 *
286 314 * @param bool $retval Whether the user can view the forum.
287 315 * @param int $user_id User ID.
288 316 * @param int $forum_id Forum ID.
@@ -308,9 +336,9 @@
308 336 * Ensure that bbp_is_single_forum() returns true on group forum pages.
309 337 *
310 338 * @see https://bbpress.trac.wordpress.org/ticket/2974
311 339 *
312 - * @since 2.6.0 bbPress (r6366)
340 + * @since 2.6.0 bbPress (r6367)
313 341 *
314 342 * @param bool $retval Current boolean.
315 343 * @return bool
316 344 */
@@ -346,9 +374,9 @@
346 374
347 375 /**
348 376 * The primary display function for group forums
349 377 *
350 - * @since 2.1.0 bbPress (r3746)
378 + * @since 2.1.0 bbPress (r3552)
351 379 *
352 380 * @param int $group_id ID of the current group. Available only on BP 2.2+.
353 381 */
354 382 public function display( $group_id = null ) {
@@ -371,9 +399,9 @@
371 399
372 400 /**
373 401 * Maybe unset the group forum nav item if group does not have a forum
374 402 *
375 - * @since 2.3.0 bbPress (r4552)
403 + * @since 2.3.0 bbPress (r4553)
376 404 *
377 405 * @return If not viewing a single group
378 406 */
379 407 public function maybe_unset_forum_menu() {
@@ -392,9 +420,9 @@
392 420
393 421 /**
394 422 * Allow group members to have advanced privileges in group forum topics.
395 423 *
396 - * @since 2.2.0 bbPress (r4434)
424 + * @since 2.3.0 bbPress (r4716)
397 425 *
398 426 * @param array $caps
399 427 * @param string $cap
400 428 * @param int $user_id
@@ -487,12 +515,12 @@
487 515
488 516 /**
489 517 * Remove the topic meta cap map, so it doesn't interfere with sidebars.
490 518 *
491 - * @since 2.2.0 bbPress (r4434)
519 + * @since 2.3.0 bbPress (r4717)
492 520 */
493 521 public function remove_group_forum_meta_cap_map() {
494 - remove_filter( 'bbp_map_meta_caps', array( $this, 'map_group_forum_meta_caps' ), 99, 4 );
522 + remove_filter( 'bbp_map_meta_caps', array( $this, 'map_group_forum_meta_caps' ), 10 );
495 523 }
496 524
497 525 /**
498 526 * Validate the forum ID for a topic in a group forum.
@@ -504,9 +532,9 @@
504 532 * - A forum the current user can moderate outside of this group
505 533 *
506 534 * If all checks fail, an error gets added to prevent the topic from saving.
507 535 *
508 - * @since 2.6.14
536 + * @since 2.6.4 bbPress (r7059)
509 537 *
510 538 * @param int $topic_id
511 539 */
512 540 public function validate_topic_forum_id( $topic_id = 0 ) {
@@ -565,9 +593,9 @@
565 593 * be saved to the current topic.
566 594 *
567 595 * If all checks fail, an error gets added to prevent the reply from saving.
568 596 *
569 - * @since 2.6.14
597 + * @since 2.6.4 bbPress (r7059)
570 598 *
571 599 * @param int $reply_id
572 600 */
573 601 public function validate_reply_to_id( $reply_id = 0 ) {
@@ -625,9 +653,9 @@
625 653
626 654 /**
627 655 * Show forums and new forum form when editing a group
628 656 *
629 - * @since 2.1.0 bbPress (r3563)
657 + * @since 2.1.0 bbPress (r3552)
630 658 *
631 659 * @param object $group (the group to edit if in Group Admin UI)
632 660 */
633 661 public function edit_screen( $group = false ) {
@@ -691,9 +719,9 @@
691 719
692 720 /**
693 721 * Save the Group Forum data on edit
694 722 *
695 - * @since 2.0.0 bbPress (r3465)
723 + * @since 2.1.0 bbPress (r3552)
696 724 *
697 725 * @param int $group_id (to handle Group Admin UI hook bp_group_admin_edit_after )
698 726 */
699 727 public function edit_screen_save( $group_id = 0 ) {
@@ -729,9 +757,9 @@
729 757 // Normalize group forum relationships now
730 758 if ( ! empty( $forum_ids ) ) {
731 759
732 760 // Loop through forums, and make sure they exist
733 - foreach ( $forum_ids as $forum_id ) {
761 + foreach ( $forum_ids as $index => $forum_id ) {
734 762
735 763 // Look for forum
736 764 $forum = bbp_get_forum( $forum_id );
737 765
@@ -736,22 +764,28 @@
736 764 $forum = bbp_get_forum( $forum_id );
737 765
738 766 // No forum exists, so break the relationship
739 767 if ( empty( $forum ) ) {
740 - $this->remove_forum( array( 'forum_id' => $forum_id ) );
741 - unset( $forum_ids[ $forum_id ] );
768 + $this->remove_forum(
769 + array(
770 + 'forum_id' => $forum_id,
771 + 'group_id' => $group_id
772 + )
773 + );
774 + unset( $forum_ids[ $index ] );
742 775 }
743 776 }
744 777
745 778 // No support for multiple forums yet
746 - $forum_id = (int) ( is_array( $forum_ids )
747 - ? $forum_ids[0]
748 - : $forum_ids );
779 + $forum_ids = array_values( $forum_ids );
780 + $forum_id = ! empty( $forum_ids ) ? (int) $forum_ids[0] : 0;
749 781 }
750 782
751 783 // Update the group ID and forum ID relationships
752 784 bbp_update_group_forum_ids( $group_id, (array) $forum_ids );
753 - bbp_update_forum_group_ids( $forum_id, (array) $group_id );
785 + if ( ! empty( $forum_id ) ) {
786 + bbp_update_forum_group_ids( $forum_id, (array) $group_id );
787 + }
754 788
755 789 // Update the group forum setting
756 790 $group = $this->toggle_group_forum( $group_id, $edit_forum );
757 791
@@ -802,9 +836,9 @@
802 836
803 837 /**
804 838 * Adds a meta-box to BuddyPress Group Admin UI
805 839 *
806 - * @since 2.3.0 bbPress (r4814)
840 + * @since 2.3.0 bbPress (r4815)
807 841 */
808 842 public function group_admin_ui_edit_screen() {
809 843 add_meta_box(
810 844 'bbpress_group_admin_ui_meta_box',
@@ -818,9 +852,9 @@
818 852
819 853 /**
820 854 * Displays the bbPress meta-box in BuddyPress Group Admin UI
821 855 *
822 - * @since 2.3.0 bbPress (r4814)
856 + * @since 2.3.0 bbPress (r4815)
823 857 *
824 858 * @param object $item (group object)
825 859 */
826 860 public function group_admin_ui_display_metabox( $item ) {
@@ -831,9 +865,9 @@
831 865
832 866 /**
833 867 * Show forums and new forum form when creating a group
834 868 *
835 - * @since 2.0.0 bbPress (r3465)
869 + * @since 2.1.0 bbPress (r3552)
836 870 */
837 871 public function create_screen( $group_id = 0 ) {
838 872
839 873 // Bail if not looking at this screen
@@ -861,9 +895,9 @@
861 895
862 896 /**
863 897 * Save the Group Forum data on create
864 898 *
865 - * @since 2.0.0 bbPress (r3465)
899 + * @since 2.1.0 bbPress (r3552)
866 900 */
867 901 public function create_screen_save( $group_id = 0 ) {
868 902
869 903 // Nonce check
@@ -968,9 +1002,9 @@
968 1002
969 1003 /**
970 1004 * Creating a group forum or category (including root for group)
971 1005 *
972 - * @since 2.1.0 bbPress (r3653)
1006 + * @since 2.1.0 bbPress (r3654)
973 1007 *
974 1008 * @param array $forum_args
975 1009 *
976 1010 * @return void if no forum_id is available
@@ -992,9 +1026,9 @@
992 1026
993 1027 /**
994 1028 * Removing a group forum or category (including root for group)
995 1029 *
996 - * @since 2.1.0 bbPress (r3653)
1030 + * @since 2.1.0 bbPress (r3654)
997 1031 *
998 1032 * @param array $forum_args
999 1033 *
1000 1034 * @return void if no forum_id is available
@@ -1011,8 +1045,14 @@
1011 1045 $group_id = ! empty( $forum_args['group_id'] ) ? $forum_args['group_id'] : bp_get_current_group_id();
1012 1046
1013 1047 bbp_remove_forum_id_from_group( $group_id, $forum_id );
1014 1048 bbp_remove_group_id_from_forum( $forum_id, $group_id );
1049 +
1050 + // A private group forum must not become a regular private forum when
1051 + // its last group relationship is removed.
1052 + if ( empty( bbp_get_forum_group_ids( $forum_id ) ) && bbp_is_forum_private( $forum_id, false ) ) {
1053 + bbp_hide_forum( $forum_id, bbp_get_private_status_id() );
1054 + }
1015 1055 }
1016 1056
1017 1057 /**
1018 1058 * Listening to BuddyPress Group deletion to remove the forum
@@ -1035,19 +1075,16 @@
1035 1075 if ( empty( $forum_ids ) ) {
1036 1076 return;
1037 1077 }
1038 1078
1039 - // Get the first forum ID
1040 - $forum_id = (int) is_array( $forum_ids )
1041 - ? $forum_ids[0]
1042 - : $forum_ids;
1043 -
1044 - $this->remove_forum(
1045 - array(
1046 - 'forum_id' => $forum_id,
1047 - 'group_id' => $group_id
1048 - )
1049 - );
1079 + foreach ( (array) $forum_ids as $forum_id ) {
1080 + $this->remove_forum(
1081 + array(
1082 + 'forum_id' => (int) $forum_id,
1083 + 'group_id' => $group_id
1084 + )
1085 + );
1086 + }
1050 1087 }
1051 1088
1052 1089 /**
1053 1090 * Update forum attributes to match those of the associated group.
@@ -1053,9 +1090,9 @@
1053 1090 * Update forum attributes to match those of the associated group.
1054 1091 *
1055 1092 * Fired whenever a group is saved
1056 1093 *
1057 - * @since 2.6.7 bbPress (r7208)
1094 + * @since 2.6.7 bbPress (r7209)
1058 1095 *
1059 1096 * @param BP_Groups_Group $group Group object.
1060 1097 */
1061 1098 public static function update_group_forum( BP_Groups_Group $group ) {
@@ -1133,9 +1170,9 @@
1133 1170
1134 1171 /**
1135 1172 * Toggle the enable_forum group setting on or off
1136 1173 *
1137 - * @since 2.3.0 bbPress (r4612)
1174 + * @since 2.3.0 bbPress (r4613)
1138 1175 *
1139 1176 * @param int $group_id The group to toggle
1140 1177 * @param bool $enabled True for on, false for off
1141 1178 * @return False if group is not found, otherwise return the group
@@ -1175,9 +1212,9 @@
1175 1212 *
1176 1213 * As of right now, bbPress only supports 1-to-1 group forum relationships.
1177 1214 * In the future, many-to-many should be allowed.
1178 1215 *
1179 - * @since 2.1.0 bbPress (r3653)
1216 + * @since 2.1.0 bbPress (r3746)
1180 1217 */
1181 1218 public function display_forums( $offset = 0 ) {
1182 1219
1183 1220 // Allow actions immediately before group forum output
@@ -1339,10 +1376,18 @@
1339 1376 'posts_per_page' => 1
1340 1377 )
1341 1378 );
1342 1379
1380 + // Check the reply and its topic before rendering either one.
1381 + $reply_visible = bbp_replies();
1382 + if ( $reply_visible ) {
1383 + $reply_id = bbp_get_reply_id( $bbp->reply_query->post->ID );
1384 + $topic_id = bbp_get_reply_topic_id( $reply_id );
1385 + $reply_visible = ( bbp_is_reply_public( $reply_id ) || current_user_can( 'read_reply', $reply_id ) ) && ( bbp_is_topic_public( $topic_id ) || current_user_can( 'read_topic', $topic_id ) );
1386 + }
1387 +
1343 1388 // If no topic, 404
1344 - if ( ! bbp_replies() ) {
1389 + if ( ! $reply_visible ) {
1345 1390 bp_do_404( bbp_get_forum_permalink( $forum_id ) );
1346 1391
1347 1392 // Only wrap title in H2 if not empty
1348 1393 $title = bbp_get_forum_title();
@@ -1405,9 +1450,9 @@
1405 1450
1406 1451 /**
1407 1452 * Strip super stickies from the topic query
1408 1453 *
1409 - * @since 2.3.0 bbPress (r4810)
1454 + * @since 2.3.0 bbPress (r4809)
1410 1455 *
1411 1456 * @access private
1412 1457 * @param array $super the super sticky post ID's
1413 1458 * @return array (empty)
@@ -1419,9 +1464,9 @@
1419 1464
1420 1465 /**
1421 1466 * Unset the type super sticky from topic type
1422 1467 *
1423 - * @since 2.3.0 bbPress (r4810)
1468 + * @since 2.3.0 bbPress (r4809)
1424 1469 *
1425 1470 * @access private
1426 1471 * @param array $args
1427 1472 * @return array $args without the to-front link
@@ -1435,9 +1480,9 @@
1435 1480
1436 1481 /**
1437 1482 * Ugly preg_replace to hide the to front admin link
1438 1483 *
1439 - * @since 2.3.0 bbPress (r4810)
1484 + * @since 2.3.0 bbPress (r4809)
1440 1485 *
1441 1486 * @access private
1442 1487 * @param string $retval
1443 1488 * @param array $args
@@ -1455,9 +1500,9 @@
1455 1500
1456 1501 /**
1457 1502 * Redirect to the group forum screen
1458 1503 *
1459 - * @since 2.1.0 bbPress (r3653)
1504 + * @since 2.1.0 bbPress (r3789)
1460 1505 *
1461 1506 * @param str $redirect_url
1462 1507 * @param str $redirect_to
1463 1508 */
@@ -1473,9 +1518,9 @@
1473 1518
1474 1519 /**
1475 1520 * Redirect to the group forum screen
1476 1521 *
1477 - * @since 2.1.0 bbPress (r3653)
1522 + * @since 2.1.0 bbPress (r3799)
1478 1523 */
1479 1524 public function new_reply_redirect_to( $redirect_url = '', $redirect_to = '', $reply_id = 0 ) {
1480 1525
1481 1526 if ( bp_is_group() ) {
@@ -1506,9 +1551,9 @@
1506 1551
1507 1552 /**
1508 1553 * Redirect to the group admin forum edit screen
1509 1554 *
1510 - * @since 2.1.0 bbPress (r3653)
1555 + * @since 2.1.0 bbPress (r3654)
1511 1556 */
1512 1557 public function edit_redirect_to( $redirect_url = '' ) {
1513 1558
1514 1559 // Get the current group, if there is one
@@ -1584,9 +1629,9 @@
1584 1629
1585 1630 /**
1586 1631 * Permissions to view the 'New Topic'/'Reply To' form in a BuddyPress group.
1587 1632 *
1588 - * @since 2.3.0 bbPress (r4608)
1633 + * @since 2.3.0 bbPress (r4609)
1589 1634 *
1590 1635 * @param bool $retval Are we allowed to view the reply form?
1591 1636 *
1592 1637 * @return bool
@@ -1619,9 +1664,9 @@
1619 1664 *
1620 1665 * Due to the way BuddyPress' group admin settings page saves its settings,
1621 1666 * we need to let BP know that bbPress added a forum.
1622 1667 *
1623 - * @since 2.4.0 bbPress (r5026)
1668 + * @since 2.4.0 bbPress (r5027)
1624 1669 *
1625 1670 * @link https://bbpress.trac.wordpress.org/ticket/2339/
1626 1671 * @see groups_screen_group_admin_settings()
1627 1672 */
@@ -1641,9 +1686,9 @@
1641 1686
1642 1687 /**
1643 1688 * Get the URL for a group.
1644 1689 *
1645 - * @since 2.6.14
1690 + * @since 2.6.14 bbPress (r7317)
1646 1691 *
1647 1692 * @param int $group_id
1648 1693 * @return string
1649 1694 */
@@ -1667,9 +1712,9 @@
1667 1712
1668 1713 /**
1669 1714 * Get the management URL for a group.
1670 1715 *
1671 - * @since 2.6.14
1716 + * @since 2.6.14 bbPress (r7317)
1672 1717 *
1673 1718 * @param int $group_id
1674 1719 * @return string
1675 1720 */
@@ -1693,9 +1738,9 @@
1693 1738
1694 1739 /**
1695 1740 * Maybe map a bbPress forum/topic/reply permalink to the corresponding group
1696 1741 *
1697 - * @since 2.2.0 bbPress (r4266)
1742 + * @since 2.2.0 bbPress (r4395)
1698 1743 *
1699 1744 * @param int $post_id
1700 1745 * @return Bail early if not a group forum post
1701 1746 * @return string
@@ -1749,9 +1794,9 @@
1749 1794
1750 1795 /**
1751 1796 * Map a forum permalink to its corresponding group
1752 1797 *
1753 - * @since 2.1.0 bbPress (r3802)
1798 + * @since 2.1.0 bbPress (r3746)
1754 1799 *
1755 1800 * @param string $url
1756 1801 * @param int $forum_id
1757 1802 * @return string
@@ -1762,9 +1807,9 @@
1762 1807
1763 1808 /**
1764 1809 * Map a topic permalink to its group forum
1765 1810 *
1766 - * @since 2.1.0 bbPress (r3802)
1811 + * @since 2.1.0 bbPress (r3746)
1767 1812 *
1768 1813 * @param string $url
1769 1814 * @param int $topic_id
1770 1815 * @return string
@@ -1775,9 +1820,9 @@
1775 1820
1776 1821 /**
1777 1822 * Map a reply permalink to its group forum
1778 1823 *
1779 - * @since 2.1.0 bbPress (r3802)
1824 + * @since 2.1.0 bbPress (r3746)
1780 1825 *
1781 1826 * @param string $url
1782 1827 * @param int $reply_id
1783 1828 * @return string
@@ -1788,9 +1833,9 @@
1788 1833
1789 1834 /**
1790 1835 * Map a reply edit link to its group forum
1791 1836 *
1792 - * @since 2.2.0 bbPress (r4266)
1837 + * @since 2.2.0 bbPress (r4395)
1793 1838 *
1794 1839 * @param string $url
1795 1840 * @param int $reply_id
1796 1841 * @return string
@@ -1807,9 +1852,9 @@
1807 1852
1808 1853 /**
1809 1854 * Map a post link to its group forum
1810 1855 *
1811 - * @since 2.2.0 bbPress (r4266)
1856 + * @since 2.2.0 bbPress (r4395)
1812 1857 *
1813 1858 * @param string $url
1814 1859 * @param obj $post
1815 1860 * @param boolean $leavename
@@ -1821,9 +1866,9 @@
1821 1866
1822 1867 /**
1823 1868 * Map a page link to its group forum
1824 1869 *
1825 - * @since 2.2.0 bbPress (r4266)
1870 + * @since 2.2.0 bbPress (r4395)
1826 1871 *
1827 1872 * @param string $url
1828 1873 * @param int $post_id
1829 1874 * @param $sample
@@ -1835,9 +1880,9 @@
1835 1880
1836 1881 /**
1837 1882 * Map a custom post type link to its group forum
1838 1883 *
1839 - * @since 2.2.0 bbPress (r4266)
1884 + * @since 2.2.0 bbPress (r4395)
1840 1885 *
1841 1886 * @param string $url
1842 1887 * @param obj $post
1843 1888 * @param $leavename
@@ -1850,9 +1895,9 @@
1850 1895
1851 1896 /**
1852 1897 * Fix pagination of topics on forum view
1853 1898 *
1854 - * @since 2.2.0 bbPress (r4266)
1899 + * @since 2.2.0 bbPress (r4395)
1855 1900 *
1856 1901 * @param array $args
1857 1902 * @return array
1858 1903 */
@@ -1870,9 +1915,9 @@
1870 1915
1871 1916 /**
1872 1917 * Fix pagination of replies on topic view
1873 1918 *
1874 - * @since 2.2.0 bbPress (r4266)
1919 + * @since 2.2.0 bbPress (r4395)
1875 1920 *
1876 1921 * @param array $args
1877 1922 * @return array
1878 1923 */
@@ -1892,9 +1937,9 @@
1892 1937 *
1893 1938 * Required for compatibility with BuddyPress > 12.0, where the /groups/
1894 1939 * rewrite rule will be caught before bbPress's /page/ rule.
1895 1940 *
1896 - * @since 2.6.14
1941 + * @since 2.6.14 bbPress (r7317)
1897 1942 *
1898 1943 * @param object object Verified object
1899 1944 * @param string $type Type of variable to check with `is_a()`
1900 1945 * @return mixed $object Verified object if valid, Default or null if invalid
@@ -1950,9 +1995,9 @@
1950 1995 /**
1951 1996 * Ensure that forum content associated with a BuddyPress group can only be
1952 1997 * viewed via the group URL.
1953 1998 *
1954 - * @since 2.1.0 bbPress (r3802)
1999 + * @since 2.2.0 bbPress (r4395)
1955 2000 */
1956 2001 public function redirect_canonical() {
1957 2002
1958 2003 // Bail if on a RSS feed
@@ -2000,9 +2045,9 @@
2000 2045
2001 2046 /**
2002 2047 * Map a forum post to its corresponding group in the group activity stream.
2003 2048 *
2004 - * @since 2.2.0 bbPress (r4396)
2049 + * @since 2.2.0 bbPress (r4399)
2005 2050 *
2006 2051 * @param array $args Arguments from BBP_BuddyPress_Activity::record_activity()
2007 2052 *
2008 2053 * @return array