Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/14/2015 12:46:38 AM (10 years ago)
Author:
johnjamesjacoby
Message:

I think this building should be condemned. There's serious metal fatigue in all the load-bearing members, the wiring is substandard, it's completely inadequate for our power needs, and the neighborhood is like a demilitarized zone.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/replies/template.php

    r5827 r5829  
    351351
    352352        // Easy empty checking
    353         if ( !empty( $reply_id ) && is_numeric( $reply_id ) ) {
     353        if ( ! empty( $reply_id ) && is_numeric( $reply_id ) ) {
    354354            $bbp_reply_id = $reply_id;
    355355
    356356        // 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 ) ) {
    358358            $bbp_reply_id = $bbp->reply_query->post->ID;
    359359
    360360        // 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 ) ) {
    362362            $bbp_reply_id = $bbp->search_query->post->ID;
    363363
    364364        // 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 ) ) {
    366366            $bbp_reply_id = $bbp->current_reply_id;
    367367
     
    663663        }
    664664
    665         if ( !empty( $length ) && ( $excerpt_length > $length ) ) {
     665        if ( ! empty( $length ) && ( $excerpt_length > $length ) ) {
    666666            $excerpt  = substr( $excerpt, 0, $length - 1 );
    667667            $excerpt .= '…';
     
    701701
    702702        // 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';
    705705            $date   = get_post_time( $gmt_s, $gmt, $reply_id );
    706706            $time   = false; // For filter below
     
    811811
    812812            $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 ) ) {
    814814                $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";
    815815            } else {
     
    11811181    function bbp_get_reply_author_avatar( $reply_id = 0, $size = 40 ) {
    11821182        $reply_id = bbp_get_reply_id( $reply_id );
    1183         if ( !empty( $reply_id ) ) {
     1183        if ( ! empty( $reply_id ) ) {
    11841184            // Check for anonymous user
    1185             if ( !bbp_is_reply_anonymous( $reply_id ) ) {
     1185            if ( ! bbp_is_reply_anonymous( $reply_id ) ) {
    11861186                $author_avatar = get_avatar( bbp_get_reply_author_id( $reply_id ), $size );
    11871187            } else {
     
    12451245
    12461246        // Reply ID is good
    1247         if ( !empty( $reply_id ) ) {
     1247        if ( ! empty( $reply_id ) ) {
    12481248
    12491249            // Get some useful reply information
     
    12611261
    12621262            // 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 ) . '"' : '';
    12641264            $author_links = array();
    12651265
     
    13851385            $user_id      = bbp_get_reply_author_id( $reply_id );
    13861386            $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 : '';
    13881388
    13891389        // Anonymous
     
    17551755
    17561756        // Set visibility
    1757         $style  = !empty( $reply_to ) ? '' : ' style="display:none;"';
     1757        $style  = ! empty( $reply_to ) ? '' : ' style="display:none;"';
    17581758        $link   = remove_query_arg( array( 'bbp_reply_to', '_wpnonce' ) ) . '#post-' . $reply_to;
    17591759        $retval = '<a rel="nofollow" id="bbp-cancel-reply-to-link" href="' . esc_url( $link ) . '"' . $style . '>' . esc_html( $text ) . '</a>';
     
    18001800        // Reply doesn't have a position so get the raw value
    18011801        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 );
    18031803
    18041804            // Post is not the topic
     
    18081808                // Update the reply position in the posts table so we'll never have
    18091809                // to hit the DB again.
    1810                 if ( !empty( $reply_position ) ) {
     1810                if ( ! empty( $reply_position ) ) {
    18111811                    bbp_update_reply_position( $reply_id, $reply_position );
    18121812                }
     
    25202520        $bbp = bbpress();
    25212521
    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 ) ) {
    25232523            return false;
    25242524        }
Note: See TracChangeset for help on using the changeset viewer.