Skip to:
Content

bbPress.org

Changeset 5036


Ignore:
Timestamp:
07/16/2013 07:36:05 PM (13 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.

Location:
trunk/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/replies/functions.php

    r5021 r5036  
    12991299                // Update the reply
    13001300                wp_update_post( array(
    1301                     'ID'            => $move_reply->ID,
    1302                     'post_title'    => sprintf( __( 'Reply To: %s', 'bbpress' ), $destination_topic->post_title ),
    1303                     'post_name'     => false, // will be automatically generated
    1304                     'post_parent'   => $destination_topic->ID,
    1305                     'post_position' => $reply_position,
    1306                     'guid'          => ''
     1301                    'ID'          => $move_reply->ID,
     1302                    'post_title'  => sprintf( __( 'Reply To: %s', 'bbpress' ), $destination_topic->post_title ),
     1303                    'post_name'   => false, // will be automatically generated
     1304                    'post_parent' => $destination_topic->ID,
     1305                    'menu_order' => $reply_position,
     1306                    'guid'        => ''
    13071307                ) );
    13081308
  • 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.