Changeset 6317
- Timestamp:
- 02/26/2017 08:15:20 AM (8 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/classes.php
r6250 r6317 326 326 break; 327 327 case 'ol': 328 echo"<ol class='bbp-threaded-replies'>\n";328 $output .= "<ol class='bbp-threaded-replies'>\n"; 329 329 break; 330 330 case 'ul': 331 331 default: 332 echo"<ul class='bbp-threaded-replies'>\n";332 $output .= "<ul class='bbp-threaded-replies'>\n"; 333 333 break; 334 334 } … … 351 351 break; 352 352 case 'ol': 353 echo"</ol>\n";353 $output .= "</ol>\n"; 354 354 break; 355 355 case 'ul': 356 356 default: 357 echo"</ul>\n";357 $output .= "</ul>\n"; 358 358 break; 359 359 } … … 401 401 // Check for a callback and use it if specified 402 402 if ( ! empty( $args['callback'] ) ) { 403 ob_start(); 403 404 call_user_func( $args['callback'], $object, $args, $depth ); 405 $output .= ob_get_clean(); 404 406 return; 405 407 } … … 407 409 // Style for div or list element 408 410 if ( ! empty( $args['style'] ) && ( 'div' === $args['style'] ) ) { 409 echo"<div>\n";411 $output .= "<div>\n"; 410 412 } else { 411 echo"<li>\n";412 } 413 414 bbp_get_template_part( 'loop', 'single-reply');413 $output .= "<li>\n"; 414 } 415 416 $output .= bbp_buffer_template_part( 'loop', 'single-reply', false ); 415 417 } 416 418 … … 422 424 // Check for a callback and use it if specified 423 425 if ( ! empty( $args['end-callback'] ) ) { 426 ob_start(); 424 427 call_user_func( $args['end-callback'], $object, $args, $depth ); 428 $output .= ob_get_clean(); 425 429 return; 426 430 } … … 428 432 // Style for div or list element 429 433 if ( ! empty( $args['style'] ) && ( 'div' === $args['style'] ) ) { 430 echo"</div>\n";434 $output .= "</div>\n"; 431 435 } else { 432 echo"</li>\n";436 $output .= "</li>\n"; 433 437 } 434 438 } … … 536 540 537 541 <option class="<?php echo esc_attr( $class ); ?>" value="<?php echo esc_attr( $value ); ?>"<?php selected( $args['selected'], $object->ID ); ?> <?php disabled( in_array( $reply_id, $ancestors ), true ); ?>><?php echo $pad . esc_html( $title ); ?></option> 538 542 539 543 <?php 540 544 -
trunk/src/includes/replies/functions.php
r6310 r6317 2539 2539 function bbp_list_replies( $args = array() ) { 2540 2540 2541 // Get bbPress 2542 $bbp = bbpress(); 2543 2541 2544 // Reset the reply depth 2542 bbpress()->reply_query->reply_depth = 0;2545 $bbp->reply_query->reply_depth = 0; 2543 2546 2544 2547 // In reply loop 2545 bbpress()->reply_query->in_the_loop = true; 2546 2548 $bbp->reply_query->in_the_loop = true; 2549 2550 // Parse arguments 2547 2551 $r = bbp_parse_args( $args, array( 2548 'walker' => n ull,2552 'walker' => new BBP_Walker_Reply, 2549 2553 'max_depth' => bbp_thread_replies_depth(), 2550 2554 'style' => 'ul', … … 2556 2560 2557 2561 // Get replies to loop through in $_replies 2558 $walker = new BBP_Walker_Reply; 2559 $walker->paged_walk( bbpress()->reply_query->posts, $r['max_depth'], $r['page'], $r['per_page'], $r ); 2560 2561 bbpress()->max_num_pages = $walker->max_pages; 2562 bbpress()->reply_query->in_the_loop = false; 2562 echo '<ul>' . $r['walker']->paged_walk( $bbp->reply_query->posts, $r['max_depth'], $r['page'], $r['per_page'], $r ) . '</ul>'; 2563 2564 $bbp->max_num_pages = $r['walker']->max_pages; 2565 $bbp->reply_query->in_the_loop = false; 2563 2566 } 2564 2567
Note: See TracChangeset
for help on using the changeset viewer.