Skip to:
Content

bbPress.org

Changeset 4525


Ignore:
Timestamp:
11/26/2012 05:46:05 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Supplemental update to bbp_trash_forum_topics(). See #2059.

File:
1 edited

Legend:

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

    r4524 r4525  
    20012001    ) );
    20022002
    2003     // Forum is being trashed, so its topics are trashed too
    2004     if ( $topics = new WP_Query( array(
     2003    // Forum is being trashed, so its topics and replies are trashed too
     2004    $topics = new WP_Query( array(
    20052005        'suppress_filters' => true,
    20062006        'post_type'        => bbp_get_topic_post_type(),
     
    20102010        'nopaging'         => true,
    20112011        'fields'           => 'id=>parent'
    2012     ) ) ) {
     2012    ) );
     2013
     2014    // Loop through and trash child topics. Topic replies will get trashed by
     2015    // the bbp_trash_topic() action.
     2016    if ( !empty( $topics->posts ) ) {
    20132017
    20142018        // Prevent debug notices
     
    20292033        wp_reset_postdata();
    20302034    }
     2035
     2036    // Cleanup
     2037    unset( $topics );
    20312038}
    20322039
Note: See TracChangeset for help on using the changeset viewer.