Changeset 7380 for trunk/src/includes/extend/buddypress/functions.php
- Timestamp:
- 12/05/2025 02:27:53 AM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/extend/buddypress/functions.php
r7379 r7380 2 2 3 3 /** 4 * Main bbPress BuddyPress Class 4 * Main bbPress BuddyPress Class. 5 5 * 6 6 * @package bbPress … … 24 24 25 25 /** 26 * Return component name/ID ('forums' by default) 26 * Return component name/ID ('forums' by default). 27 27 * 28 28 * This is used primarily for Notifications integration. … … 44 44 45 45 /** 46 * Filter the current bbPress user ID with the current BuddyPress user ID 46 * Filter the current bbPress user ID with the current BuddyPress user ID. 47 47 * 48 48 * @since 2.1.0 bbPress (r3552) … … 80 80 81 81 /** 82 * Filter the bbPress is_single_user function with BuddyPress equivalent 83 * 84 * @since 2.1.0 bbPress (r3552) 85 * 86 * @param bool $is Optional. Default false 87 * @return bool True if viewing single user, false if not 82 * Filter the bbPress is_single_user function with BuddyPress equivalent. 83 * 84 * @since 2.1.0 bbPress (r3552) 85 * 86 * @param bool $is Optional. Default false. 87 * @return bool True if viewing single user, false if not. 88 88 */ 89 89 function bbp_filter_is_single_user( $is = false ) { … … 96 96 97 97 /** 98 * Filter the bbPress is_user_home function with BuddyPress equivalent 99 * 100 * @since 2.1.0 bbPress (r3552) 101 * 102 * @param bool $is Optional. Default false 103 * @return bool True if viewing single user, false if not 98 * Filter the bbPress is_user_home function with BuddyPress equivalent. 99 * 100 * @since 2.1.0 bbPress (r3552) 101 * 102 * @param bool $is Optional. Default false. 103 * @return bool True if viewing single user, false if not. 104 104 */ 105 105 function bbp_filter_is_user_home( $is = false ) { … … 112 112 113 113 /** 114 * Add the topic title to the <title> if viewing a single group forum topic 114 * Add the topic title to the <title> if viewing a single group forum topic. 115 115 * 116 116 * @since 2.5.0 bbPress (r5161) 117 117 * 118 * @param string $new_title The title to filter 119 * @param string $old_title (Not used) 120 * @param string $sep The separator to u se121 * @return string The possibly modified title 118 * @param string $new_title The title to filter. 119 * @param string $old_title (Not used). 120 * @param string $sep The separator to u.se 121 * @return string The possibly modified title. 122 122 */ 123 123 function bbp_filter_modify_page_title( $new_title = '', $old_title = '', $sep = '' ) { … … 151 151 152 152 /** 153 * Hook bbPress topics template into plugins template 153 * Hook bbPress topics template into plugins template. 154 154 * 155 155 * @since 2.1.0 bbPress (r3552) … … 161 161 162 162 /** 163 * Hook bbPress replies template into plugins template 163 * Hook bbPress replies template into plugins template. 164 164 * 165 165 * @since 2.1.0 bbPress (r3552) … … 171 171 172 172 /** 173 * Hook bbPress engagements template into plugins template 173 * Hook bbPress engagements template into plugins template. 174 174 * 175 175 * @since 2.6.0 bbPress (r6320) … … 181 181 182 182 /** 183 * Hook bbPress favorites template into plugins template 183 * Hook bbPress favorites template into plugins template. 184 184 * 185 185 * @since 2.1.0 bbPress (r3552) … … 191 191 192 192 /** 193 * Hook bbPress subscriptions template into plugins template 193 * Hook bbPress subscriptions template into plugins template. 194 194 * 195 195 * @since 2.1.0 bbPress (r3552) … … 203 203 204 204 /** 205 * Get the topics created template part 205 * Get the topics created template part. 206 206 * 207 207 * @since 2.1.0 bbPress (r3552) … … 220 220 221 221 /** 222 * Get the topics replied to template part 222 * Get the topics replied to template part. 223 223 * 224 224 * @since 2.1.0 bbPress (r3552) … … 237 237 238 238 /** 239 * Get the topic engagements template part 239 * Get the topic engagements template part. 240 240 * 241 241 * @since 2.6.0 bbPress (r6320) … … 254 254 255 255 /** 256 * Get the topics favorited template part 256 * Get the topics favorited template part. 257 257 * 258 258 * @since 2.1.0 bbPress (r3552) … … 271 271 272 272 /** 273 * Get the topics subscribed template part 273 * Get the topics subscribed template part. 274 274 * 275 275 * @since 2.1.0 bbPress (r3552) … … 290 290 291 291 /** 292 * Clean up the group root setting if the forum is being deleted 292 * Clean up the group root setting if the forum is being deleted. 293 293 * 294 294 * @since 2.6.0 bbPress (r6479) 295 295 * 296 * @param int $forum_id The forum ID being deleted 296 * @param int $forum_id The forum ID being deleted. 297 297 */ 298 298 function bbp_maybe_delete_group_forum_root( $forum_id = 0 ) { … … 314 314 315 315 /** 316 * Handle the new group forum root creation 316 * Handle the new group forum root creation. 317 317 * 318 318 * @since 2.6.0 bbPress (r6479) … … 372 372 373 373 /** 374 * Get forum ID's for a group 374 * Get forum ID's for a group. 375 375 * 376 376 * @since 2.1.0 bbPress (r3653) 377 377 * 378 * @param int $group_id 378 * @param int $group_id Group id. 379 379 */ 380 380 function bbp_get_group_forum_ids( $group_id = 0 ) { … … 401 401 402 402 /** 403 * Get group ID's for a forum 403 * Get group ID's for a forum. 404 404 * 405 405 * @since 2.1.0 bbPress (r3653) 406 406 * 407 * @param int $forum_id 407 * @param int $forum_id Forum id. 408 408 */ 409 409 function bbp_get_forum_group_ids( $forum_id = 0 ) { … … 430 430 431 431 /** 432 * Get forum ID's for a group 432 * Get forum ID's for a group. 433 433 * 434 434 * @since 2.1.0 bbPress (r3653) 435 435 * 436 * @param int $group_id 436 * @param int $group_id Group id. 437 437 */ 438 438 function bbp_update_group_forum_ids( $group_id = 0, $forum_ids = array() ) { … … 451 451 452 452 /** 453 * Update group ID's for a forum 453 * Update group ID's for a forum. 454 454 * 455 455 * @since 2.1.0 bbPress (r3653) 456 456 * 457 * @param int $forum_id 457 * @param int $forum_id Forum id. 458 458 */ 459 459 function bbp_update_forum_group_ids( $forum_id = 0, $group_ids = array() ) { … … 468 468 469 469 /** 470 * Add a group to a forum 470 * Add a group to a forum. 471 471 * 472 472 * @since 2.1.0 bbPress (r3653) 473 473 * 474 * @param int $group_id 474 * @param int $group_id Group id. 475 475 */ 476 476 function bbp_add_group_id_to_forum( $forum_id = 0, $group_id = 0 ) { … … 495 495 496 496 /** 497 * Remove a forum from a group 497 * Remove a forum from a group. 498 498 * 499 499 * @since 2.1.0 bbPress (r3653) 500 500 * 501 * @param int $group_id 501 * @param int $group_id Group id. 502 502 */ 503 503 function bbp_add_forum_id_to_group( $group_id = 0, $forum_id = 0 ) { … … 522 522 523 523 /** 524 * Remove a group from a forum 524 * Remove a group from a forum. 525 525 * 526 526 * @since 2.1.0 bbPress (r3653) 527 527 * 528 * @param int $group_id 528 * @param int $group_id Group id. 529 529 */ 530 530 function bbp_remove_group_id_from_forum( $forum_id = 0, $group_id = 0 ) { … … 549 549 550 550 /** 551 * Remove a forum from a group 551 * Remove a forum from a group. 552 552 * 553 553 * @since 2.1.0 bbPress (r3653) 554 554 * 555 * @param int $group_id 555 * @param int $group_id Group id. 556 556 */ 557 557 function bbp_remove_forum_id_from_group( $group_id = 0, $forum_id = 0 ) { … … 576 576 577 577 /** 578 * Remove a group from all forums 578 * Remove a group from all forums. 579 579 * 580 580 * @since 2.1.0 bbPress (r3653) 581 581 * 582 * @param int $group_id 582 * @param int $group_id Group id. 583 583 */ 584 584 function bbp_remove_group_id_from_all_forums( $group_id = 0 ) { … … 599 599 600 600 /** 601 * Remove a forum from all groups 601 * Remove a forum from all groups. 602 602 * 603 603 * @since 2.1.0 bbPress (r3653) 604 604 * 605 * @param int $forum_id 605 * @param int $forum_id Forum id. 606 606 */ 607 607 function bbp_remove_forum_id_from_all_groups( $forum_id = 0 ) { … … 618 618 619 619 /** 620 * Return true if a forum is a group forum 620 * Return true if a forum is a group forum. 621 621 * 622 622 * @since 2.3.0 bbPress (r4571) 623 623 * 624 * @param int $forum_id 625 * @return bool True if it is a group forum, false if not 624 * @param int $forum_id Forum id. 625 * @return bool True if it is a group forum, false if not. 626 626 */ 627 627 function bbp_is_forum_group_forum( $forum_id = 0 ) { … … 643 643 644 644 /** 645 * Is the current user an admin of the current group 645 * Is the current user an admin of the current group. 646 646 * 647 647 * @since 2.3.0 bbPress (r4632) 648 648 * 649 * @return bool If current user is an admin of the current group 649 * @return bool If current user is an admin of the current group. 650 650 */ 651 651 function bbp_group_is_admin() { … … 668 668 669 669 /** 670 * Is the current user a moderator of the current group 670 * Is the current user a moderator of the current group. 671 671 * 672 672 * @since 2.3.0 bbPress (r4632) 673 673 * 674 * @return bool If current user is a moderator of the current group 674 * @return bool If current user is a moderator of the current group. 675 675 */ 676 676 function bbp_group_is_mod() { … … 693 693 694 694 /** 695 * Is the current user a member of the current group 695 * Is the current user a member of the current group. 696 696 * 697 697 * @since 2.3.0 bbPress (r4632) 698 698 * 699 * @return bool If current user is a member of the current group 699 * @return bool If current user is a member of the current group. 700 700 */ 701 701 function bbp_group_is_member() { … … 718 718 719 719 /** 720 * Is the current user banned from the current group 720 * Is the current user banned from the current group. 721 721 * 722 722 * @since 2.3.0 bbPress (r4632) 723 723 * 724 * @return bool If current user is banned from the current group 724 * @return bool If current user is banned from the current group. 725 725 */ 726 726 function bbp_group_is_banned() { … … 743 743 744 744 /** 745 * Is the current user the creator of the current group 745 * Is the current user the creator of the current group. 746 746 * 747 747 * @since 2.3.0 bbPress (r4632) 748 748 * 749 * @return bool If current user the creator of the current group 749 * @return bool If current user the creator of the current group. 750 750 */ 751 751 function bbp_group_is_creator() { … … 770 770 771 771 /** 772 * Return an array of allowed activity actions 772 * Return an array of allowed activity actions. 773 773 * 774 774 * @since 2.6.0 bbPress (r6370) … … 866 866 * @since 2.6.0 bbPress (r6370) 867 867 * 868 * @param string $activity_action Activity action string value 868 * @param string $activity_action Activity action string value. 869 869 * @param string $type The type of post. Expects `topic` or `reply`. 870 870 * @param string $action The current action string. … … 879 879 * @since 2.6.0 bbPress (r6370) 880 880 * 881 * @param string $action The current action string 882 * @param object $activity The BuddyPress activity object 881 * @param string $action The current action string. 882 * @param object $activity The BuddyPress activity object. 883 883 * 884 884 * @return string The formatted activity action. … … 903 903 * @since 2.6.0 bbPress (r6370) 904 904 * 905 * @param string $action The current action string 906 * @param object $activity The BuddyPress activity object 905 * @param string $action The current action string. 906 * @param object $activity The BuddyPress activity object. 907 907 * 908 908 * @return string The formatted activity action
Note: See TracChangeset
for help on using the changeset viewer.