Changeset 10373 for trunk/src/bp-groups/bp-groups-forums.php
- Timestamp:
- 11/22/2015 04:58:34 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-forums.php
r10148 r10373 66 66 * 67 67 * @param int $group_id Group id, passed from groups_details_updated. 68 *69 68 * @return mixed 70 69 */ … … 112 111 * @param mixed $page The page number where the new forum post should reside. 113 112 * Default: false. 114 *115 113 * @return mixed The new forum post ID on success. Boolean false on failure. 116 114 */ … … 221 219 * @param string $topic_tags A comma-delimited string of topic tags. 222 220 * @param int $forum_id The forum ID this forum topic resides in. 223 *224 221 * @return mixed The new topic object on success. Boolean false on failure. 225 222 */ … … 342 339 * @param string $topic_text The text for the forum topic. 343 340 * @param mixed $topic_tags A comma-delimited string of topic tags. Optional. 344 *345 341 * @return mixed The topic object on success. Boolean false on failure. 346 342 */ … … 364 360 } 365 361 366 // Get the corresponding activity item 362 // Get the corresponding activity item. 367 363 if ( bp_is_active( 'activity' ) ) { 368 364 $id = bp_activity_get_activity_id( array( … … 421 417 * @param int $topic_id The topic ID of the existing forum topic. 422 418 * @param mixed $page The page number where the new forum post should reside. Optional. 423 *424 419 * @return mixed The forum post ID on success. Boolean false on failure. 425 420 */ … … 454 449 } 455 450 456 // Get the corresponding activity item 451 // Get the corresponding activity item. 457 452 if ( bp_is_active( 'activity' ) ) { 458 453 $id = bp_activity_get_activity_id( array( … … 507 502 * 508 503 * @param int $topic_id The ID of the topic to be deleted. 509 *510 504 * @return bool True if the delete routine went through properly. 511 505 */ … … 513 507 $bp = buddypress(); 514 508 515 // Before deleting the thread, get the post ids so that their activity items can be deleted 509 // Before deleting the thread, get the post ids so that their activity items can be deleted. 516 510 $posts = bp_forums_get_topic_posts( array( 'topic_id' => $topic_id, 'per_page' => -1 ) ); 517 511 $action = bp_forums_delete_topic( array( 'topic_id' => $topic_id ) ); … … 528 522 do_action( 'groups_before_delete_group_forum_topic', $topic_id ); 529 523 530 // Delete the corresponding activity stream items 524 // Delete the corresponding activity stream items. 531 525 if ( bp_is_active( 'activity' ) ) { 532 526 533 // The activity item for the initial topic 527 // The activity item for the initial topic. 534 528 bp_activity_delete( array( 535 529 'item_id' => bp_get_current_group_id(), … … 539 533 ) ); 540 534 541 // The activity item for each post 535 // The activity item for each post. 542 536 foreach ( (array) $posts as $post ) { 543 537 bp_activity_delete( array( … … 574 568 * value isn't used in the function but is passed along 575 569 * to do_action() hooks. 576 *577 570 * @return bool True on success. 578 571 */ … … 593 586 do_action( 'groups_before_delete_group_forum_post', $post_id, $topic_id ); 594 587 595 // Delete the corresponding activity stream item 588 // Delete the corresponding activity stream item. 596 589 if ( bp_is_active( 'activity' ) ) { 597 590 bp_activity_delete( array( … … 624 617 * @param string $type Either 'newest', 'popular', 'unreplied', 'tags'. 625 618 * Default: 'newest'. 626 *627 619 * @return int The topic count. 628 620 */ … … 647 639 * 'all'. Default: 'public'. 648 640 * @param string|bool $search_terms Optional. Limit by a search term. 649 *650 641 * @return int The topic count. 651 642 */
Note: See TracChangeset
for help on using the changeset viewer.