Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/24/2012 06:06:59 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Clean-up bbp_get_dropdown() so unsetting variables for get_posts() usage is not necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/template-tags.php

    r4485 r4496  
    12781278                }
    12791279
    1280                 // Unset the args not needed for WP_Query to avoid any possible conflicts.
    1281                 // Note: walker and disable_categories are not unset
    1282                 unset( $r['select_id'], $r['tab'], $r['options_only'], $r['show_none'], $r['none_found'] );
    1283 
    12841280                /** Post Status *******************************************************/
    12851281
     
    13131309                $tab       = (int) $r['tab'];
    13141310                $retval    = '';
    1315                 $posts     = get_posts( $r );
    13161311                $disabled  = disabled( isset( bbpress()->options[$r['disabled']] ), true, false );
     1312                $posts     = get_posts( array(
     1313                        'post_type'   => $r['post_type'],
     1314                        'post_status' => $r['post_status'],
     1315                        'sort_column' => $r['sort_column'],
     1316                        'child_of'    => $r['child_of'],
     1317                        'numberposts' => $r['numberposts'],
     1318                        'orderby'     => $r['orderby'],
     1319                        'order'       => $r['order'],
     1320                ) );
    13171321
    13181322                /** Drop Down *********************************************************/
Note: See TracChangeset for help on using the changeset viewer.