Changeset 5829 for trunk/src/includes/replies/template.php
- Timestamp:
- 07/14/2015 12:46:38 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/replies/template.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/template.php
r5827 r5829 351 351 352 352 // Easy empty checking 353 if ( ! empty( $reply_id ) && is_numeric( $reply_id ) ) {353 if ( ! empty( $reply_id ) && is_numeric( $reply_id ) ) { 354 354 $bbp_reply_id = $reply_id; 355 355 356 356 // Currently inside a replies loop 357 } elseif ( ! empty( $bbp->reply_query->in_the_loop ) && isset( $bbp->reply_query->post->ID ) ) {357 } elseif ( ! empty( $bbp->reply_query->in_the_loop ) && isset( $bbp->reply_query->post->ID ) ) { 358 358 $bbp_reply_id = $bbp->reply_query->post->ID; 359 359 360 360 // Currently inside a search loop 361 } elseif ( ! empty( $bbp->search_query->in_the_loop ) && isset( $bbp->search_query->post->ID ) && bbp_is_reply( $bbp->search_query->post->ID ) ) {361 } elseif ( ! empty( $bbp->search_query->in_the_loop ) && isset( $bbp->search_query->post->ID ) && bbp_is_reply( $bbp->search_query->post->ID ) ) { 362 362 $bbp_reply_id = $bbp->search_query->post->ID; 363 363 364 364 // Currently viewing a forum 365 } elseif ( ( bbp_is_single_reply() || bbp_is_reply_edit() ) && ! empty( $bbp->current_reply_id ) ) {365 } elseif ( ( bbp_is_single_reply() || bbp_is_reply_edit() ) && ! empty( $bbp->current_reply_id ) ) { 366 366 $bbp_reply_id = $bbp->current_reply_id; 367 367 … … 663 663 } 664 664 665 if ( ! empty( $length ) && ( $excerpt_length > $length ) ) {665 if ( ! empty( $length ) && ( $excerpt_length > $length ) ) { 666 666 $excerpt = substr( $excerpt, 0, $length - 1 ); 667 667 $excerpt .= '…'; … … 701 701 702 702 // 4 days, 4 hours ago 703 if ( ! empty( $humanize ) ) {704 $gmt_s = ! empty( $gmt ) ? 'G' : 'U';703 if ( ! empty( $humanize ) ) { 704 $gmt_s = ! empty( $gmt ) ? 'G' : 'U'; 705 705 $date = get_post_time( $gmt_s, $gmt, $reply_id ); 706 706 $time = false; // For filter below … … 811 811 812 812 $r .= "\t" . '<li id="bbp-reply-revision-log-' . esc_attr( $reply_id ) . '-item-' . esc_attr( $revision->ID ) . '" class="bbp-reply-revision-log-item">' . "\n"; 813 if ( ! empty( $reason ) ) {813 if ( ! empty( $reason ) ) { 814 814 $r .= "\t\t" . sprintf( esc_html__( 'This reply was modified %1$s by %2$s. Reason: %3$s', 'bbpress' ), esc_html( $since ), $author, esc_html( $reason ) ) . "\n"; 815 815 } else { … … 1181 1181 function bbp_get_reply_author_avatar( $reply_id = 0, $size = 40 ) { 1182 1182 $reply_id = bbp_get_reply_id( $reply_id ); 1183 if ( ! empty( $reply_id ) ) {1183 if ( ! empty( $reply_id ) ) { 1184 1184 // Check for anonymous user 1185 if ( ! bbp_is_reply_anonymous( $reply_id ) ) {1185 if ( ! bbp_is_reply_anonymous( $reply_id ) ) { 1186 1186 $author_avatar = get_avatar( bbp_get_reply_author_id( $reply_id ), $size ); 1187 1187 } else { … … 1245 1245 1246 1246 // Reply ID is good 1247 if ( ! empty( $reply_id ) ) {1247 if ( ! empty( $reply_id ) ) { 1248 1248 1249 1249 // Get some useful reply information … … 1261 1261 1262 1262 // Setup title and author_links array 1263 $link_title = ! empty( $link_title ) ? ' title="' . esc_attr( $link_title ) . '"' : '';1263 $link_title = ! empty( $link_title ) ? ' title="' . esc_attr( $link_title ) . '"' : ''; 1264 1264 $author_links = array(); 1265 1265 … … 1385 1385 $user_id = bbp_get_reply_author_id( $reply_id ); 1386 1386 $user = get_userdata( $user_id ); 1387 $author_email = ! empty( $user->user_email ) ? $user->user_email : '';1387 $author_email = ! empty( $user->user_email ) ? $user->user_email : ''; 1388 1388 1389 1389 // Anonymous … … 1755 1755 1756 1756 // Set visibility 1757 $style = ! empty( $reply_to ) ? '' : ' style="display:none;"';1757 $style = ! empty( $reply_to ) ? '' : ' style="display:none;"'; 1758 1758 $link = remove_query_arg( array( 'bbp_reply_to', '_wpnonce' ) ) . '#post-' . $reply_to; 1759 1759 $retval = '<a rel="nofollow" id="bbp-cancel-reply-to-link" href="' . esc_url( $link ) . '"' . $style . '>' . esc_html( $text ) . '</a>'; … … 1800 1800 // Reply doesn't have a position so get the raw value 1801 1801 if ( empty( $reply_position ) ) { 1802 $topic_id = ! empty( $topic_id ) ? bbp_get_topic_id( $topic_id ) : bbp_get_reply_topic_id( $reply_id );1802 $topic_id = ! empty( $topic_id ) ? bbp_get_topic_id( $topic_id ) : bbp_get_reply_topic_id( $reply_id ); 1803 1803 1804 1804 // Post is not the topic … … 1808 1808 // Update the reply position in the posts table so we'll never have 1809 1809 // to hit the DB again. 1810 if ( ! empty( $reply_position ) ) {1810 if ( ! empty( $reply_position ) ) { 1811 1811 bbp_update_reply_position( $reply_id, $reply_position ); 1812 1812 } … … 2520 2520 $bbp = bbpress(); 2521 2521 2522 if ( ! isset( $bbp->reply_query->pagination_links ) || empty( $bbp->reply_query->pagination_links ) ) {2522 if ( ! isset( $bbp->reply_query->pagination_links ) || empty( $bbp->reply_query->pagination_links ) ) { 2523 2523 return false; 2524 2524 }
Note: See TracChangeset
for help on using the changeset viewer.