Ticket #2153: 2153.1.diff
File 2153.1.diff, 1.6 KB (added by , 12 years ago) |
---|
-
includes/common/template-tags.php
1303 1303 'selected' => 0, 1304 1304 'sort_column' => 'menu_order', 1305 1305 'post_parent' => 0, 1306 'child_of' => 0, 1306 1307 'exclude' => array(), 1307 1308 'numberposts' => -1, 1308 1309 'orderby' => 'menu_order', … … 1366 1367 $tab = (int) $r['tab']; 1367 1368 $retval = ''; 1368 1369 $disabled = disabled( isset( bbpress()->options[$r['disabled']] ), true, false ); 1369 $posts = get_pages( array( 1370 1371 $args = array( 1370 1372 'post_type' => $r['post_type'], 1371 1373 'post_status' => $r['post_status'], 1372 1374 'sort_column' => $r['sort_column'], 1373 'post_parent' => $r['post_parent'], 1375 'post_parent' => $r['post_parent'], // Cheating, get_pages() uses 'parent', not 'post_parent' 1376 'child_of' => $r['child_of'], // Cheating, get_posts() doesn't have 'child_of' 1374 1377 'exclude' => $r['exclude'], 1375 1378 'numberposts' => $r['numberposts'], 1376 1379 'orderby' => $r['orderby'], 1377 1380 'order' => $r['order'], 1378 1381 'walker' => $r['walker'], 1379 1382 'disable_categories' => $r['disable_categories'] 1380 ) );1383 ); 1381 1384 1385 // Use get_posts for non-hierarchical topics 1386 if ( $args['post_type'] == bbp_get_topic_post_type() ) 1387 $posts = get_posts( $args ); 1388 1389 // Use get_pages for forums 1390 else 1391 $posts = get_pages( $args ); 1392 1382 1393 /** Drop Down *********************************************************/ 1383 1394 1384 1395 // Items found