Skip to:
Content

bbPress.org

Changeset 5395


Ignore:
Timestamp:
06/12/2014 09:38:06 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Reduce unnecessary complexity and flexibility in bbp_get_reply_to_dropdown(). Since this is a purpose built form field, explicit filtering of arguments is not necessary. See #2617.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/replies/template.php

    r5387 r5395  
    25142514        $topic_id = bbp_get_reply_topic_id( $reply_id );
    25152515
    2516         // Setup default dropdown arguments
    2517         $r = bbp_parse_args( array(
    2518             'show_none'   => sprintf( esc_attr__( '%1$s - %2$s', 'bbpress' ), $topic_id, bbp_get_topic_title( $topic_id ) ),
    2519             'select_id'   => 'bbp_reply_to',
    2520             'exclude'     => array(),
    2521             'selected'    => $reply_to,
    2522             'post_parent' => $topic_id,
     2516        // Get the replies
     2517        $posts = get_posts( array(
    25232518            'post_type'   => bbp_get_reply_post_type(),
    25242519            'post_status' => bbp_get_public_status_id(),
    2525             'max_depth'   => bbp_thread_replies_depth(),
    2526             'page'        => 1,
    2527             'per_page'    => -1,
     2520            'post_parent' => $topic_id,
     2521            'numberposts' => -1,
    25282522            'orderby'     => 'menu_order',
    25292523            'order'       => 'ASC',
    2530             'walker'      => new BBP_Walker_Reply_Dropdown()
    2531         ), 'reply_to_drodown' );
    2532 
    2533         // Get the replies
    2534         $posts = get_posts( array(
    2535             'post_type'   => $r['post_type'],
    2536             'post_status' => $r['post_status'],
    2537             'post_parent' => $r['post_parent'],
    2538             'exclude'     => $r['exclude'],
    2539             'numberposts' => $r['per_page'],
    2540             'orderby'     => $r['orderby'],
    2541             'order'       => $r['order'],
    25422524        ) );
    25432525
     
    25592541        // Get the dropdown and return it
    25602542        $retval = bbp_get_dropdown( array(
    2561             'show_none'    => $r['show_none'],
    2562             'select_id'    => $r['select_id'],
    2563             'exclude'      => $r['exclude'],
    2564             'selected'     => $r['selected'],
    2565             'post_parent'  => $r['post_parent'],
    2566             'post_type'    => $r['post_type'],
    2567             'max_depth'    => $r['max_depth'],
    2568             'page'         => $r['page'],
    2569             'per_page'     => $r['per_page'],
    2570             'walker'       => $r['walker'],
     2543            'show_none'    => sprintf( esc_attr__( '%1$s - %2$s', 'bbpress' ), $topic_id, bbp_get_topic_title( $topic_id ) ),
     2544            'select_id'    => 'bbp_reply_to',
     2545            'exclude'      => $reply_id,
     2546            'selected'     => $reply_to,
     2547            'post_parent'  => $topic_id,
     2548            'post_type'    => bbp_get_reply_post_type(),
     2549            'max_depth'    => bbp_thread_replies_depth(),
     2550            'page'         => 1,
     2551            'per_page'     => -1,
     2552            'walker'       => new BBP_Walker_Reply_Dropdown(),
    25712553            'posts'        => $posts
    25722554        ) );
    25732555
    25742556        // Filter and return
    2575         return apply_filters( 'bbp_get_reply_to_dropdown', $retval, $r, $reply_id, $reply_to, $topic_id );
     2557        return apply_filters( 'bbp_get_reply_to_dropdown', $retval, $reply_id, $reply_to, $topic_id );
    25762558    }
    25772559
Note: See TracChangeset for help on using the changeset viewer.