Ticket #3424: 3424.diff
File 3424.diff, 1.3 KB (added by , 3 years ago) |
---|
-
includes/replies/template.php
function bbp_reply_url( $reply_id = 0 ) 453 453 $reply_page = 1; 454 454 455 455 // Standard reply page 456 456 } else { 457 457 $reply_page = ceil( (int) bbp_get_reply_position( $reply_id, $topic_id ) / (int) bbp_get_replies_per_page() ); 458 458 } 459 459 460 460 // Get links & URLS 461 461 $reply_hash = '#post-' . $reply_id; 462 462 $topic_link = bbp_get_topic_permalink( $topic_id, $redirect_to ); 463 463 $topic_url = remove_query_arg( 'view', $topic_link ); 464 464 465 465 // Get vars needed to support pending topics with unpretty links 466 466 $has_slug = ! empty( $topic ) ? $topic->post_name : ''; 467 467 $pretty = bbp_use_pretty_urls(); 468 $published = ! bbp_is_topic_pending( $topic_id );468 $published = bbp_is_topic_published( $topic_id ); 469 469 470 470 // Don't include pagination if on first page 471 471 if ( 1 >= $reply_page ) { 472 472 473 473 // Pretty permalinks 474 474 if ( ! empty( $has_slug ) && ! empty( $pretty ) && ! empty( $published ) ) { 475 475 $url = user_trailingslashit( $topic_url ) . $reply_hash; 476 476 477 477 // Unpretty links 478 478 } else { 479 479 $url = $topic_url . $reply_hash; 480 480 } 481 481 482 482 // Include pagination 483 483 } else {