Changeset 5388
- Timestamp:
- 06/12/2014 02:11:03 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/template.php
r5246 r5388 1281 1281 1282 1282 /** 1283 * Outputthe current tab index of a given form1283 * Return the current tab index of a given form 1284 1284 * 1285 1285 * Use this function to handle the tab indexing of user facing forms … … 1317 1317 } 1318 1318 /** 1319 * Outputa select box allowing to pick which forum/topic a new1319 * Return a select box allowing to pick which forum/topic a new 1320 1320 * topic/reply belongs in. 1321 1321 * … … 1359 1359 function bbp_get_dropdown( $args = '' ) { 1360 1360 1361 // Setup return value 1362 $retval = ''; 1363 1361 1364 /** Arguments *********************************************************/ 1362 1365 … … 1371 1374 'orderby' => 'menu_order title', 1372 1375 'order' => 'ASC', 1376 'posts' => array(), 1373 1377 'walker' => '', 1374 1378 … … 1397 1401 } 1398 1402 1399 /** Setup variables ***************************************************/ 1400 1401 $retval = ''; 1402 $posts = get_posts( array( 1403 'post_type' => $r['post_type'], 1404 'post_status' => $r['post_status'], 1405 'exclude' => $r['exclude'], 1406 'post_parent' => $r['post_parent'], 1407 'numberposts' => $r['numberposts'], 1408 'orderby' => $r['orderby'], 1409 'order' => $r['order'], 1410 'walker' => $r['walker'], 1411 'disable_categories' => $r['disable_categories'] 1412 ) ); 1403 /** Setup Posts *******************************************************/ 1404 1405 /** 1406 * Allow passing of custom posts data 1407 * 1408 * @see bbp_get_reply_to_dropdown() as an example 1409 */ 1410 if ( empty( $r['posts'] ) ) { 1411 $r['posts'] = get_posts( array( 1412 'post_type' => $r['post_type'], 1413 'post_status' => $r['post_status'], 1414 'post_parent' => $r['post_parent'], 1415 'exclude' => $r['exclude'], 1416 'numberposts' => $r['numberposts'], 1417 'orderby' => $r['orderby'], 1418 'order' => $r['order'], 1419 ) ); 1420 } 1413 1421 1414 1422 /** Drop Down *********************************************************/ … … 1469 1477 1470 1478 // Items found so walk the tree 1471 if ( !empty( $ posts) ) {1472 $retval .= walk_page_dropdown_tree( $ posts, 0, $r );1479 if ( !empty( $r['posts'] ) ) { 1480 $retval .= walk_page_dropdown_tree( $r['posts'], 0, $r ); 1473 1481 } 1474 1482 … … 1591 1599 1592 1600 <input type="hidden" name="bbp_reply_id" id="bbp_reply_id" value="<?php bbp_reply_id(); ?>" /> 1593 <input type="hidden" name="bbp_reply_to" id="bbp_reply_to" value="<?php bbp_form_reply_to(); ?>" />1594 1601 <input type="hidden" name="action" id="bbp_post_action" value="bbp-edit-reply" /> 1595 1602
Note: See TracChangeset
for help on using the changeset viewer.