Changeset 7380 for trunk/src/includes/extend/buddypress/groups.php
- Timestamp:
- 12/05/2025 02:27:53 AM (6 months ago)
- File:
-
- 1 edited
-
trunk/src/includes/extend/buddypress/groups.php (modified) (45 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/extend/buddypress/groups.php
r7379 r7380 2 2 3 3 /** 4 * bbPress BuddyPress Group Extension Class 4 * bbPress BuddyPress Group Extension Class. 5 5 * 6 6 * This file is responsible for connecting bbPress to the BuddyPress Groups … … 17 17 if ( ! class_exists( 'BBP_Forums_Group_Extension' ) && class_exists( 'BP_Group_Extension' ) ) : 18 18 /** 19 * Loads Group Extension for Forums Component 19 * Loads Group Extension for Forums Component. 20 20 * 21 21 * @since 2.1.0 bbPress (r3552) … … 29 29 30 30 /** 31 * Setup bbPress group extension variables 31 * Setup bbPress group extension variables. 32 32 * 33 33 * @since 2.1.0 bbPress (r3552) … … 42 42 43 43 /** 44 * Setup the group forums class variables 44 * Setup the group forums class variables. 45 45 * 46 46 * @since 2.1.0 bbPress (r3552) … … 75 75 76 76 /** 77 * Setup the group forums class actions 77 * Setup the group forums class actions. 78 78 * 79 79 * @since 2.3.0 bbPress (r4552) … … 108 108 109 109 /** 110 * Setup the group forums class filters 110 * Setup the group forums class filters. 111 111 * 112 112 * @since 2.3.0 bbPress (r4552) … … 210 210 211 211 /** 212 * The primary display function for group forums 212 * The primary display function for group forums. 213 213 * 214 214 * @since 2.1.0 bbPress (r3746) … … 235 235 236 236 /** 237 * Maybe unset the group forum nav item if group does not have a forum 237 * Maybe unset the group forum nav item if group does not have a forum. 238 238 * 239 239 * @since 2.3.0 bbPress (r4552) 240 240 * 241 * @return If not viewing a single group 241 * @return If not viewing a single group. 242 242 */ 243 243 public function maybe_unset_forum_menu() { … … 339 339 * @since 2.6.14 340 340 * 341 * @param int $topic_id 341 * @param int $topic_id Topic id. 342 342 */ 343 343 public function validate_topic_forum_id( $topic_id = 0 ) { … … 400 400 * @since 2.6.14 401 401 * 402 * @param int $reply_id 402 * @param int $reply_id Reply id. 403 403 */ 404 404 public function validate_reply_to_id( $reply_id = 0 ) { … … 456 456 457 457 /** 458 * Show forums and new forum form when editing a group 458 * Show forums and new forum form when editing a group. 459 459 * 460 460 * @since 2.1.0 bbPress (r3563) … … 522 522 523 523 /** 524 * Save the Group Forum data on edit 524 * Save the Group Forum data on edit. 525 525 * 526 526 * @since 2.0.0 bbPress (r3465) 527 527 * 528 * @param int $group_id (to handle Group Admin UI hook bp_group_admin_edit_after )528 * @param int $group_id (to handle Group Admin UI hook bp_group_admin_edit_after). 529 529 */ 530 530 public function edit_screen_save( $group_id = 0 ) { … … 633 633 634 634 /** 635 * Adds a meta-box to BuddyPress Group Admin UI 635 * Adds a meta-box to BuddyPress Group Admin UI. 636 636 * 637 637 * @since 2.3.0 bbPress (r4814) … … 649 649 650 650 /** 651 * Displays the bbPress meta-box in BuddyPress Group Admin UI 651 * Displays the bbPress meta-box in BuddyPress Group Admin UI. 652 652 * 653 653 * @since 2.3.0 bbPress (r4814) 654 654 * 655 * @param object $item (group object) 655 * @param object $item (group object). 656 656 */ 657 657 public function group_admin_ui_display_metabox( $item ) { … … 662 662 663 663 /** 664 * Show forums and new forum form when creating a group 664 * Show forums and new forum form when creating a group. 665 665 * 666 666 * @since 2.0.0 bbPress (r3465) … … 692 692 693 693 /** 694 * Save the Group Forum data on create 694 * Save the Group Forum data on create. 695 695 * 696 696 * @since 2.0.0 bbPress (r3465) … … 781 781 782 782 /** 783 * Used to start an output buffer 783 * Used to start an output buffer. 784 784 * 785 785 * @since 2.1.0 bbPress (r3746) … … 790 790 791 791 /** 792 * Used to end an output buffer 792 * Used to end an output buffer. 793 793 * 794 794 * @since 2.1.0 bbPress (r3746) … … 799 799 800 800 /** 801 * Creating a group forum or category (including root for group) 801 * Creating a group forum or category (including root for group). 802 802 * 803 803 * @since 2.1.0 bbPress (r3653) … … 805 805 * @param array $forum_args 806 806 * 807 * @return void if no forum_id is available 807 * @return void if no forum_id is available. 808 808 */ 809 809 public function new_forum( $forum_args = array() ) { … … 825 825 826 826 /** 827 * Removing a group forum or category (including root for group) 827 * Removing a group forum or category (including root for group). 828 828 * 829 829 * @since 2.1.0 bbPress (r3653) … … 831 831 * @param array $forum_args 832 832 * 833 * @return void if no forum_id is available 833 * @return void if no forum_id is available. 834 834 */ 835 835 public function remove_forum( $forum_args = array() ) { … … 851 851 852 852 /** 853 * Listening to BuddyPress Group deletion to remove the forum 853 * Listening to BuddyPress Group deletion to remove the forum. 854 854 * 855 855 * @since 2.3.0 bbPress (r4815) 856 856 * 857 * @param int $group_id The group ID 857 * @param int $group_id The group ID. 858 858 */ 859 859 public function disconnect_forum_from_group( $group_id = 0 ) { … … 888 888 * Update forum attributes to match those of the associated group. 889 889 * 890 * Fired whenever a group is saved 890 * Fired whenever a group is saved. 891 891 * 892 892 * @since 2.6.7 bbPress (r7208) … … 968 968 969 969 /** 970 * Toggle the enable_forum group setting on or off 970 * Toggle the enable_forum group setting on or off. 971 971 * 972 972 * @since 2.3.0 bbPress (r4612) 973 973 * 974 * @param int $group_id The group to toggle 975 * @param bool $enabled True for on, false for off 976 * @return False if group is not found, otherwise return the group 974 * @param int $group_id The group to toggle. 975 * @param bool $enabled True for on, false for off. 976 * @return False if group is not found, otherwise return the group. 977 977 */ 978 978 public function toggle_group_forum( $group_id = 0, $enabled = false ) { … … 1007 1007 1008 1008 /** 1009 * Output the forums for a group in the edit screens 1009 * Output the forums for a group in the edit screens. 1010 1010 * 1011 1011 * As of right now, bbPress only supports 1-to-1 group forum relationships. … … 1241 1241 1242 1242 /** 1243 * Strip super stickies from the topic query 1243 * Strip super stickies from the topic query. 1244 1244 * 1245 1245 * @since 2.3.0 bbPress (r4810) 1246 1246 * 1247 1247 * @access private 1248 * @param array $super the super sticky post ID's 1248 * @param array $super the super sticky post ID's. 1249 1249 * @return array (empty) 1250 1250 */ … … 1255 1255 1256 1256 /** 1257 * Unset the type super sticky from topic type 1257 * Unset the type super sticky from topic type. 1258 1258 * 1259 1259 * @since 2.3.0 bbPress (r4810) … … 1261 1261 * @access private 1262 1262 * @param array $args 1263 * @return array $args without the to-front link 1263 * @return array $args without the to-front link. 1264 1264 */ 1265 1265 public function unset_super_sticky( $args = array() ) { … … 1271 1271 1272 1272 /** 1273 * Ugly preg_replace to hide the to front admin link 1273 * Ugly preg_replace to hide the to front admin link. 1274 1274 * 1275 1275 * @since 2.3.0 bbPress (r4810) … … 1278 1278 * @param string $retval 1279 1279 * @param array $args 1280 * @return string $retval without the to-front link 1280 * @return string $retval without the to-front link. 1281 1281 */ 1282 1282 public function hide_super_sticky_admin_link( $retval = '', $args = array() ) { … … 1291 1291 1292 1292 /** 1293 * Redirect to the group forum screen 1293 * Redirect to the group forum screen. 1294 1294 * 1295 1295 * @since 2.1.0 bbPress (r3653) … … 1309 1309 1310 1310 /** 1311 * Redirect to the group forum screen 1311 * Redirect to the group forum screen. 1312 1312 * 1313 1313 * @since 2.1.0 bbPress (r3653) … … 1342 1342 1343 1343 /** 1344 * Redirect to the group admin forum edit screen 1344 * Redirect to the group admin forum edit screen. 1345 1345 * 1346 1346 * @since 2.1.0 bbPress (r3653) … … 1529 1529 1530 1530 /** 1531 * Maybe map a bbPress forum/topic/reply permalink to the corresponding group 1531 * Maybe map a bbPress forum/topic/reply permalink to the corresponding group. 1532 1532 * 1533 1533 * @since 2.2.0 bbPress (r4266) 1534 1534 * 1535 1535 * @param int $post_id 1536 * @return Bail early if not a group forum post 1536 * @return Bail early if not a group forum post. 1537 1537 * @return string 1538 1538 */ … … 1585 1585 1586 1586 /** 1587 * Map a forum permalink to its corresponding group 1587 * Map a forum permalink to its corresponding group. 1588 1588 * 1589 1589 * @since 2.1.0 bbPress (r3802) … … 1598 1598 1599 1599 /** 1600 * Map a topic permalink to its group forum 1600 * Map a topic permalink to its group forum. 1601 1601 * 1602 1602 * @since 2.1.0 bbPress (r3802) … … 1611 1611 1612 1612 /** 1613 * Map a reply permalink to its group forum 1613 * Map a reply permalink to its group forum. 1614 1614 * 1615 1615 * @since 2.1.0 bbPress (r3802) … … 1624 1624 1625 1625 /** 1626 * Map a reply edit link to its group forum 1626 * Map a reply edit link to its group forum. 1627 1627 * 1628 1628 * @since 2.2.0 bbPress (r4266) … … 1643 1643 1644 1644 /** 1645 * Map a post link to its group forum 1645 * Map a post link to its group forum. 1646 1646 * 1647 1647 * @since 2.2.0 bbPress (r4266) … … 1657 1657 1658 1658 /** 1659 * Map a page link to its group forum 1659 * Map a page link to its group forum. 1660 1660 * 1661 1661 * @since 2.2.0 bbPress (r4266) … … 1671 1671 1672 1672 /** 1673 * Map a custom post type link to its group forum 1673 * Map a custom post type link to its group forum. 1674 1674 * 1675 1675 * @since 2.2.0 bbPress (r4266) … … 1686 1686 1687 1687 /** 1688 * Fix pagination of topics on forum view 1688 * Fix pagination of topics on forum view. 1689 1689 * 1690 1690 * @since 2.2.0 bbPress (r4266) … … 1706 1706 1707 1707 /** 1708 * Fix pagination of replies on topic view 1708 * Fix pagination of replies on topic view. 1709 1709 * 1710 1710 * @since 2.2.0 bbPress (r4266) … … 1732 1732 * @since 2.6.14 1733 1733 * 1734 * @param object $query Verified query object 1735 * @param string $type Type of variable to compare to 1736 * @return mixed Verified object if valid, Default or null if invalid 1734 * @param object $query Verified query object. 1735 * @param string $type Type of variable to compare to. 1736 * @return mixed Verified object if valid, Default or null if invalid. 1737 1737 */ 1738 1738 public function rewrite_pagination( $query, $type = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.