Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/22/2015 08:30:08 AM (11 years ago)
Author:
netweb
Message:

Topics: When moving a topic update the topics post parent in bbp_move_topic_handler(), includes unit test test_bbp_move_topic_handler()

Props netweb. See #2322

File:
1 edited

Legend:

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

    r5776 r5778  
    10101010 * @uses bbp_get_topic_id() To get the topic id
    10111011 * @uses bbp_get_forum_id() To get the forum id
     1012 * @uses wp_update_post() To update the topic post parent`
    10121013 * @uses bbp_get_stickies() To get the old forums sticky topics
    10131014 * @uses delete_post_meta() To delete the forum sticky meta
     
    10361037    // Update topic forum's ID
    10371038    bbp_update_topic_forum_id( $topic_id, $new_forum_id );
     1039
     1040    // Update topic post parent with the new forum ID
     1041    wp_update_post( array(
     1042        'ID'          => $topic_id,
     1043        'post_parent' => $new_forum_id,
     1044    ) );
    10381045
    10391046    /** Stickies **************************************************************/
Note: See TracChangeset for help on using the changeset viewer.