Changeset 5491
- Timestamp:
- 09/10/2014 11:03:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r5490 r5491 1669 1669 if ( ! empty( $replies ) && ! is_wp_error( $replies ) ) { 1670 1670 1671 // Calculate starting point for reply positions1672 switch ( $split_option ) {1673 1674 // Get topic reply count for existing topic1675 case 'existing' :1676 $reply_position = bbp_get_topic_reply_count( $destination_topic->ID, true );1677 break;1678 1679 // Account for new lead topic1680 case 'reply' :1681 $reply_position = 1;1682 break;1683 }1684 1685 1671 // Save reply ids 1686 1672 $reply_ids = array(); … … 1688 1674 // Change the post_parent of each reply to the destination topic id 1689 1675 foreach ( $replies as $reply ) { 1690 1691 // Bump the reply position each iteration through the loop1692 $reply_position++;1693 1676 1694 1677 // Update the reply … … 1698 1681 'post_name' => false, // will be automatically generated 1699 1682 'post_parent' => $destination_topic->ID, 1700 'menu_order' => $reply_position,1701 1683 'guid' => '' 1702 1684 ) ); … … 1708 1690 bbp_update_reply_topic_id( $reply->ID, $destination_topic->ID ); 1709 1691 bbp_update_reply_forum_id( $reply->ID, bbp_get_topic_forum_id( $destination_topic->ID ) ); 1692 1693 // Adjust reply position 1694 bbp_update_reply_position( $reply->ID ); 1710 1695 1711 1696 // Adjust reply to values
Note: See TracChangeset
for help on using the changeset viewer.