Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/16/2013 07:36:05 PM (12 years ago)
Author:
johnjamesjacoby
Message:

When splitting a topic, correctly update the 'menu_order' property of the new topic post.

  • Replace instances of 'post_position' with 'menu_order'
  • Make sure 'menu_order' is 0

Props lakrisgubben. Fixes #2295.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/includes/topics/functions.php

    r5022 r5036  
    15131513                        'post_type'   => bbp_get_topic_post_type(),
    15141514                        'post_parent' => $source_topic->post_parent,
     1515                        'menu_order'  => 0,
    15151516                        'guid'        => ''
    15161517                    ) );
     
    16401641            // Update the reply
    16411642            wp_update_post( array(
    1642                 'ID'            => $reply->ID,
    1643                 'post_title'    => sprintf( __( 'Reply To: %s', 'bbpress' ), $destination_topic->post_title ),
    1644                 'post_name'     => false, // will be automatically generated
    1645                 'post_parent'   => $destination_topic->ID,
    1646                 'post_position' => $reply_position,
    1647                 'guid'          => ''
     1643                'ID'          => $reply->ID,
     1644                'post_title'  => sprintf( __( 'Reply To: %s', 'bbpress' ), $destination_topic->post_title ),
     1645                'post_name'   => false, // will be automatically generated
     1646                'post_parent' => $destination_topic->ID,
     1647                'menu_order' => $reply_position,
     1648                'guid'        => ''
    16481649            ) );
    16491650
Note: See TracChangeset for help on using the changeset viewer.