Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/14/2015 12:46:38 AM (11 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/common/template.php

    r5827 r5829  
    130130
    131131    // Supplied ID is a forum
    132     if ( !empty( $post_id ) && ( bbp_get_forum_post_type() === get_post_type( $post_id ) ) ) {
     132    if ( ! empty( $post_id ) && ( bbp_get_forum_post_type() === get_post_type( $post_id ) ) ) {
    133133        $retval = true;
    134134    }
     
    154154
    155155    // In forum archive
    156     if ( is_post_type_archive( bbp_get_forum_post_type() ) || bbp_is_query_name( 'bbp_forum_archive' ) || !empty( $wp_query->bbp_show_topics_on_root ) ) {
     156    if ( is_post_type_archive( bbp_get_forum_post_type() ) || bbp_is_query_name( 'bbp_forum_archive' ) || ! empty( $wp_query->bbp_show_topics_on_root ) ) {
    157157        $retval = true;
    158158    }
     
    206206
    207207    // Check query
    208     if ( !empty( $wp_query->bbp_is_forum_edit ) && ( $wp_query->bbp_is_forum_edit === true ) ) {
     208    if ( ! empty( $wp_query->bbp_is_forum_edit ) && ( $wp_query->bbp_is_forum_edit === true ) ) {
    209209        $retval = true;
    210210
    211211    // Editing in admin
    212     } elseif ( is_admin() && ( 'post.php' === $pagenow ) && ( get_post_type() === bbp_get_forum_post_type() ) && ( !empty( $_GET['action'] ) && ( 'edit' === $_GET['action'] ) ) ) {
     212    } elseif ( is_admin() && ( 'post.php' === $pagenow ) && ( get_post_type() === bbp_get_forum_post_type() ) && ( ! empty( $_GET['action'] ) && ( 'edit' === $_GET['action'] ) ) ) {
    213213        $retval = true;
    214214    }
     
    233233
    234234    // Supplied ID is a topic
    235     if ( !empty( $post_id ) && ( bbp_get_topic_post_type() === get_post_type( $post_id ) ) ) {
     235    if ( ! empty( $post_id ) && ( bbp_get_topic_post_type() === get_post_type( $post_id ) ) ) {
    236236        $retval = true;
    237237    }
     
    308308
    309309    // Check query
    310     if ( !empty( $wp_query->bbp_is_topic_edit ) && ( $wp_query->bbp_is_topic_edit === true ) ) {
     310    if ( ! empty( $wp_query->bbp_is_topic_edit ) && ( $wp_query->bbp_is_topic_edit === true ) ) {
    311311        $retval = true;
    312312
    313313    // Editing in admin
    314     } elseif ( is_admin() && ( 'post.php' === $pagenow ) && ( get_post_type() === bbp_get_topic_post_type() ) && ( !empty( $_GET['action'] ) && ( 'edit' === $_GET['action'] ) ) ) {
     314    } elseif ( is_admin() && ( 'post.php' === $pagenow ) && ( get_post_type() === bbp_get_topic_post_type() ) && ( ! empty( $_GET['action'] ) && ( 'edit' === $_GET['action'] ) ) ) {
    315315        $retval = true;
    316316    }
     
    333333
    334334    // Check topic edit and GET params
    335     if ( bbp_is_topic_edit() && !empty( $_GET['action'] ) && ( 'merge' === $_GET['action'] ) ) {
     335    if ( bbp_is_topic_edit() && ! empty( $_GET['action'] ) && ( 'merge' === $_GET['action'] ) ) {
    336336        return true;
    337337    }
     
    354354
    355355    // Check topic edit and GET params
    356     if ( bbp_is_topic_edit() && !empty( $_GET['action'] ) && ( 'split' === $_GET['action'] ) ) {
     356    if ( bbp_is_topic_edit() && ! empty( $_GET['action'] ) && ( 'split' === $_GET['action'] ) ) {
    357357        $retval = true;
    358358    }
     
    384384
    385385    // Check tax and query vars
    386     if ( is_tax( bbp_get_topic_tag_tax_id() ) || !empty( bbpress()->topic_query->is_tax ) || get_query_var( 'bbp_topic_tag' ) ) {
     386    if ( is_tax( bbp_get_topic_tag_tax_id() ) || ! empty( bbpress()->topic_query->is_tax ) || get_query_var( 'bbp_topic_tag' ) ) {
    387387        $retval = true;
    388388    }
     
    411411
    412412    // Check query
    413     if ( !empty( $wp_query->bbp_is_topic_tag_edit ) && ( true === $wp_query->bbp_is_topic_tag_edit ) ) {
     413    if ( ! empty( $wp_query->bbp_is_topic_tag_edit ) && ( true === $wp_query->bbp_is_topic_tag_edit ) ) {
    414414        $retval = true;
    415415
    416416    // Editing in admin
    417     } elseif ( is_admin() && ( 'edit-tags.php' === $pagenow ) && ( bbp_get_topic_tag_tax_id() === $taxnow ) && ( !empty( $_GET['action'] ) && ( 'edit' === $_GET['action'] ) ) ) {
     417    } elseif ( is_admin() && ( 'edit-tags.php' === $pagenow ) && ( bbp_get_topic_tag_tax_id() === $taxnow ) && ( ! empty( $_GET['action'] ) && ( 'edit' === $_GET['action'] ) ) ) {
    418418        $retval = true;
    419419    }
     
    468468
    469469    // Supplied ID is a reply
    470     if ( !empty( $post_id ) && ( bbp_get_reply_post_type() === get_post_type( $post_id ) ) ) {
     470    if ( ! empty( $post_id ) && ( bbp_get_reply_post_type() === get_post_type( $post_id ) ) ) {
    471471        $retval = true;
    472472    }
     
    490490
    491491    // Check query
    492     if ( !empty( $wp_query->bbp_is_reply_edit ) && ( true === $wp_query->bbp_is_reply_edit ) ) {
     492    if ( ! empty( $wp_query->bbp_is_reply_edit ) && ( true === $wp_query->bbp_is_reply_edit ) ) {
    493493        $retval = true;
    494494
    495495    // Editing in admin
    496     } elseif ( is_admin() && ( 'post.php' === $pagenow ) && ( get_post_type() === bbp_get_reply_post_type() ) && ( !empty( $_GET['action'] ) && ( 'edit' === $_GET['action'] ) ) ) {
     496    } elseif ( is_admin() && ( 'post.php' === $pagenow ) && ( get_post_type() === bbp_get_reply_post_type() ) && ( ! empty( $_GET['action'] ) && ( 'edit' === $_GET['action'] ) ) ) {
    497497        $retval = true;
    498498    }
     
    513513
    514514    // Check reply edit and GET params
    515     if ( bbp_is_reply_edit() && !empty( $_GET['action'] ) && ( 'move' === $_GET['action'] ) ) {
     515    if ( bbp_is_reply_edit() && ! empty( $_GET['action'] ) && ( 'move' === $_GET['action'] ) ) {
    516516        $retval = true;
    517517    }
     
    564564
    565565    // Check query
    566     if ( !empty( $wp_query->bbp_is_single_user_favs ) && ( true === $wp_query->bbp_is_single_user_favs ) ) {
     566    if ( ! empty( $wp_query->bbp_is_single_user_favs ) && ( true === $wp_query->bbp_is_single_user_favs ) ) {
    567567        $retval = true;
    568568    }
     
    585585
    586586    // Check query
    587     if ( !empty( $wp_query->bbp_is_single_user_subs ) && ( true === $wp_query->bbp_is_single_user_subs ) ) {
     587    if ( ! empty( $wp_query->bbp_is_single_user_subs ) && ( true === $wp_query->bbp_is_single_user_subs ) ) {
    588588        $retval = true;
    589589    }
     
    607607
    608608    // Check query
    609     if ( !empty( $wp_query->bbp_is_single_user_topics ) && ( true === $wp_query->bbp_is_single_user_topics ) ) {
     609    if ( ! empty( $wp_query->bbp_is_single_user_topics ) && ( true === $wp_query->bbp_is_single_user_topics ) ) {
    610610        $retval = true;
    611611    }
     
    629629
    630630    // Check query
    631     if ( !empty( $wp_query->bbp_is_single_user_replies ) && ( true === $wp_query->bbp_is_single_user_replies ) ) {
     631    if ( ! empty( $wp_query->bbp_is_single_user_replies ) && ( true === $wp_query->bbp_is_single_user_replies ) ) {
    632632        $retval = true;
    633633    }
     
    653653
    654654    // Check query
    655     if ( !empty( $wp_query->bbp_is_single_user_home ) && ( true === $wp_query->bbp_is_single_user_home ) ) {
     655    if ( ! empty( $wp_query->bbp_is_single_user_home ) && ( true === $wp_query->bbp_is_single_user_home ) ) {
    656656        $retval = true;
    657657    }
     
    697697
    698698    // Check query
    699     if ( !empty( $wp_query->bbp_is_single_user ) && ( true === $wp_query->bbp_is_single_user ) ) {
     699    if ( ! empty( $wp_query->bbp_is_single_user ) && ( true === $wp_query->bbp_is_single_user ) ) {
    700700        $retval = true;
    701701    }
     
    719719
    720720    // Check query
    721     if ( !empty( $wp_query->bbp_is_single_user_edit ) && ( true === $wp_query->bbp_is_single_user_edit ) ) {
     721    if ( ! empty( $wp_query->bbp_is_single_user_edit ) && ( true === $wp_query->bbp_is_single_user_edit ) ) {
    722722        $retval = true;
    723723    }
     
    741741
    742742    // Check query
    743     if ( !empty( $wp_query->bbp_is_single_user_profile ) && ( true === $wp_query->bbp_is_single_user_profile ) ) {
     743    if ( ! empty( $wp_query->bbp_is_single_user_profile ) && ( true === $wp_query->bbp_is_single_user_profile ) ) {
    744744        $retval = true;
    745745    }
     
    763763
    764764    // Check query
    765     if ( !empty( $wp_query->bbp_is_single_user_topics ) && ( true === $wp_query->bbp_is_single_user_topics ) ) {
     765    if ( ! empty( $wp_query->bbp_is_single_user_topics ) && ( true === $wp_query->bbp_is_single_user_topics ) ) {
    766766        $retval = true;
    767767    }
     
    785785
    786786    // Check query
    787     if ( !empty( $wp_query->bbp_is_single_user_replies ) && ( true === $wp_query->bbp_is_single_user_replies ) ) {
     787    if ( ! empty( $wp_query->bbp_is_single_user_replies ) && ( true === $wp_query->bbp_is_single_user_replies ) ) {
    788788        $retval = true;
    789789    }
     
    808808
    809809    // Check query
    810     if ( !empty( $wp_query->bbp_is_view ) && ( true === $wp_query->bbp_is_view ) ) {
     810    if ( ! empty( $wp_query->bbp_is_view ) && ( true === $wp_query->bbp_is_view ) ) {
    811811        $retval = true;
    812812    }
     
    841841
    842842    // Check query
    843     if ( !empty( $wp_query->bbp_is_search ) && ( true === $wp_query->bbp_is_search ) ) {
     843    if ( ! empty( $wp_query->bbp_is_search ) && ( true === $wp_query->bbp_is_search ) ) {
    844844        $retval = true;
    845845    }
     
    879879
    880880    // Check query
    881     if ( !empty( $wp_query->bbp_search_terms ) ) {
     881    if ( ! empty( $wp_query->bbp_search_terms ) ) {
    882882        $retval = true;
    883883    }
     
    889889
    890890    // Check $_REQUEST
    891     if ( empty( $retval ) && !empty( $_REQUEST[ bbp_get_search_rewrite_id() ] ) ) {
     891    if ( empty( $retval ) && ! empty( $_REQUEST[ bbp_get_search_rewrite_id() ] ) ) {
    892892        $retval = true;
    893893    }
     
    911911
    912912    // Check query
    913     if ( !empty( $wp_query->bbp_is_edit ) && ( $wp_query->bbp_is_edit === true ) ) {
     913    if ( ! empty( $wp_query->bbp_is_edit ) && ( $wp_query->bbp_is_edit === true ) ) {
    914914        $retval = true;
    915915    }
     
    10581058
    10591059    // Add bbPress class if we are within a bbPress page
    1060     if ( !empty( $bbp_classes ) ) {
     1060    if ( ! empty( $bbp_classes ) ) {
    10611061        $bbp_classes[] = 'bbpress';
    10621062    }
     
    14671467
    14681468        // Force array
    1469         if ( !empty( $r['exclude'] ) && !is_array( $r['exclude'] ) ) {
     1469        if ( ! empty( $r['exclude'] ) && !is_array( $r['exclude'] ) ) {
    14701470            $r['exclude'] = explode( ',', $r['exclude'] );
    14711471        }
     
    14991499
    15001500            // Setup the tab index attribute
    1501             $tab       = !empty( $r['tab'] ) ? ' tabindex="' . intval( $r['tab'] ) . '"' : '';
     1501            $tab       = ! empty( $r['tab'] ) ? ' tabindex="' . intval( $r['tab'] ) . '"' : '';
    15021502
    15031503            // Open the select tag
     
    15061506
    15071507        // Display a leading 'no-value' option, with or without custom text
    1508         if ( !empty( $r['show_none'] ) || !empty( $r['none_found'] ) ) {
     1508        if ( ! empty( $r['show_none'] ) || ! empty( $r['none_found'] ) ) {
    15091509
    15101510            // Open the 'no-value' option tag
     
    15471547
    15481548        // Items found so walk the tree
    1549         if ( !empty( $r['posts'] ) ) {
     1549        if ( ! empty( $r['posts'] ) ) {
    15501550            $retval .= walk_page_dropdown_tree( $r['posts'], 0, $r );
    15511551        }
     
    18171817
    18181818        // Output something before the editor
    1819         if ( !empty( $r['before'] ) ) {
     1819        if ( ! empty( $r['before'] ) ) {
    18201820            echo $r['before'];
    18211821        }
     
    18591859
    18601860            // Setup the tab index attribute
    1861             $tab = !empty( $r['tab'] ) ? ' tabindex="' . intval( $r['tab'] ) . '"' : ''; ?>
     1861            $tab = ! empty( $r['tab'] ) ? ' tabindex="' . intval( $r['tab'] ) . '"' : ''; ?>
    18621862
    18631863            <textarea id="bbp_<?php echo esc_attr( $r['context'] ); ?>_content" class="<?php echo esc_attr( $r['editor_class'] ); ?>" name="bbp_<?php echo esc_attr( $r['context'] ); ?>_content" cols="60" rows="<?php echo esc_attr( $r['textarea_rows'] ); ?>" <?php echo $tab; ?>><?php echo $post_content; ?></textarea>
     
    18661866
    18671867        // Output something after the editor
    1868         if ( !empty( $r['after'] ) ) {
     1868        if ( ! empty( $r['after'] ) ) {
    18691869            echo $r['after'];
    18701870        }
     
    19831983        $bbp = bbpress();
    19841984
    1985         if ( !empty( $view ) ) {
     1985        if ( ! empty( $view ) ) {
    19861986            $view = sanitize_title( $view );
    19871987        } elseif ( ! empty( $bbp->current_view_id ) ) {
     
    22032203
    22042204            // Set home text to page title
    2205             if ( !empty( $front_id ) ) {
     2205            if ( ! empty( $front_id ) ) {
    22062206                $pre_front_text = get_the_title( $front_id );
    22072207
     
    22172217        if ( empty( $args['root_text'] ) ) {
    22182218            $page = bbp_get_page_by_path( bbp_get_root_slug() );
    2219             if ( !empty( $page ) ) {
     2219            if ( ! empty( $page ) ) {
    22202220                $root_id = $page->ID;
    22212221            }
     
    22262226
    22272227        // Root slug is also the front page
    2228         if ( !empty( $front_id ) && ( $front_id === $root_id ) ) {
     2228        if ( ! empty( $front_id ) && ( $front_id === $root_id ) ) {
    22292229            $pre_include_root = false;
    22302230        }
     
    22362236
    22372237        // Don't show root if viewing page in place of forum archive
    2238         if ( !empty( $root_id ) && ( ( is_single() || is_page() ) && ( $root_id === get_the_ID() ) ) ) {
     2238        if ( ! empty( $root_id ) && ( ( is_single() || is_page() ) && ( $root_id === get_the_ID() ) ) ) {
    22392239            $pre_include_root = false;
    22402240        }
     
    22712271
    22722272        // Topic Tag (or theme compat topic tag)
    2273         } elseif ( bbp_is_topic_tag() || ( get_query_var( 'bbp_topic_tag' ) && !bbp_is_topic_tag_edit() ) ) {
     2273        } elseif ( bbp_is_topic_tag() || ( get_query_var( 'bbp_topic_tag' ) && ! bbp_is_topic_tag_edit() ) ) {
    22742274
    22752275            // Always include the tag name
     
    23352335
    23362336        // Do we want to include a link to home?
    2337         if ( !empty( $r['include_home'] ) || empty( $r['home_text'] ) ) {
     2337        if ( ! empty( $r['include_home'] ) || empty( $r['home_text'] ) ) {
    23382338            $crumbs[] = '<a href="' . trailingslashit( home_url() ) . '" class="bbp-breadcrumb-home">' . $r['home_text'] . '</a>';
    23392339        }
    23402340
    23412341        // Do we want to include a link to the forum root?
    2342         if ( !empty( $r['include_root'] ) || empty( $r['root_text'] ) ) {
     2342        if ( ! empty( $r['include_root'] ) || empty( $r['root_text'] ) ) {
    23432343
    23442344            // Page exists at root slug path, so use its permalink
    23452345            $page = bbp_get_page_by_path( bbp_get_root_slug() );
    2346             if ( !empty( $page ) ) {
     2346            if ( ! empty( $page ) ) {
    23472347                $root_url = get_permalink( $page->ID );
    23482348
     
    23572357
    23582358        // Ancestors exist
    2359         if ( !empty( $ancestors ) ) {
     2359        if ( ! empty( $ancestors ) ) {
    23602360
    23612361            // Loop through parents
     
    24072407
    24082408        // Add current page to breadcrumb
    2409         if ( !empty( $r['include_current'] ) || empty( $r['current_text'] ) ) {
     2409        if ( ! empty( $r['include_current'] ) || empty( $r['current_text'] ) ) {
    24102410            $crumbs[] = $r['current_before'] . $r['current_text'] . $r['current_after'];
    24112411        }
     
    24212421
    24222422        // Pad the separator
    2423         if ( !empty( $r['pad_sep'] ) ) {
     2423        if ( ! empty( $r['pad_sep'] ) ) {
    24242424            if ( function_exists( 'mb_strlen' ) ) {
    24252425                $sep = str_pad( $sep, mb_strlen( $sep ) + ( (int) $r['pad_sep'] * 2 ), ' ', STR_PAD_BOTH );
     
    24362436
    24372437        // Build the trail
    2438         $trail  = !empty( $crumbs ) ? ( $r['before'] . $r['crumb_before'] . implode( $sep . $r['crumb_after'] . $r['crumb_before'] , $crumbs ) . $r['crumb_after'] . $r['after'] ) : '';
     2438        $trail  = ! empty( $crumbs ) ? ( $r['before'] . $r['crumb_before'] . implode( $sep . $r['crumb_after'] . $r['crumb_before'] , $crumbs ) . $r['crumb_after'] . $r['after'] ) : '';
    24392439
    24402440        return apply_filters( 'bbp_get_breadcrumb', $trail, $crumbs, $r );
     
    25012501
    25022502    // Bail if no notices or errors
    2503     if ( !bbp_has_errors() ) {
     2503    if ( ! bbp_has_errors() ) {
    25042504        return;
    25052505    }
     
    25282528
    25292529    // Display errors first...
    2530     if ( !empty( $errors ) ) : ?>
     2530    if ( ! empty( $errors ) ) : ?>
    25312531
    25322532        <div class="bbp-template-notice error" role="alert" tabindex="-1">
     
    25392539
    25402540    // ...and messages last
    2541     if ( !empty( $messages ) ) : ?>
     2541    if ( ! empty( $messages ) ) : ?>
    25422542
    25432543        <div class="bbp-template-notice">
     
    27532753    $prefix = '';
    27542754
    2755     if ( !empty( $new_title ) ) {
     2755    if ( ! empty( $new_title ) ) {
    27562756        $prefix = " $sep ";
    27572757    }
Note: See TracChangeset for help on using the changeset viewer.