Skip to:
Content

bbPress.org

Changeset 5829


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.

Location:
trunk/src
Files:
40 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bbpress.php

    r5823 r5829  
    637637        global $wp_post_statuses;
    638638
    639         if ( !empty( $wp_post_statuses['trash'] ) ) {
     639        if ( ! empty( $wp_post_statuses['trash'] ) ) {
    640640
    641641            // User can view trash so set internal to false
  • trunk/src/includes/admin/admin.php

    r5827 r5829  
    317317     */
    318318    public static function new_install() {
    319         if ( !bbp_is_install() ) {
     319        if ( ! bbp_is_install() ) {
    320320            return;
    321321        }
     
    360360
    361361            // Toggle the section if core integration is on
    362             if ( ( true === $settings_integration ) && !empty( $section['page'] ) ) {
     362            if ( ( true === $settings_integration ) && ! empty( $section['page'] ) ) {
    363363                $page = $section['page'];
    364364            } else {
     
    373373
    374374                // Add the field
    375                 if ( ! empty( $field['callback'] ) && !empty( $field['title'] ) ) {
     375                if ( ! empty( $field['callback'] ) && ! empty( $field['title'] ) ) {
    376376                    add_settings_field( $field_id, $field['title'], $field['callback'], $page, $section_id, $field['args'] );
    377377                }
  • trunk/src/includes/admin/converter.php

    r5827 r5829  
    320320
    321321        // Save step and count so that it can be restarted.
    322         if ( ! get_option( '_bbp_converter_step' ) || ( !empty( $_POST['_bbp_converter_restart'] ) ) ) {
     322        if ( ! get_option( '_bbp_converter_step' ) || ( ! empty( $_POST['_bbp_converter_restart'] ) ) ) {
    323323            update_option( '_bbp_converter_step',  1 );
    324324            update_option( '_bbp_converter_start', 0 );
     
    332332
    333333        // Bail if platform did not get saved
    334         $platform = !empty( $_POST['_bbp_converter_platform' ] ) ? $_POST['_bbp_converter_platform' ] : get_option( '_bbp_converter_platform' );
     334        $platform = ! empty( $_POST['_bbp_converter_platform' ] ) ? $_POST['_bbp_converter_platform' ] : get_option( '_bbp_converter_platform' );
    335335        if ( empty( $platform ) ) {
    336336            return;
     
    344344            // STEP 1. Clean all tables.
    345345            case 1 :
    346                 if ( !empty( $_POST['_bbp_converter_clean'] ) ) {
     346                if ( ! empty( $_POST['_bbp_converter_clean'] ) ) {
    347347                    if ( $converter->clean( $start ) ) {
    348348                        update_option( '_bbp_converter_step',  $step + 1 );
     
    365365            // STEP 2. Convert users.
    366366            case 2 :
    367                 if ( !empty( $_POST['_bbp_converter_convert_users'] ) ) {
     367                if ( ! empty( $_POST['_bbp_converter_convert_users'] ) ) {
    368368                    if ( $converter->convert_users( $start ) ) {
    369369                        update_option( '_bbp_converter_step',  $step + 1 );
     
    385385            // STEP 3. Clean passwords.
    386386            case 3 :
    387                 if ( !empty( $_POST['_bbp_converter_convert_users'] ) ) {
     387                if ( ! empty( $_POST['_bbp_converter_convert_users'] ) ) {
    388388                    if ( $converter->clean_passwords( $start ) ) {
    389389                        update_option( '_bbp_converter_step',  $step + 1 );
     
    639639        require_once( ABSPATH . '/wp-admin/includes/upgrade.php' );
    640640
    641         if ( !empty( $bbp_db->charset ) ) {
     641        if ( ! empty( $bbp_db->charset ) ) {
    642642            $charset_collate = "DEFAULT CHARACTER SET $bbp_db->charset";
    643643        }
    644644
    645         if ( !empty( $bbp_db->collate ) ) {
     645        if ( ! empty( $bbp_db->collate ) ) {
    646646            $charset_collate .= " COLLATE $bbp_db->collate";
    647647        }
     
    958958
    959959        // Get the fields from the destination table
    960         if ( !empty( $tablename ) ) {
     960        if ( ! empty( $tablename ) ) {
    961961            $tablefield_array = $this->get_fields( $tablename );
    962962        }
     
    968968
    969969            // Yay a match, and we have a from table, too
    970             if ( ( $item['to_type'] == $to_type ) && !empty( $item['from_tablename'] ) ) {
     970            if ( ( $item['to_type'] == $to_type ) && ! empty( $item['from_tablename'] ) ) {
    971971
    972972                // $from_tablename was set from a previous loop iteration
     
    974974
    975975                    // Doing some joining
    976                     if ( !in_array( $item['from_tablename'], $from_tables ) && in_array( $item['join_tablename'], $from_tables ) ) {
     976                    if ( ! in_array( $item['from_tablename'], $from_tables ) && in_array( $item['join_tablename'], $from_tables ) ) {
    977977                        $from_tablename .= ' ' . $item['join_type'] . ' JOIN ' . $this->opdb->prefix . $item['from_tablename'] . ' AS ' . $item['from_tablename'] . ' ' . $item['join_expression'];
    978978                    }
     
    984984
    985985                // Specific FROM expression data used
    986                 if ( !empty( $item['from_expression'] ) ) {
     986                if ( ! empty( $item['from_expression'] ) ) {
    987987
    988988                    // No 'WHERE' in expression
     
    10051005
    10061006        // We have a $from_tablename, so we want to get some data to convert
    1007         if ( !empty( $from_tablename ) ) {
     1007        if ( ! empty( $from_tablename ) ) {
    10081008
    10091009            // Get some data from the old forums
     
    10161016
    10171017            // Query returned some results
    1018             if ( !empty( $forum_array ) ) {
     1018            if ( ! empty( $forum_array ) ) {
    10191019
    10201020                // Loop through results
     
    10541054                            // Destination field is not empty, so we might need
    10551055                            // to do some extra work or set a default.
    1056                             } elseif ( !empty( $row['to_fieldname'] ) ) {
     1056                            } elseif ( ! empty( $row['to_fieldname'] ) ) {
    10571057
    10581058                                // Allows us to set default fields.
     
    12521252        $has_update = false;
    12531253
    1254         if ( !empty( $this->sync_table ) ) {
     1254        if ( ! empty( $this->sync_table ) ) {
    12551255            $query = 'SELECT value_id, meta_value FROM '            . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_forum_parent_id" AND meta_value > 0 LIMIT ' . $start . ', ' . $this->max_rows;
    12561256        } else {
     
    12841284        $has_update = false;
    12851285
    1286         if ( !empty( $this->sync_table ) ) {
     1286        if ( ! empty( $this->sync_table ) ) {
    12871287            $query = 'SELECT value_id, meta_value FROM '            . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status_id" AND meta_value = "sticky" LIMIT ' . $start . ', ' . $this->max_rows;
    12881288        } else {
     
    13151315        $has_update = false;
    13161316
    1317         if ( !empty( $this->sync_table ) ) {
     1317        if ( ! empty( $this->sync_table ) ) {
    13181318            $query = 'SELECT value_id, meta_value FROM '            . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status_id" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows;
    13191319        } else {
     
    13461346        $has_update = false;
    13471347
    1348         if ( !empty( $this->sync_table ) ) {
     1348        if ( ! empty( $this->sync_table ) ) {
    13491349            $query = 'SELECT value_id, meta_value FROM ' . $this->sync_table_name           . ' WHERE meta_key = "_bbp_old_closed_status_id" AND meta_value = "closed" LIMIT ' . $start . ', ' . $this->max_rows;
    13501350        } else {
     
    13731373        $has_update = false;
    13741374
    1375         if ( !empty( $this->sync_table ) ) {
     1375        if ( ! empty( $this->sync_table ) ) {
    13761376            $query = 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_reply_to_id" AND meta_value > 0 LIMIT ' . $start . ', ' . $this->max_rows;
    13771377        } else {
     
    14031403        $has_update = false;
    14041404
    1405         if ( !empty( $this->sync_table ) ) {
     1405        if ( ! empty( $this->sync_table ) ) {
    14061406            $query = 'SELECT sync_table1.value_id AS topic_id, sync_table1.meta_value AS topic_is_anonymous, sync_table2.meta_value AS topic_author
    14071407                            FROM       ' . $this->sync_table_name . ' AS sync_table1
     
    14491449        $has_update = false;
    14501450
    1451         if ( !empty( $this->sync_table ) ) {
     1451        if ( ! empty( $this->sync_table ) ) {
    14521452            $query = 'SELECT sync_table1.value_id AS reply_id, sync_table1.meta_value AS reply_is_anonymous, sync_table2.meta_value AS reply_author
    14531453                            FROM       ' . $this->sync_table_name . ' AS sync_table1
     
    15231523        $users = $this->wpdb->get_results( $query, ARRAY_A );
    15241524
    1525         if ( !empty( $users ) ) {
     1525        if ( ! empty( $users ) ) {
    15261526            foreach ( $users as $value ) {
    15271527                wp_delete_user( $value['value_id'] );
     
    15521552        $bbconverter = $this->wpdb->get_results( $query, ARRAY_A );
    15531553
    1554         if ( !empty( $bbconverter ) ) {
     1554        if ( ! empty( $bbconverter ) ) {
    15551555
    15561556            foreach ( $bbconverter as $value ) {
     
    16121612    public function callback_pass( $username, $password ) {
    16131613        $user = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT * FROM ' . $this->wpdb->users . ' WHERE user_login = "%s" AND user_pass = "" LIMIT 1', $username ) );
    1614         if ( !empty( $user ) ) {
     1614        if ( ! empty( $user ) ) {
    16151615            $usermeta = $this->wpdb->get_row( 'SELECT * FROM ' . $this->wpdb->usermeta . ' WHERE meta_key = "_bbp_password" AND user_id = "' . $user->ID . '" LIMIT 1' );
    16161616
    1617             if ( !empty( $usermeta ) ) {
     1617            if ( ! empty( $usermeta ) ) {
    16181618                if ( $this->authenticate_pass( $password, $usermeta->meta_value ) ) {
    16191619                    $this->wpdb->query( 'UPDATE ' . $this->wpdb->users . ' ' . 'SET user_pass = "' . wp_hash_password( $password ) . '" ' . 'WHERE ID = "' . $user->ID . '"' );
     
    16311631     */
    16321632    private function callback_forumid( $field ) {
    1633         if ( !isset( $this->map_forumid[$field] ) ) {
    1634             if ( !empty( $this->sync_table ) ) {
     1633        if ( ! isset( $this->map_forumid[$field] ) ) {
     1634            if ( ! empty( $this->sync_table ) ) {
    16351635                $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_forum_id" AND meta_value = "%s" LIMIT 1', $field ) );
    16361636            } else {
     
    16541654     */
    16551655    private function callback_topicid( $field ) {
    1656         if ( !isset( $this->map_topicid[$field] ) ) {
    1657             if ( !empty( $this->sync_table ) ) {
     1656        if ( ! isset( $this->map_topicid[$field] ) ) {
     1657            if ( ! empty( $this->sync_table ) ) {
    16581658                $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_topic_id" AND meta_value = "%s" LIMIT 1', $field ) );
    16591659            } else {
     
    16791679     */
    16801680    private function callback_reply_to( $field ) {
    1681         if ( !isset( $this->map_reply_to[$field] ) ) {
    1682             if ( !empty( $this->sync_table ) ) {
     1681        if ( ! isset( $this->map_reply_to[$field] ) ) {
     1682            if ( ! empty( $this->sync_table ) ) {
    16831683                $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_reply_id" AND meta_value = "%s" LIMIT 1', $field ) );
    16841684            } else {
     
    17021702     */
    17031703    private function callback_userid( $field ) {
    1704         if ( !isset( $this->map_userid[$field] ) ) {
    1705             if ( !empty( $this->sync_table ) ) {
     1704        if ( ! isset( $this->map_userid[$field] ) ) {
     1705            if ( ! empty( $this->sync_table ) ) {
    17061706                $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_user_id" AND meta_value = "%s" LIMIT 1', $field ) );
    17071707            } else {
     
    17121712                $this->map_userid[$field] = $row->value_id;
    17131713            } else {
    1714                 if ( !empty( $_POST['_bbp_converter_convert_users'] ) && ( $_POST['_bbp_converter_convert_users'] == 1 ) ) {
     1714                if ( ! empty( $_POST['_bbp_converter_convert_users'] ) && ( $_POST['_bbp_converter_convert_users'] == 1 ) ) {
    17151715                    $this->map_userid[$field] = 0;
    17161716                } else {
  • trunk/src/includes/admin/converters/e107v1.php

    r5770 r5829  
    567567        $field = preg_replace( '/(\d+?)+\.[\S\s]+/', '$1', $field );
    568568
    569         if ( !isset( $this->map_userid[$field] ) ) {
    570             if ( !empty( $this->sync_table ) ) {
     569        if ( ! isset( $this->map_userid[$field] ) ) {
     570            if ( ! empty( $this->sync_table ) ) {
    571571                $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_user_id" AND meta_value = "%s" LIMIT 1', $field ) );
    572572            } else {
     
    577577                $this->map_userid[$field] = $row->value_id;
    578578            } else {
    579                 if ( !empty( $_POST['_bbp_converter_convert_users'] ) && ( $_POST['_bbp_converter_convert_users'] == 1 ) ) {
     579                if ( ! empty( $_POST['_bbp_converter_convert_users'] ) && ( $_POST['_bbp_converter_convert_users'] == 1 ) ) {
    580580                    $this->map_userid[$field] = 0;
    581581                } else {
  • trunk/src/includes/admin/forums.php

    r5770 r5829  
    9292     */
    9393    private function bail() {
    94         if ( !isset( get_current_screen()->post_type ) || ( $this->post_type != get_current_screen()->post_type ) ) {
     94        if ( ! isset( get_current_screen()->post_type ) || ( $this->post_type != get_current_screen()->post_type ) ) {
    9595            return true;
    9696        }
     
    301301
    302302        // Nonce check
    303         if ( empty( $_POST['bbp_forum_metabox'] ) || !wp_verify_nonce( $_POST['bbp_forum_metabox'], 'bbp_forum_metabox_save' ) ) {
     303        if ( empty( $_POST['bbp_forum_metabox'] ) || ! wp_verify_nonce( $_POST['bbp_forum_metabox'], 'bbp_forum_metabox_save' ) ) {
    304304            return $forum_id;
    305305        }
     
    316316
    317317        // Parent ID
    318         $parent_id = ( !empty( $_POST['parent_id'] ) && is_numeric( $_POST['parent_id'] ) ) ? (int) $_POST['parent_id'] : 0;
     318        $parent_id = ( ! empty( $_POST['parent_id'] ) && is_numeric( $_POST['parent_id'] ) ) ? (int) $_POST['parent_id'] : 0;
    319319
    320320        // Update the forum meta bidness
     
    437437
    438438        // Only proceed if GET is a forum toggle action
    439         if ( bbp_is_get_request() && !empty( $_GET['action'] ) && in_array( $_GET['action'], array( 'bbp_toggle_forum_close' ) ) && !empty( $_GET['forum_id'] ) ) {
     439        if ( bbp_is_get_request() && ! empty( $_GET['action'] ) && in_array( $_GET['action'], array( 'bbp_toggle_forum_close' ) ) && ! empty( $_GET['forum_id'] ) ) {
    440440            $action    = $_GET['action'];            // What action is taking place?
    441441            $forum_id  = (int) $_GET['forum_id'];    // What's the forum id?
     
    505505
    506506        // Only proceed if GET is a forum toggle action
    507         if ( bbp_is_get_request() && !empty( $_GET['bbp_forum_toggle_notice'] ) && in_array( $_GET['bbp_forum_toggle_notice'], array( 'opened', 'closed' ) ) && !empty( $_GET['forum_id'] ) ) {
     507        if ( bbp_is_get_request() && ! empty( $_GET['bbp_forum_toggle_notice'] ) && in_array( $_GET['bbp_forum_toggle_notice'], array( 'opened', 'closed' ) ) && ! empty( $_GET['forum_id'] ) ) {
    508508            $notice     = $_GET['bbp_forum_toggle_notice'];         // Which notice?
    509509            $forum_id   = (int) $_GET['forum_id'];                  // What's the forum id?
    510             $is_failure = !empty( $_GET['failed'] ) ? true : false; // Was that a failure?
     510            $is_failure = ! empty( $_GET['failed'] ) ? true : false; // Was that a failure?
    511511
    512512            // Bail if no forum_id or notice
     
    621621            case 'bbp_forum_freshness' :
    622622                $last_active = bbp_get_forum_last_active_time( $forum_id, false );
    623                 if ( !empty( $last_active ) ) {
     623                if ( ! empty( $last_active ) ) {
    624624                    echo esc_html( $last_active );
    625625                } else {
  • trunk/src/includes/admin/functions.php

    r5770 r5829  
    133133
    134134    // Bail if not on an admin page and not getting a sample permalink
    135     if ( !empty( $sample ) && is_admin() && bbp_is_custom_post_type() ) {
     135    if ( ! empty( $sample ) && is_admin() && bbp_is_custom_post_type() ) {
    136136        return urldecode( $post_link );
    137137    }
  • trunk/src/includes/admin/replies.php

    r5810 r5829  
    9999     */
    100100    private function bail() {
    101         if ( !isset( get_current_screen()->post_type ) || ( $this->post_type !== get_current_screen()->post_type ) ) {
     101        if ( ! isset( get_current_screen()->post_type ) || ( $this->post_type !== get_current_screen()->post_type ) ) {
    102102            return true;
    103103        }
     
    305305
    306306        // Nonce check
    307         if ( empty( $_POST['bbp_reply_metabox'] ) || !wp_verify_nonce( $_POST['bbp_reply_metabox'], 'bbp_reply_metabox_save' ) ) {
     307        if ( empty( $_POST['bbp_reply_metabox'] ) || ! wp_verify_nonce( $_POST['bbp_reply_metabox'], 'bbp_reply_metabox_save' ) ) {
    308308            return $reply_id;
    309309        }
     
    315315
    316316        // Get the reply meta post values
    317         $topic_id = !empty( $_POST['parent_id']    ) ? (int) $_POST['parent_id']    : 0;
    318         $forum_id = !empty( $_POST['bbp_forum_id'] ) ? (int) $_POST['bbp_forum_id'] : bbp_get_topic_forum_id( $topic_id );
    319         $reply_to = !empty( $_POST['bbp_reply_to'] ) ? (int) $_POST['bbp_reply_to'] : 0;
     317        $topic_id = ! empty( $_POST['parent_id']    ) ? (int) $_POST['parent_id']    : 0;
     318        $forum_id = ! empty( $_POST['bbp_forum_id'] ) ? (int) $_POST['bbp_forum_id'] : bbp_get_topic_forum_id( $topic_id );
     319        $reply_to = ! empty( $_POST['bbp_reply_to'] ) ? (int) $_POST['bbp_reply_to'] : 0;
    320320
    321321        // Get reply author data
     
    550550            $notice     = $_GET['bbp_reply_toggle_notice'];         // Which notice?
    551551            $reply_id   = (int) $_GET['reply_id'];                  // What's the reply id?
    552             $is_failure = !empty( $_GET['failed'] ) ? true : false; // Was that a failure?
     552            $is_failure = ! empty( $_GET['failed'] ) ? true : false; // Was that a failure?
    553553
    554554            // Empty? No reply?
     
    675675
    676676                // Output forum name
    677                 if ( !empty( $topic_id ) ) {
     677                if ( ! empty( $topic_id ) ) {
    678678
    679679                    // Topic Title
     
    701701
    702702                // Output forum name
    703                 if ( !empty( $reply_forum_id ) ) {
     703                if ( ! empty( $reply_forum_id ) ) {
    704704
    705705                    // Forum Title
     
    847847
    848848        // Add Empty Spam button
    849         if ( !empty( $_GET['post_status'] ) && ( bbp_get_spam_status_id() === $_GET['post_status'] ) && current_user_can( 'moderate' ) ) {
     849        if ( ! empty( $_GET['post_status'] ) && ( bbp_get_spam_status_id() === $_GET['post_status'] ) && current_user_can( 'moderate' ) ) {
    850850            wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
    851851            $title = esc_attr__( 'Empty Spam', 'bbpress' );
     
    854854
    855855        // Get which forum is selected
    856         $selected = !empty( $_GET['bbp_forum_id'] ) ? $_GET['bbp_forum_id'] : '';
     856        $selected = ! empty( $_GET['bbp_forum_id'] ) ? $_GET['bbp_forum_id'] : '';
    857857
    858858        // Show the forums dropdown
     
    881881
    882882        // Add post_parent query_var if one is present
    883         if ( !empty( $_GET['bbp_forum_id'] ) ) {
     883        if ( ! empty( $_GET['bbp_forum_id'] ) ) {
    884884            $query_vars['meta_key']   = '_bbp_forum_id';
    885885            $query_vars['meta_type']  = 'NUMERIC';
  • trunk/src/includes/admin/settings.php

    r5793 r5829  
    724724    }
    725725
    726     if ( !empty( $theme_options ) ) : ?>
     726    if ( ! empty( $theme_options ) ) : ?>
    727727
    728728        <select name="_bbp_theme_package_id" id="_bbp_theme_package_id" <?php bbp_maybe_admin_setting_disabled( '_bbp_theme_package_id' ); ?>><?php echo $theme_options ?></select>
     
    17301730
    17311731            // Loop through root slugs and check for conflict
    1732             if ( !empty( $bp->pages ) ) {
     1732            if ( ! empty( $bp->pages ) ) {
    17331733                foreach ( $bp->pages as $page => $page_data ) {
    17341734                    $page_base    = $page . '_base';
  • trunk/src/includes/admin/tools.php

    r5827 r5829  
    510510
    511511        // Bump the count
    512         if ( !empty( $updated ) && ! is_wp_error( $updated ) ) {
     512        if ( ! empty( $updated ) && ! is_wp_error( $updated ) ) {
    513513            ++$g_count;
    514514        }
     
    516516        // Update group to forum relationship data
    517517        $group_id = (int) $bbp_db->get_var( "SELECT `group_id` FROM `{$groups_meta_table}` WHERE `meta_key` = 'forum_id' AND `meta_value` = '{$group_forums->ID}';" );
    518         if ( !empty( $group_id ) ) {
     518        if ( ! empty( $group_id ) ) {
    519519
    520520            // Update the group to forum meta connection in forums
     
    621621
    622622    $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) );
    623     if ( !empty( $forums ) ) {
     623    if ( ! empty( $forums ) ) {
    624624        foreach ( $forums as $forum ) {
    625625            bbp_update_forum_topic_count( $forum->ID );
     
    668668    // Recalculate the metas key _bbp_reply_count and _bbp_total_reply_count for each forum
    669669    $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) );
    670     if ( !empty( $forums ) ) {
     670    if ( ! empty( $forums ) ) {
    671671        foreach ( $forums as $forum ) {
    672672            bbp_update_forum_reply_count( $forum->ID );
     
    11631163    // Loop through forums
    11641164    foreach ( $forums as $forum_id ) {
    1165         if ( !bbp_is_forum_category( $forum_id ) ) {
     1165        if ( ! bbp_is_forum_category( $forum_id ) ) {
    11661166            bbp_update_forum( array( 'forum_id' => $forum_id ) );
    11671167        }
     
    16071607    /** Post Meta *************************************************************/
    16081608
    1609     if ( !empty( $sql_posts ) ) {
     1609    if ( ! empty( $sql_posts ) ) {
    16101610        $sql_meta = array();
    16111611        foreach ( $sql_posts as $key => $value ) {
     
    16291629
    16301630    // First, if we're deleting previously imported users, delete them now
    1631     if ( !empty( $_POST['bbpress-delete-imported-users'] ) ) {
     1631    if ( ! empty( $_POST['bbpress-delete-imported-users'] ) ) {
    16321632        $sql_users  = $bbp_db->get_results( "SELECT `user_id` FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '_bbp_user_id'", OBJECT_K );
    1633         if ( !empty( $sql_users ) ) {
     1633        if ( ! empty( $sql_users ) ) {
    16341634            $sql_meta = array();
    16351635            foreach ( $sql_users as $key => $value ) {
  • trunk/src/includes/admin/topics.php

    r5810 r5829  
    9999     */
    100100    private function bail() {
    101         if ( !isset( get_current_screen()->post_type ) || ( $this->post_type !== get_current_screen()->post_type ) ) {
     101        if ( ! isset( get_current_screen()->post_type ) || ( $this->post_type !== get_current_screen()->post_type ) ) {
    102102            return true;
    103103        }
     
    301301
    302302        // Nonce check
    303         if ( empty( $_POST['bbp_topic_metabox'] ) || !wp_verify_nonce( $_POST['bbp_topic_metabox'], 'bbp_topic_metabox_save' ) ) {
     303        if ( empty( $_POST['bbp_topic_metabox'] ) || ! wp_verify_nonce( $_POST['bbp_topic_metabox'], 'bbp_topic_metabox_save' ) ) {
    304304            return $topic_id;
    305305        }
     
    311311
    312312        // Get the forum ID
    313         $forum_id = !empty( $_POST['parent_id'] ) ? (int) $_POST['parent_id'] : 0;
     313        $forum_id = ! empty( $_POST['parent_id'] ) ? (int) $_POST['parent_id'] : 0;
    314314
    315315        // Get topic author data
     
    322322
    323323        // Stickies
    324         if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
     324        if ( ! empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
    325325
    326326            // What's the haps?
     
    498498
    499499        // Only proceed if GET is a topic toggle action
    500         if ( bbp_is_get_request() && !empty( $_GET['action'] ) && in_array( $_GET['action'], array( 'bbp_toggle_topic_close', 'bbp_toggle_topic_stick', 'bbp_toggle_topic_spam', 'bbp_toggle_topic_approve' ) ) && !empty( $_GET['topic_id'] ) ) {
     500        if ( bbp_is_get_request() && ! empty( $_GET['action'] ) && in_array( $_GET['action'], array( 'bbp_toggle_topic_close', 'bbp_toggle_topic_stick', 'bbp_toggle_topic_spam', 'bbp_toggle_topic_approve' ) ) && ! empty( $_GET['topic_id'] ) ) {
    501501            $action    = $_GET['action'];            // What action is taking place?
    502502            $topic_id  = (int) $_GET['topic_id'];    // What's the topic id?
     
    546546
    547547                    $is_sticky = bbp_is_topic_sticky( $topic_id );
    548                     $is_super  = ( false === $is_sticky ) && !empty( $_GET['super'] ) && ( "1" === $_GET['super'] )
     548                    $is_super  = ( false === $is_sticky ) && ! empty( $_GET['super'] ) && ( "1" === $_GET['super'] )
    549549                        ? true
    550550                        : false;
     
    614614            $notice     = $_GET['bbp_topic_toggle_notice'];         // Which notice?
    615615            $topic_id   = (int) $_GET['topic_id'];                  // What's the topic id?
    616             $is_failure = !empty( $_GET['failed'] ) ? true : false; // Was that a failure?
     616            $is_failure = ! empty( $_GET['failed'] ) ? true : false; // Was that a failure?
    617617
    618618            // Bais if no topic_id or notice
     
    768768
    769769                // Output forum name
    770                 if ( !empty( $forum_id ) ) {
     770                if ( ! empty( $forum_id ) ) {
    771771
    772772                    // Forum Title
     
    812812            case 'bbp_topic_freshness' :
    813813                $last_active = bbp_get_topic_last_active_time( $topic_id, false );
    814                 if ( !empty( $last_active ) ) {
     814                if ( ! empty( $last_active ) ) {
    815815                    echo esc_html( $last_active );
    816816                } else {
     
    948948
    949949        // Add Empty Spam button
    950         if ( !empty( $_GET['post_status'] ) && ( bbp_get_spam_status_id() === $_GET['post_status'] ) && current_user_can( 'moderate' ) ) {
     950        if ( ! empty( $_GET['post_status'] ) && ( bbp_get_spam_status_id() === $_GET['post_status'] ) && current_user_can( 'moderate' ) ) {
    951951            wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
    952952            $title = esc_attr__( 'Empty Spam', 'bbpress' );
     
    955955
    956956        // Get which forum is selected
    957         $selected = !empty( $_GET['bbp_forum_id'] ) ? $_GET['bbp_forum_id'] : '';
     957        $selected = ! empty( $_GET['bbp_forum_id'] ) ? $_GET['bbp_forum_id'] : '';
    958958
    959959        // Show the forums dropdown
     
    982982
    983983        // Add post_parent query_var if one is present
    984         if ( !empty( $_GET['bbp_forum_id'] ) ) {
     984        if ( ! empty( $_GET['bbp_forum_id'] ) ) {
    985985            $query_vars['meta_key']   = '_bbp_forum_id';
    986986            $query_vars['meta_type']  = 'NUMERIC';
  • trunk/src/includes/common/ajax.php

    r5770 r5829  
    107107
    108108    // Merge extra response parameters in
    109     if ( !empty( $extras ) && is_array( $extras ) ) {
     109    if ( ! empty( $extras ) && is_array( $extras ) ) {
    110110        $response = array_merge( $response, $extras );
    111111    }
  • trunk/src/includes/common/classes.php

    r5770 r5829  
    396396
    397397        // Check for a callback and use it if specified
    398         if ( !empty( $args['callback'] ) ) {
     398        if ( ! empty( $args['callback'] ) ) {
    399399            call_user_func( $args['callback'], $object, $args, $depth );
    400400            return;
     
    402402
    403403        // Style for div or list element
    404         if ( !empty( $args['style'] ) && ( 'div' === $args['style'] ) ) {
     404        if ( ! empty( $args['style'] ) && ( 'div' === $args['style'] ) ) {
    405405            echo "<div>\n";
    406406        } else {
     
    417417
    418418        // Check for a callback and use it if specified
    419         if ( !empty( $args['end-callback'] ) ) {
     419        if ( ! empty( $args['end-callback'] ) ) {
    420420            call_user_func( $args['end-callback'], $object, $args, $depth );
    421421            return;
     
    423423
    424424        // Style for div or list element
    425         if ( !empty( $args['style'] ) && ( 'div' === $args['style'] ) ) {
     425        if ( ! empty( $args['style'] ) && ( 'div' === $args['style'] ) ) {
    426426            echo "</div>\n";
    427427        } else {
  • trunk/src/includes/common/functions.php

    r5827 r5829  
    126126        );
    127127
    128         if ( !empty( $older_date ) && !is_numeric( $older_date ) ) {
     128        if ( ! empty( $older_date ) && !is_numeric( $older_date ) ) {
    129129            $time_chunks = explode( ':', str_replace( ' ', ':', $older_date ) );
    130130            $date_chunks = explode( '-', str_replace( ' ', '-', $older_date ) );
     
    135135        // between a date and the current time. $newer_date will have a value if
    136136        // we want to work out time elapsed between two known dates.
    137         $newer_date = ( !$newer_date ) ? strtotime( current_time( 'mysql', $gmt ) ) : $newer_date;
     137        $newer_date = ( ! $newer_date ) ? strtotime( current_time( 'mysql', $gmt ) ) : $newer_date;
    138138
    139139        // Difference in seconds
     
    162162
    163163            // If $i iterates all the way to $j, then the event happened 0 seconds ago
    164             if ( !isset( $chunks[$i] ) ) {
     164            if ( ! isset( $chunks[$i] ) ) {
    165165                $output = $right_now_text;
    166166
     
    242242 */
    243243function bbp_get_redirect_to() {
    244     $retval = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
     244    $retval = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
    245245
    246246    return apply_filters( 'bbp_get_redirect_to', $retval );
     
    262262
    263263    // Are we appending the view=all vars?
    264     if ( bbp_get_view_all() || !empty( $force ) ) {
     264    if ( bbp_get_view_all() || ! empty( $force ) ) {
    265265        $link = add_query_arg( array( 'view' => 'all' ), $original_link );
    266266    } else {
     
    296296 */
    297297function bbp_get_view_all( $cap = 'moderate' ) {
    298     $retval = ( ( !empty( $_GET['view'] ) && ( 'all' === $_GET['view'] ) && current_user_can( $cap ) ) );
     298    $retval = ( ( ! empty( $_GET['view'] ) && ( 'all' === $_GET['view'] ) && current_user_can( $cap ) ) );
    299299    return apply_filters( 'bbp_get_view_all', (bool) $retval );
    300300}
     
    316316
    317317    // Check query paged
    318     } elseif ( !empty( $wp_query->query['paged'] ) ) {
     318    } elseif ( ! empty( $wp_query->query['paged'] ) ) {
    319319        $paged = $wp_query->query['paged'];
    320320    }
    321321
    322322    // Paged found
    323     if ( !empty( $paged ) ) {
     323    if ( ! empty( $paged ) ) {
    324324        return (int) $paged;
    325325    }
     
    354354
    355355    // Post is not a topic or reply, return
    356     if ( !in_array( $data['post_type'], array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) ) ) {
     356    if ( ! in_array( $data['post_type'], array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) ) ) {
    357357        return $data;
    358358    }
    359359
    360360    // Is the post by an anonymous user?
    361     if ( ( bbp_get_topic_post_type() === $data['post_type'] && !bbp_is_topic_anonymous( $postarr['ID'] ) ) ||
    362          ( bbp_get_reply_post_type() === $data['post_type'] && !bbp_is_reply_anonymous( $postarr['ID'] ) ) ) {
     361    if ( ( bbp_get_topic_post_type() === $data['post_type'] && ! bbp_is_topic_anonymous( $postarr['ID'] ) ) ||
     362         ( bbp_get_reply_post_type() === $data['post_type'] && ! bbp_is_reply_anonymous( $postarr['ID'] ) ) ) {
    363363        return $data;
    364364    }
     
    480480
    481481    // Users
    482     if ( !empty( $r['count_users'] ) ) {
     482    if ( ! empty( $r['count_users'] ) ) {
    483483        $user_count = bbp_get_total_users();
    484484    }
    485485
    486486    // Forums
    487     if ( !empty( $r['count_forums'] ) ) {
     487    if ( ! empty( $r['count_forums'] ) ) {
    488488        $forum_count = wp_count_posts( bbp_get_forum_post_type() )->publish;
    489489    }
     
    496496
    497497    // Topics
    498     if ( !empty( $r['count_topics'] ) ) {
     498    if ( ! empty( $r['count_topics'] ) ) {
    499499        $all_topics  = wp_count_posts( bbp_get_topic_post_type() );
    500500
     
    505505
    506506            // Private
    507             $topics['private'] = ( !empty( $r['count_private_topics'] ) && current_user_can( 'read_private_topics' ) ) ? (int) $all_topics->{$private} : 0;
     507            $topics['private'] = ( ! empty( $r['count_private_topics'] ) && current_user_can( 'read_private_topics' ) ) ? (int) $all_topics->{$private} : 0;
    508508
    509509            // Spam
    510             $topics['spammed'] = ( !empty( $r['count_spammed_topics'] ) && current_user_can( 'edit_others_topics'  ) ) ? (int) $all_topics->{$spam}    : 0;
     510            $topics['spammed'] = ( ! empty( $r['count_spammed_topics'] ) && current_user_can( 'edit_others_topics'  ) ) ? (int) $all_topics->{$spam}    : 0;
    511511
    512512            // Trash
    513             $topics['trashed'] = ( !empty( $r['count_trashed_topics'] ) && current_user_can( 'view_trash'          ) ) ? (int) $all_topics->{$trash}   : 0;
     513            $topics['trashed'] = ( ! empty( $r['count_trashed_topics'] ) && current_user_can( 'view_trash'          ) ) ? (int) $all_topics->{$trash}   : 0;
    514514
    515515            // Total hidden (private + spam + trash)
     
    517517
    518518            // Generate the hidden topic count's title attribute
    519             $topic_titles[] = !empty( $topics['private'] ) ? sprintf( __( 'Private: %s', 'bbpress' ), number_format_i18n( $topics['private'] ) ) : '';
    520             $topic_titles[] = !empty( $topics['spammed'] ) ? sprintf( __( 'Spammed: %s', 'bbpress' ), number_format_i18n( $topics['spammed'] ) ) : '';
    521             $topic_titles[] = !empty( $topics['trashed'] ) ? sprintf( __( 'Trashed: %s', 'bbpress' ), number_format_i18n( $topics['trashed'] ) ) : '';
     519            $topic_titles[] = ! empty( $topics['private'] ) ? sprintf( __( 'Private: %s', 'bbpress' ), number_format_i18n( $topics['private'] ) ) : '';
     520            $topic_titles[] = ! empty( $topics['spammed'] ) ? sprintf( __( 'Spammed: %s', 'bbpress' ), number_format_i18n( $topics['spammed'] ) ) : '';
     521            $topic_titles[] = ! empty( $topics['trashed'] ) ? sprintf( __( 'Trashed: %s', 'bbpress' ), number_format_i18n( $topics['trashed'] ) ) : '';
    522522
    523523            // Compile the hidden topic title
     
    527527
    528528    // Replies
    529     if ( !empty( $r['count_replies'] ) ) {
     529    if ( ! empty( $r['count_replies'] ) ) {
    530530
    531531        $all_replies = wp_count_posts( bbp_get_reply_post_type() );
     
    537537
    538538            // Private
    539             $replies['private'] = ( !empty( $r['count_private_replies'] ) && current_user_can( 'read_private_replies' ) ) ? (int) $all_replies->{$private} : 0;
     539            $replies['private'] = ( ! empty( $r['count_private_replies'] ) && current_user_can( 'read_private_replies' ) ) ? (int) $all_replies->{$private} : 0;
    540540
    541541            // Spam
    542             $replies['spammed'] = ( !empty( $r['count_spammed_replies'] ) && current_user_can( 'edit_others_replies'  ) ) ? (int) $all_replies->{$spam}    : 0;
     542            $replies['spammed'] = ( ! empty( $r['count_spammed_replies'] ) && current_user_can( 'edit_others_replies'  ) ) ? (int) $all_replies->{$spam}    : 0;
    543543
    544544            // Trash
    545             $replies['trashed'] = ( !empty( $r['count_trashed_replies'] ) && current_user_can( 'view_trash'           ) ) ? (int) $all_replies->{$trash}   : 0;
     545            $replies['trashed'] = ( ! empty( $r['count_trashed_replies'] ) && current_user_can( 'view_trash'           ) ) ? (int) $all_replies->{$trash}   : 0;
    546546
    547547            // Total hidden (private + spam + trash)
     
    549549
    550550            // Generate the hidden topic count's title attribute
    551             $reply_titles[] = !empty( $replies['private'] ) ? sprintf( __( 'Private: %s', 'bbpress' ), number_format_i18n( $replies['private'] ) ) : '';
    552             $reply_titles[] = !empty( $replies['spammed'] ) ? sprintf( __( 'Spammed: %s', 'bbpress' ), number_format_i18n( $replies['spammed'] ) ) : '';
    553             $reply_titles[] = !empty( $replies['trashed'] ) ? sprintf( __( 'Trashed: %s', 'bbpress' ), number_format_i18n( $replies['trashed'] ) ) : '';
     551            $reply_titles[] = ! empty( $replies['private'] ) ? sprintf( __( 'Private: %s', 'bbpress' ), number_format_i18n( $replies['private'] ) ) : '';
     552            $reply_titles[] = ! empty( $replies['spammed'] ) ? sprintf( __( 'Spammed: %s', 'bbpress' ), number_format_i18n( $replies['spammed'] ) ) : '';
     553            $reply_titles[] = ! empty( $replies['trashed'] ) ? sprintf( __( 'Trashed: %s', 'bbpress' ), number_format_i18n( $replies['trashed'] ) ) : '';
    554554
    555555            // Compile the hidden replies title
     
    560560
    561561    // Topic Tags
    562     if ( !empty( $r['count_tags'] ) && bbp_allow_topic_tags() ) {
     562    if ( ! empty( $r['count_tags'] ) && bbp_allow_topic_tags() ) {
    563563
    564564        // Get the count
     
    566566
    567567        // Empty tags
    568         if ( !empty( $r['count_empty_tags'] ) && current_user_can( 'edit_topic_tags' ) ) {
     568        if ( ! empty( $r['count_empty_tags'] ) && current_user_can( 'edit_topic_tags' ) ) {
    569569            $empty_topic_tag_count = wp_count_terms( bbp_get_topic_tag_tax_id() ) - $topic_tag_count;
    570570        }
     
    621621    // Parse arguments against default values
    622622    $r = bbp_parse_args( $args, array (
    623         'bbp_anonymous_name'    => !empty( $_POST['bbp_anonymous_name']    ) ? $_POST['bbp_anonymous_name']    : false,
    624         'bbp_anonymous_email'   => !empty( $_POST['bbp_anonymous_email']   ) ? $_POST['bbp_anonymous_email']   : false,
    625         'bbp_anonymous_website' => !empty( $_POST['bbp_anonymous_website'] ) ? $_POST['bbp_anonymous_website'] : false,
     623        'bbp_anonymous_name'    => ! empty( $_POST['bbp_anonymous_name']    ) ? $_POST['bbp_anonymous_name']    : false,
     624        'bbp_anonymous_email'   => ! empty( $_POST['bbp_anonymous_email']   ) ? $_POST['bbp_anonymous_email']   : false,
     625        'bbp_anonymous_website' => ! empty( $_POST['bbp_anonymous_website'] ) ? $_POST['bbp_anonymous_website'] : false,
    626626    ), 'filter_anonymous_post_data' );
    627627
     
    686686
    687687    // Check for anonymous post
    688     if ( empty( $r['post_author'] ) && ( !empty( $r['anonymous_data'] ) && !empty( $r['anonymous_data']['bbp_anonymous_email'] ) ) ) {
     688    if ( empty( $r['post_author'] ) && ( ! empty( $r['anonymous_data'] ) && ! empty( $r['anonymous_data']['bbp_anonymous_email'] ) ) ) {
    689689        $clauses = get_meta_sql( array( array(
    690690            'key'   => '_bbp_anonymous_email',
     
    706706    // Prepare duplicate check query
    707707    $query  = $bbp_db->prepare( "SELECT ID FROM {$bbp_db->posts} {$join} WHERE post_type = %s AND post_status != %s AND post_author = %d AND post_content = %s {$where}", $r['post_type'], $r['post_status'], $r['post_author'], $r['post_content'] );
    708     $query .= !empty( $r['post_parent'] ) ? $bbp_db->prepare( " AND post_parent = %d", $r['post_parent'] ) : '';
     708    $query .= ! empty( $r['post_parent'] ) ? $bbp_db->prepare( " AND post_parent = %d", $r['post_parent'] ) : '';
    709709    $query .= " LIMIT 1";
    710710    $dupe   = apply_filters( 'bbp_check_for_duplicate_query', $query, $r );
     
    749749
    750750    // User is anonymous, so check a transient based on the IP
    751     if ( !empty( $anonymous_data ) && is_array( $anonymous_data ) ) {
     751    if ( ! empty( $anonymous_data ) && is_array( $anonymous_data ) ) {
    752752        $last_posted = get_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted' );
    753753
    754         if ( !empty( $last_posted ) && time() < $last_posted + $throttle_time ) {
     754        if ( ! empty( $last_posted ) && time() < $last_posted + $throttle_time ) {
    755755            return false;
    756756        }
    757757
    758758    // User is logged in, so check their last posted time
    759     } elseif ( !empty( $author_id ) ) {
     759    } elseif ( ! empty( $author_id ) ) {
    760760        $author_id   = (int) $author_id;
    761761        $last_posted = bbp_get_user_last_posted( $author_id );
     
    816816
    817817        // If data exists, map it
    818         if ( !empty( $user ) ) {
     818        if ( ! empty( $user ) ) {
    819819            $_post['author'] = $user->display_name;
    820820            $_post['email']  = $user->user_email;
     
    916916
    917917    // Bail if keymaster is author
    918     if ( !empty( $author_id ) && bbp_is_user_keymaster( $author_id ) ) {
     918    if ( ! empty( $author_id ) && bbp_is_user_keymaster( $author_id ) ) {
    919919        return true;
    920920    }
     
    936936
    937937    // Map anonymous user data
    938     if ( !empty( $anonymous_data ) ) {
     938    if ( ! empty( $anonymous_data ) ) {
    939939        $_post['author'] = $anonymous_data['bbp_anonymous_name'];
    940940        $_post['email']  = $anonymous_data['bbp_anonymous_email'];
     
    942942
    943943    // Map current user data
    944     } elseif ( !empty( $author_id ) ) {
     944    } elseif ( ! empty( $author_id ) ) {
    945945
    946946        // Get author data
     
    948948
    949949        // If data exists, map it
    950         if ( !empty( $user ) ) {
     950        if ( ! empty( $user ) ) {
    951951            $_post['author'] = $user->display_name;
    952952            $_post['email']  = $user->user_email;
     
    10741074
    10751075    // Bail if subscriptions are turned off
    1076     if ( !bbp_is_subscriptions_active() ) {
     1076    if ( ! bbp_is_subscriptions_active() ) {
    10771077        return false;
    10781078    }
     
    10871087
    10881088    // Bail if topic is not published
    1089     if ( !bbp_is_topic_published( $topic_id ) ) {
     1089    if ( ! bbp_is_topic_published( $topic_id ) ) {
    10901090        return false;
    10911091    }
     
    10941094
    10951095    // Bail if reply is not published
    1096     if ( !bbp_is_reply_published( $reply_id ) ) {
     1096    if ( ! bbp_is_reply_published( $reply_id ) ) {
    10971097        return false;
    10981098    }
     
    11671167
    11681168        // Don't send notifications to the person who made the post
    1169         if ( !empty( $reply_author ) && (int) $user_id === (int) $reply_author ) {
     1169        if ( ! empty( $reply_author ) && (int) $user_id === (int) $reply_author ) {
    11701170            continue;
    11711171        }
     
    12321232
    12331233    // Bail if subscriptions are turned off
    1234     if ( !bbp_is_subscriptions_active() ) {
     1234    if ( ! bbp_is_subscriptions_active() ) {
    12351235        return false;
    12361236    }
     
    13241324
    13251325        // Don't send notifications to the person who made the post
    1326         if ( !empty( $topic_author ) && (int) $user_id === (int) $topic_author ) {
     1326        if ( ! empty( $topic_author ) && (int) $user_id === (int) $topic_author ) {
    13271327            continue;
    13281328        }
     
    13851385
    13861386        // Rejig the $redirect_to
    1387         if ( !isset( $_SERVER['REDIRECT_URL'] ) || ( $redirect_to !== home_url( $_SERVER['REDIRECT_URL'] ) ) ) {
     1387        if ( ! isset( $_SERVER['REDIRECT_URL'] ) || ( $redirect_to !== home_url( $_SERVER['REDIRECT_URL'] ) ) ) {
    13881388            $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '';
    13891389        }
     
    14291429
    14301430    // Passively filter the args before the parse
    1431     if ( !empty( $filter_key ) ) {
     1431    if ( ! empty( $filter_key ) ) {
    14321432        $r = apply_filters( 'bbp_before_' . $filter_key . '_parse_args', $r );
    14331433    }
    14341434
    14351435    // Parse
    1436     if ( is_array( $defaults ) && !empty( $defaults ) ) {
     1436    if ( is_array( $defaults ) && ! empty( $defaults ) ) {
    14371437        $r = array_merge( $defaults, $r );
    14381438    }
    14391439
    14401440    // Aggressively filter the args after the parse
    1441     if ( !empty( $filter_key ) ) {
     1441    if ( ! empty( $filter_key ) ) {
    14421442        $r = apply_filters( 'bbp_after_' . $filter_key . '_parse_args', $r );
    14431443    }
     
    18841884
    18851885                        // Single forum
    1886                         if ( !empty( $select_query_vars ) ) {
     1886                        if ( ! empty( $select_query_vars ) ) {
    18871887
    18881888                            // Load up our own query
     
    19021902
    19031903                        // Only forum replies
    1904                         if ( !empty( $_GET['type'] ) && ( bbp_get_reply_post_type() === $_GET['type'] ) ) {
     1904                        if ( ! empty( $_GET['type'] ) && ( bbp_get_reply_post_type() === $_GET['type'] ) ) {
    19051905
    19061906                            // The query
     
    19201920
    19211921                        // Only forum topics
    1922                         } elseif ( !empty( $_GET['type'] ) && ( bbp_get_topic_post_type() === $_GET['type'] ) ) {
     1922                        } elseif ( ! empty( $_GET['type'] ) && ( bbp_get_topic_post_type() === $_GET['type'] ) ) {
    19231923
    19241924                            // The query
     
    19661966
    19671967                        // Single topic
    1968                         if ( !empty( $select_query_vars ) ) {
     1968                        if ( ! empty( $select_query_vars ) ) {
    19691969
    19701970                            // Load up our own query
     
    20212021
    20222022            // We have a view to display a feed
    2023             if ( !empty( $view ) ) {
     2023            if ( ! empty( $view ) ) {
    20242024
    20252025                // Get the view query
     
    20572057
    20582058    // Path is not empty
    2059     if ( !empty( $path ) ) {
     2059    if ( ! empty( $path ) ) {
    20602060
    20612061        // Pretty permalinks are on so path might exist
  • trunk/src/includes/common/shortcodes.php

    r5466 r5829  
    224224
    225225        // Sanity check required info
    226         if ( !empty( $content ) || ( empty( $attr['id'] ) || !is_numeric( $attr['id'] ) ) ) {
     226        if ( ! empty( $content ) || ( empty( $attr['id'] ) || !is_numeric( $attr['id'] ) ) ) {
    227227            return $content;
    228228        }
     
    232232
    233233        // Bail if ID passed is not a forum
    234         if ( !bbp_is_forum( $forum_id ) ) {
     234        if ( ! bbp_is_forum( $forum_id ) ) {
    235235            return $content;
    236236        }
     
    320320
    321321        // Sanity check required info
    322         if ( !empty( $content ) || ( empty( $attr['id'] ) || !is_numeric( $attr['id'] ) ) ) {
     322        if ( ! empty( $content ) || ( empty( $attr['id'] ) || !is_numeric( $attr['id'] ) ) ) {
    323323            return $content;
    324324        }
     
    332332
    333333        // Bail if ID passed is not a topic
    334         if ( !bbp_is_topic( $topic_id ) ) {
     334        if ( ! bbp_is_topic( $topic_id ) ) {
    335335            return $content;
    336336        }
    337337
    338338        // Reset the queries if not in theme compat
    339         if ( !bbp_is_theme_compat_active() ) {
     339        if ( ! bbp_is_theme_compat_active() ) {
    340340
    341341            $bbp = bbpress();
     
    386386
    387387        // Sanity check supplied info
    388         if ( !empty( $content ) || ( !empty( $attr['forum_id'] ) && ( !is_numeric( $attr['forum_id'] ) || !bbp_is_forum( $attr['forum_id'] ) ) ) ) {
     388        if ( ! empty( $content ) || ( ! empty( $attr['forum_id'] ) && ( !is_numeric( $attr['forum_id'] ) || ! bbp_is_forum( $attr['forum_id'] ) ) ) ) {
    389389            return $content;
    390390        }
     
    394394
    395395        // If forum id is set, use the 'bbp_single_forum' query name
    396         if ( !empty( $attr['forum_id'] ) ) {
     396        if ( ! empty( $attr['forum_id'] ) ) {
    397397
    398398            // Set the global current_forum_id for future requests
     
    441441
    442442        // Sanity check required info
    443         if ( !empty( $content ) || ( empty( $attr['id'] ) || !is_numeric( $attr['id'] ) ) ) {
     443        if ( ! empty( $content ) || ( empty( $attr['id'] ) || !is_numeric( $attr['id'] ) ) ) {
    444444            return $content;
    445445        }
     
    453453
    454454        // Bail if ID passed is not a reply
    455         if ( !bbp_is_reply( $reply_id ) ) {
     455        if ( ! bbp_is_reply( $reply_id ) ) {
    456456            return $content;
    457457        }
    458458
    459459        // Reset the queries if not in theme compat
    460         if ( !bbp_is_theme_compat_active() ) {
     460        if ( ! bbp_is_theme_compat_active() ) {
    461461
    462462            $bbp = bbpress();
     
    553553
    554554        // Sanity check required info
    555         if ( !empty( $content ) || ( empty( $attr['id'] ) || !is_numeric( $attr['id'] ) ) ) {
     555        if ( ! empty( $content ) || ( empty( $attr['id'] ) || !is_numeric( $attr['id'] ) ) ) {
    556556            return $content;
    557557        }
     
    688688
    689689        // Sanity check required info
    690         if ( !empty( $content ) ) {
     690        if ( ! empty( $content ) ) {
    691691            return $content;
    692692        }
  • 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    }
  • trunk/src/includes/common/widgets.php

    r5793 r5829  
    7979        echo $args['before_widget'];
    8080
    81         if ( !empty( $settings['title'] ) ) {
     81        if ( ! empty( $settings['title'] ) ) {
    8282            echo $args['before_title'] . $settings['title'] . $args['after_title'];
    8383        }
     
    114114                    </div>
    115115
    116                     <?php if ( !empty( $settings['register'] ) || !empty( $settings['lostpass'] ) ) : ?>
     116                    <?php if ( ! empty( $settings['register'] ) || ! empty( $settings['lostpass'] ) ) : ?>
    117117
    118118                        <div class="bbp-login-links">
    119119
    120                             <?php if ( !empty( $settings['register'] ) ) : ?>
     120                            <?php if ( ! empty( $settings['register'] ) ) : ?>
    121121
    122122                                <a href="<?php echo esc_url( $settings['register'] ); ?>" title="<?php esc_attr_e( 'Register', 'bbpress' ); ?>" class="bbp-register-link"><?php _e( 'Register', 'bbpress' ); ?></a>
     
    124124                            <?php endif; ?>
    125125
    126                             <?php if ( !empty( $settings['lostpass'] ) ) : ?>
     126                            <?php if ( ! empty( $settings['lostpass'] ) ) : ?>
    127127
    128128                                <a href="<?php echo esc_url( $settings['lostpass'] ); ?>" title="<?php esc_attr_e( 'Lost Password', 'bbpress' ); ?>" class="bbp-lostpass-link"><?php _e( 'Lost Password', 'bbpress' ); ?></a>
     
    288288        echo $args['before_widget'];
    289289
    290         if ( !empty( $settings['title'] ) ) {
     290        if ( ! empty( $settings['title'] ) ) {
    291291            echo $args['before_title'] . $settings['title'] . $args['after_title'];
    292292        } ?>
     
    425425        echo $args['before_widget'];
    426426
    427         if ( !empty( $settings['title'] ) ) {
     427        if ( ! empty( $settings['title'] ) ) {
    428428            echo $args['before_title'] . $settings['title'] . $args['after_title'];
    429429        }
     
    577577        echo $args['before_widget'];
    578578
    579         if ( !empty( $settings['title'] ) ) {
     579        if ( ! empty( $settings['title'] ) ) {
    580580            echo $args['before_title'] . $settings['title'] . $args['after_title'];
    581581        } ?>
     
    611611
    612612        // Force to any
    613         if ( !empty( $instance['parent_forum'] ) && !is_numeric( $instance['parent_forum'] ) ) {
     613        if ( ! empty( $instance['parent_forum'] ) && !is_numeric( $instance['parent_forum'] ) ) {
    614614            $instance['parent_forum'] = 'any';
    615615        }
     
    794794        echo $args['before_widget'];
    795795
    796         if ( !empty( $settings['title'] ) ) {
     796        if ( ! empty( $settings['title'] ) ) {
    797797            echo $args['before_title'] . $settings['title'] . $args['after_title'];
    798798        } ?>
     
    856856
    857857        // Force to any
    858         if ( !empty( $instance['parent_forum'] ) && !is_numeric( $instance['parent_forum'] ) ) {
     858        if ( ! empty( $instance['parent_forum'] ) && !is_numeric( $instance['parent_forum'] ) ) {
    859859            $instance['parent_forum'] = 'any';
    860860        }
     
    990990        echo $args['before_widget'];
    991991
    992         if ( !empty( $settings['title'] ) ) {
     992        if ( ! empty( $settings['title'] ) ) {
    993993            echo $args['before_title'] . $settings['title'] . $args['after_title'];
    994994        }
     
    11401140        echo $args['before_widget'];
    11411141
    1142         if ( !empty( $settings['title'] ) ) {
     1142        if ( ! empty( $settings['title'] ) ) {
    11431143            echo $args['before_title'] . $settings['title'] . $args['after_title'];
    11441144        } ?>
     
    11641164
    11651165                    // Reply author, link, and timestamp
    1166                     if ( ! empty( $settings['show_date'] ) && !empty( $author_link ) ) :
     1166                    if ( ! empty( $settings['show_date'] ) && ! empty( $author_link ) ) :
    11671167
    11681168                        // translators: 1: reply author, 2: reply link, 3: reply timestamp
     
    11761176
    11771177                    // Reply author and title
    1178                     elseif ( !empty( $author_link ) ) :
     1178                    elseif ( ! empty( $author_link ) ) :
    11791179
    11801180                        // translators: 1: reply author, 2: reply link
  • trunk/src/includes/core/extend.php

    r5770 r5829  
    2929
    3030    // Bail if Akismet is turned off
    31     if ( !bbp_is_akismet_active() ) {
     31    if ( ! bbp_is_akismet_active() ) {
    3232        return;
    3333    }
  • trunk/src/includes/core/functions.php

    r5823 r5829  
    196196
    197197    // Set show_stickies to false if it wasn't supplied
    198     if ( !isset( $query_args['show_stickies'] ) ) {
     198    if ( ! isset( $query_args['show_stickies'] ) ) {
    199199        $query_args['show_stickies'] = false;
    200200    }
     
    222222    $view = sanitize_title( $view );
    223223
    224     if ( !isset( $bbp->views[ $view ] ) ) {
     224    if ( ! isset( $bbp->views[ $view ] ) ) {
    225225        return false;
    226226    }
     
    253253    $query_args = bbp_get_view_query_args( $view );
    254254
    255     if ( !empty( $new_args ) ) {
     255    if ( ! empty( $new_args ) ) {
    256256        $new_args   = bbp_parse_args( $new_args, '', 'view_query' );
    257257        $query_args = array_merge( $query_args, $new_args );
     
    272272function bbp_get_view_query_args( $view ) {
    273273    $view   = bbp_get_view_id( $view );
    274     $retval = !empty( $view ) ? bbpress()->views[$view]['query'] : false;
     274    $retval = ! empty( $view ) ? bbpress()->views[$view]['query'] : false;
    275275
    276276    return apply_filters( 'bbp_get_view_query_args', $retval, $view );
  • trunk/src/includes/core/template-functions.php

    r5813 r5829  
    103103
    104104    // Maybe load the template if one was located
    105     if ( ( defined( 'WP_USE_THEMES' ) && WP_USE_THEMES ) && ( true === $load ) && !empty( $located ) ) {
     105    if ( ( defined( 'WP_USE_THEMES' ) && WP_USE_THEMES ) && ( true === $load ) && ! empty( $located ) ) {
    106106        load_template( $located, $require_once );
    107107    }
     
    158158
    159159    // Enqueue if located
    160     if ( !empty( $located ) ) {
     160    if ( ! empty( $located ) ) {
    161161
    162162        $content_dir = constant( 'WP_CONTENT_DIR' );
     
    226226
    227227    // Enqueue if located
    228     if ( !empty( $located ) ) {
     228    if ( ! empty( $located ) ) {
    229229
    230230        $content_dir = constant( 'WP_CONTENT_DIR' );
     
    504504
    505505    // It is a user page - We'll also check if it is user edit
    506     if ( !empty( $bbp_user ) ) {
     506    if ( ! empty( $bbp_user ) ) {
    507507
    508508        /** Find User *********************************************************/
     
    534534
    535535        // View or edit?
    536         if ( !empty( $is_edit ) ) {
     536        if ( ! empty( $is_edit ) ) {
    537537
    538538            // We are editing a profile
     
    602602
    603603    // View Page
    604     } elseif ( !empty( $bbp_view ) ) {
     604    } elseif ( ! empty( $bbp_view ) ) {
    605605
    606606        // Check if the view exists by checking if there are query args are set
     
    624624        // Check if there are search query args set
    625625        $search_terms = bbp_get_search_terms();
    626         if ( !empty( $search_terms ) ) {
     626        if ( ! empty( $search_terms ) ) {
    627627            $posts_query->bbp_search_terms = $search_terms;
    628628        }
     
    635635
    636636    // Forum/Topic/Reply Edit Page
    637     } elseif ( !empty( $is_edit ) ) {
     637    } elseif ( ! empty( $is_edit ) ) {
    638638
    639639        // Get the post type from the main query loop
     
    641641
    642642        // Check which post_type we are editing, if any
    643         if ( !empty( $post_type ) ) {
     643        if ( ! empty( $post_type ) ) {
    644644            switch( $post_type ) {
    645645
  • trunk/src/includes/core/template-loader.php

    r5770 r5829  
    111111    // A bbPress template file was located, so override the WordPress template
    112112    // and use it to switch off bbPress's theme compatibility.
    113     if ( !empty( $new_template ) ) {
     113    if ( ! empty( $new_template ) ) {
    114114        $template = bbp_set_template_included( $new_template );
    115115    }
     
    160160    }
    161161
    162     if ( ! defined( 'WP_INSTALLING' ) || ( !empty( $pagenow ) && ( 'wp-activate.php' !== $pagenow ) ) ) {
     162    if ( ! defined( 'WP_INSTALLING' ) || ( ! empty( $pagenow ) && ( 'wp-activate.php' !== $pagenow ) ) ) {
    163163        bbp_locate_template( 'bbpress-functions.php', true );
    164164    }
  • trunk/src/includes/core/theme-compat.php

    r5827 r5829  
    536536        // Reset post
    537537        bbp_theme_compat_reset_post( array(
    538             'ID'             => !empty( $page->ID ) ? $page->ID : 0,
     538            'ID'             => ! empty( $page->ID ) ? $page->ID : 0,
    539539            'post_title'     => $new_title,
    540540            'post_author'    => 0,
     
    606606        // Reset post
    607607        bbp_theme_compat_reset_post( array(
    608             'ID'             => !empty( $page->ID ) ? $page->ID : 0,
     608            'ID'             => ! empty( $page->ID ) ? $page->ID : 0,
    609609            'post_title'     => bbp_get_topic_archive_title(),
    610610            'post_author'    => 0,
     
    877877
    878878        // Filters exist in this priority
    879         if ( !empty( $priority ) && isset( $wp_filter[$tag][$priority] ) ) {
     879        if ( ! empty( $priority ) && isset( $wp_filter[$tag][$priority] ) ) {
    880880
    881881            // Store filters in a backup
     
    929929
    930930        // Filters exist in this priority
    931         if ( !empty( $priority ) && isset( $bbp->filters->wp_filter[$tag][$priority] ) ) {
     931        if ( ! empty( $priority ) && isset( $bbp->filters->wp_filter[$tag][$priority] ) ) {
    932932
    933933            // Store filters in a backup
  • trunk/src/includes/core/update.php

    r5775 r5829  
    6868
    6969    // Bail if not activating
    70     if ( empty( $action ) || !in_array( $action, array( 'activate', 'activate-selected' ) ) ) {
     70    if ( empty( $action ) || ! in_array( $action, array( 'activate', 'activate-selected' ) ) ) {
    7171        return false;
    7272    }
     
    8080
    8181    // Set basename if empty
    82     if ( empty( $basename ) && !empty( $bbp->basename ) ) {
     82    if ( empty( $basename ) && ! empty( $bbp->basename ) ) {
    8383        $basename = $bbp->basename;
    8484    }
     
    117117
    118118    // Bail if not deactivating
    119     if ( empty( $action ) || !in_array( $action, array( 'deactivate', 'deactivate-selected' ) ) ) {
     119    if ( empty( $action ) || ! in_array( $action, array( 'deactivate', 'deactivate-selected' ) ) ) {
    120120        return false;
    121121    }
     
    129129
    130130    // Set basename if empty
    131     if ( empty( $basename ) && !empty( $bbp->basename ) ) {
     131    if ( empty( $basename ) && ! empty( $bbp->basename ) ) {
    132132        $basename = $bbp->basename;
    133133    }
  • trunk/src/includes/extend/akismet.php

    r5828 r5829  
    397397
    398398            // Key should not be ignored
    399             if ( !in_array( $key, $ignore ) && is_string( $value ) ) {
     399            if ( ! in_array( $key, $ignore ) && is_string( $value ) ) {
    400400                $post_data[$key] = $value;
    401401
     
    422422
    423423        // Check the high-speed cam
    424         if ( !empty( $response[1] ) ) {
     424        if ( ! empty( $response[1] ) ) {
    425425            $post_data['bbp_akismet_result'] = $response[1];
    426426        } else {
     
    462462
    463463        // Set up Akismet last post data
    464         if ( !empty( $this->last_post ) ) {
     464        if ( ! empty( $this->last_post ) ) {
    465465            $as_submitted = $this->last_post['bbp_post_as_submitted'];
    466466        }
     
    468468        // wp_insert_post() might be called in other contexts. Ensure this is
    469469        // the same topic/reply as was checked by BBP_Akismet::check_post()
    470         if ( is_object( $_post ) && !empty( $this->last_post ) && is_array( $as_submitted ) ) {
     470        if ( is_object( $_post ) && ! empty( $this->last_post ) && is_array( $as_submitted ) ) {
    471471
    472472            // Get user data
     
    612612
    613613        // Save the terms for later in case the reply gets hammed
    614         if ( !empty( $terms ) ) {
     614        if ( ! empty( $terms ) ) {
    615615            update_post_meta( $reply_id, '_bbp_akismet_spam_terms', $terms );
    616616        }
     
    649649
    650650        // Use specific IP (if provided)
    651         if ( !empty( $ip ) && long2ip( ip2long( $ip ) ) ) {
     651        if ( ! empty( $ip ) && long2ip( ip2long( $ip ) ) ) {
    652652            $http_host = $ip;
    653653        }
     
    758758        <div class="akismet-history" style="margin: 13px 0;">
    759759
    760             <?php if ( !empty( $history ) ) : ?>
     760            <?php if ( ! empty( $history ) ) : ?>
    761761
    762762                <table>
  • trunk/src/includes/extend/buddypress/activity.php

    r5770 r5829  
    386386
    387387        // Bail early if topic is by anonymous user
    388         if ( !empty( $anonymous_data ) ) {
     388        if ( ! empty( $anonymous_data ) ) {
    389389            return;
    390390        }
    391391
    392392        // Bail if site is private
    393         if ( !bbp_is_site_public() ) {
     393        if ( ! bbp_is_site_public() ) {
    394394            return;
    395395        }
     
    406406
    407407        // Bail if topic is not published
    408         if ( !bbp_is_topic_published( $topic_id ) ) {
     408        if ( ! bbp_is_topic_published( $topic_id ) ) {
    409409            return;
    410410        }
     
    444444
    445445        // Add the activity entry ID as a meta value to the topic
    446         if ( !empty( $activity_id ) ) {
     446        if ( ! empty( $activity_id ) ) {
    447447            update_post_meta( $topic_id, '_bbp_activity_id', $activity_id );
    448448        }
     
    459459        // Get activity ID, bail if it doesn't exist
    460460        $activity_id = $this->get_activity_id( $topic_id );
    461         if ( !empty( $activity_id ) ) {
     461        if ( ! empty( $activity_id ) ) {
    462462            return bp_activity_delete( array( 'id' => $activity_id ) );
    463463        }
     
    535535
    536536        // Do not log activity of anonymous users
    537         if ( !empty( $anonymous_data ) ) {
     537        if ( ! empty( $anonymous_data ) ) {
    538538            return;
    539539        }
    540540
    541541        // Bail if site is private
    542         if ( !bbp_is_site_public() ) {
     542        if ( ! bbp_is_site_public() ) {
    543543            return;
    544544        }
     
    556556
    557557        // Bail if reply is not published
    558         if ( !bbp_is_reply_published( $reply_id ) ) {
     558        if ( ! bbp_is_reply_published( $reply_id ) ) {
    559559            return;
    560560        }
     
    597597
    598598        // Add the activity entry ID as a meta value to the reply
    599         if ( !empty( $activity_id ) ) {
     599        if ( ! empty( $activity_id ) ) {
    600600            update_post_meta( $reply_id, '_bbp_activity_id', $activity_id );
    601601        }
     
    613613        // Get activity ID, bail if it doesn't exist
    614614        $activity_id = $this->get_activity_id( $reply_id );
    615         if ( !empty( $activity_id ) ) {
     615        if ( ! empty( $activity_id ) ) {
    616616            return bp_activity_delete( array( 'id' => $activity_id ) );
    617617        }
  • trunk/src/includes/extend/buddypress/functions.php

    r5770 r5829  
    2525
    2626    // Use existing ID
    27     if ( !empty( bbpress()->extend->buddypress->id ) ) {
     27    if ( ! empty( bbpress()->extend->buddypress->id ) ) {
    2828        $retval = bbpress()->extend->buddypress->id;
    2929
     
    5757
    5858    // Easy empty checking
    59     if ( !empty( $user_id ) && is_numeric( $user_id ) ) {
     59    if ( ! empty( $user_id ) && is_numeric( $user_id ) ) {
    6060        $bbp_user_id = $user_id;
    6161    }
    6262
    6363    // Currently viewing or editing a user
    64     elseif ( ( true === $displayed_user_fallback ) && !empty( $did ) ) {
     64    elseif ( ( true === $displayed_user_fallback ) && ! empty( $did ) ) {
    6565        $bbp_user_id = $did;
    6666    }
    6767
    6868    // Maybe fallback on the current_user ID
    69     elseif ( ( true === $current_user_fallback ) && !empty( $lid ) ) {
     69    elseif ( ( true === $current_user_fallback ) && ! empty( $lid ) ) {
    7070        $bbp_user_id = $lid;
    7171    }
     
    8484 */
    8585function bbp_filter_is_single_user( $is = false ) {
    86     if ( !empty( $is ) ) {
     86    if ( ! empty( $is ) ) {
    8787        return $is;
    8888    }
     
    101101 */
    102102function bbp_filter_is_user_home( $is = false ) {
    103     if ( !empty( $is ) ) {
     103    if ( ! empty( $is ) ) {
    104104        return $is;
    105105    }
     
    303303
    304304    // Get the forums
    305     if ( !empty( $group_id ) ) {
     305    if ( ! empty( $group_id ) ) {
    306306        $forum_ids = groups_get_groupmeta( $group_id, 'forum_id' );
    307307    }
     
    335335
    336336    // Get the forums
    337     if ( !empty( $forum_id ) ) {
     337    if ( ! empty( $forum_id ) ) {
    338338        $group_ids = get_post_meta( $forum_id, '_bbp_group_ids', true );
    339339    }
     
    406406
    407407    // Maybe update the groups forums
    408     if ( !in_array( $group_id, $group_ids ) ) {
     408    if ( ! in_array( $group_id, $group_ids ) ) {
    409409        $group_ids[] = $group_id;
    410410        return bbp_update_forum_group_ids( $forum_id, $group_ids );
     
    432432
    433433    // Maybe update the groups forums
    434     if ( !in_array( $forum_id, $forum_ids ) ) {
     434    if ( ! in_array( $forum_id, $forum_ids ) ) {
    435435        $forum_ids[] = $forum_id;
    436436        return bbp_update_group_forum_ids( $group_id, $forum_ids );
     
    550550
    551551    // Check if the forum has groups
    552     $retval    = (bool) !empty( $group_ids );
     552    $retval    = (bool) ! empty( $group_ids );
    553553
    554554    return (bool) apply_filters( 'bbp_is_forum_group_forum', $retval, $forum_id, $group_ids );
  • trunk/src/includes/extend/buddypress/groups.php

    r5822 r5829  
    268268
    269269        // Get the first forum ID
    270         if ( !empty( $forum_ids ) ) {
     270        if ( ! empty( $forum_ids ) ) {
    271271            $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;
    272272        }
     
    345345        }
    346346
    347         $edit_forum = !empty( $_POST['bbp-edit-group-forum'] ) ? true : false;
     347        $edit_forum = ! empty( $_POST['bbp-edit-group-forum'] ) ? true : false;
    348348        $forum_id   = 0;
    349         $group_id   = !empty( $group_id ) ? $group_id : bp_get_current_group_id();
     349        $group_id   = ! empty( $group_id ) ? $group_id : bp_get_current_group_id();
    350350
    351351        // Keymasters have the ability to reconfigure forums
     
    359359
    360360        // Normalize group forum relationships now
    361         if ( !empty( $forum_ids ) ) {
     361        if ( ! empty( $forum_ids ) ) {
    362362
    363363            // Loop through forums, and make sure they exist
     
    414414
    415415            // If in admin, also include the group ID
    416             if ( is_admin() && !empty( $group_id ) ) {
     416            if ( is_admin() && ! empty( $group_id ) ) {
    417417                $new_forum_args['group_id'] = $group_id;
    418418            }
     
    510510        }
    511511
    512         $create_forum = !empty( $_POST['bbp-create-group-forum'] ) ? true : false;
     512        $create_forum = ! empty( $_POST['bbp-create-group-forum'] ) ? true : false;
    513513        $forum_id     = 0;
    514514        $forum_ids    = bbp_get_group_forum_ids( $group_id );
    515515
    516         if ( !empty( $forum_ids ) ) {
     516        if ( ! empty( $forum_ids ) ) {
    517517            $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;
    518518        }
     
    523523
    524524                // Bail if initial content was already created
    525                 if ( !empty( $forum_id ) ) {
     525                if ( ! empty( $forum_id ) ) {
    526526                    return;
    527527                }
     
    562562
    563563                // Forum was created but is now being undone
    564                 if ( !empty( $forum_id ) ) {
     564                if ( ! empty( $forum_id ) ) {
    565565
    566566                    // Delete the forum
     
    618618        // Validate forum_id
    619619        $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
    620         $group_id = !empty( $forum_args['group_id'] ) ? $forum_args['group_id'] : bp_get_current_group_id();
     620        $group_id = ! empty( $forum_args['group_id'] ) ? $forum_args['group_id'] : bp_get_current_group_id();
    621621
    622622        bbp_add_forum_id_to_group( $group_id, $forum_id );
     
    645645        // Validate forum_id
    646646        $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
    647         $group_id = !empty( $forum_args['group_id'] ) ? $forum_args['group_id'] : bp_get_current_group_id();
     647        $group_id = ! empty( $forum_args['group_id'] ) ? $forum_args['group_id'] : bp_get_current_group_id();
    648648
    649649        bbp_remove_forum_id_from_group( $group_id, $forum_id );
     
    843843
    844844                        // Merge
    845                         if ( !empty( $_GET['action'] ) && 'merge' === $_GET['action'] ) :
     845                        if ( ! empty( $_GET['action'] ) && 'merge' === $_GET['action'] ) :
    846846                            bbp_set_query_name( 'bbp_topic_merge' );
    847847                            bbp_get_template_part( 'form', 'topic-merge' );
    848848
    849849                        // Split
    850                         elseif ( !empty( $_GET['action'] ) && 'split' === $_GET['action'] ) :
     850                        elseif ( ! empty( $_GET['action'] ) && 'split' === $_GET['action'] ) :
    851851                            bbp_set_query_name( 'bbp_topic_split' );
    852852                            bbp_get_template_part( 'form', 'topic-split' );
     
    899899
    900900                        // Move
    901                         if ( !empty( $_GET['action'] ) && ( 'move' === $_GET['action'] ) ) :
     901                        if ( ! empty( $_GET['action'] ) && ( 'move' === $_GET['action'] ) ) :
    902902                            bbp_set_query_name( 'bbp_reply_move' );
    903903                            bbp_get_template_part( 'form', 'reply-move' );
  • trunk/src/includes/extend/buddypress/notifications.php

    r5658 r5829  
    5656        $filter = 'bbp_multiple_new_subscription_notification';
    5757    } else {
    58         if ( !empty( $secondary_item_id ) ) {
     58        if ( ! empty( $secondary_item_id ) ) {
    5959            $text = sprintf( __( 'You have %d new reply to %2$s from %3$s', 'bbpress' ), (int) $total_items, $topic_title, bp_core_get_user_displayname( $secondary_item_id ) );
    6060        } else {
     
    9999
    100100    // Bail if somehow this is hooked to an edit action
    101     if ( !empty( $is_edit ) ) {
     101    if ( ! empty( $is_edit ) ) {
    102102        return;
    103103    }
     
    108108
    109109    // Hierarchical replies
    110     if ( !empty( $reply_to ) ) {
     110    if ( ! empty( $reply_to ) ) {
    111111        $reply_to_item_id = bbp_get_topic_author_id( $reply_to );
    112112    }
     
    129129 
    130130    // Notify the immediate reply author if not the current reply author
    131     if ( !empty( $reply_to ) && ( $author_id !== $reply_to_item_id ) ) {
     131    if ( ! empty( $reply_to ) && ( $author_id !== $reply_to_item_id ) ) {
    132132        $args['secondary_item_id'] = $reply_to_item_id ;
    133133
  • trunk/src/includes/forums/capabilities.php

    r5770 r5829  
    7272                // Get the post
    7373                $_post = get_post( $args[0] );
    74                 if ( !empty( $_post ) ) {
     74                if ( ! empty( $_post ) ) {
    7575
    7676                    // Get caps for post type object
     
    127127            // Get the post
    128128            $_post = get_post( $args[0] );
    129             if ( !empty( $_post ) ) {
     129            if ( ! empty( $_post ) ) {
    130130
    131131                // Get caps for post type object
     
    156156            // Get the post
    157157            $_post = get_post( $args[0] );
    158             if ( !empty( $_post ) ) {
     158            if ( ! empty( $_post ) ) {
    159159
    160160                // Get caps for post type object
  • trunk/src/includes/forums/functions.php

    r5827 r5829  
    142142
    143143    // Remove kses filters from title and content for capable users and if the nonce is verified
    144     if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_forum'] ) && wp_create_nonce( 'bbp-unfiltered-html-forum_new' ) === $_POST['_bbp_unfiltered_html_forum'] ) {
     144    if ( current_user_can( 'unfiltered_html' ) && ! empty( $_POST['_bbp_unfiltered_html_forum'] ) && wp_create_nonce( 'bbp-unfiltered-html-forum_new' ) === $_POST['_bbp_unfiltered_html_forum'] ) {
    145145        remove_filter( 'bbp_new_forum_pre_title',   'wp_filter_kses'      );
    146146        remove_filter( 'bbp_new_forum_pre_content', 'bbp_encode_bad',  10 );
     
    150150    /** Forum Title ***********************************************************/
    151151
    152     if ( !empty( $_POST['bbp_forum_title'] ) ) {
     152    if ( ! empty( $_POST['bbp_forum_title'] ) ) {
    153153        $forum_title = sanitize_text_field( $_POST['bbp_forum_title'] );
    154154    }
     
    164164    /** Forum Content *********************************************************/
    165165
    166     if ( !empty( $_POST['bbp_forum_content'] ) ) {
     166    if ( ! empty( $_POST['bbp_forum_content'] ) ) {
    167167        $forum_content = $_POST['bbp_forum_content'];
    168168    }
     
    179179
    180180    // Forum parent was passed (the norm)
    181     if ( !empty( $_POST['bbp_forum_parent_id'] ) ) {
     181    if ( ! empty( $_POST['bbp_forum_parent_id'] ) ) {
    182182        $forum_parent_id = bbp_get_forum_id( $_POST['bbp_forum_parent_id'] );
    183183    }
     
    191191
    192192    // Forum exists
    193     } elseif ( !empty( $forum_parent_id ) ) {
     193    } elseif ( ! empty( $forum_parent_id ) ) {
    194194
    195195        // Forum is a category
     
    216216    /** Forum Flooding ********************************************************/
    217217
    218     if ( !bbp_check_for_flood( $anonymous_data, $forum_author ) ) {
     218    if ( ! bbp_check_for_flood( $anonymous_data, $forum_author ) ) {
    219219        bbp_add_error( 'bbp_forum_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
    220220    }
     
    222222    /** Forum Duplicate *******************************************************/
    223223
    224     if ( !bbp_check_for_duplicate( array( 'post_type' => bbp_get_forum_post_type(), 'post_author' => $forum_author, 'post_content' => $forum_content, 'anonymous_data' => $anonymous_data ) ) ) {
     224    if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_forum_post_type(), 'post_author' => $forum_author, 'post_content' => $forum_content, 'anonymous_data' => $anonymous_data ) ) ) {
    225225        bbp_add_error( 'bbp_forum_duplicate', __( '<strong>ERROR</strong>: This forum already exists.', 'bbpress' ) );
    226226    }
     
    228228    /** Forum Blacklist *******************************************************/
    229229
    230     if ( !bbp_check_for_blacklist( $anonymous_data, $forum_author, $forum_title, $forum_content ) ) {
     230    if ( ! bbp_check_for_blacklist( $anonymous_data, $forum_author, $forum_title, $forum_content ) ) {
    231231        bbp_add_error( 'bbp_forum_blacklist', __( '<strong>ERROR</strong>: Your forum cannot be created at this time.', 'bbpress' ) );
    232232    }
     
    235235
    236236    $post_status = bbp_get_public_status_id();
    237     if ( !bbp_check_for_moderation( $anonymous_data, $forum_author, $forum_title, $forum_content ) ) {
     237    if ( ! bbp_check_for_moderation( $anonymous_data, $forum_author, $forum_title, $forum_content ) ) {
    238238        $post_status = bbp_get_pending_status_id();
    239239    }
     
    267267    /** No Errors *************************************************************/
    268268
    269     if ( !empty( $forum_id ) && !is_wp_error( $forum_id ) ) {
     269    if ( ! empty( $forum_id ) && !is_wp_error( $forum_id ) ) {
    270270
    271271        /** Trash Check *******************************************************/
     
    318318
    319319        // Add view all?
    320         if ( bbp_get_view_all() || !empty( $view_all ) ) {
     320        if ( bbp_get_view_all() || ! empty( $view_all ) ) {
    321321
    322322            // User can moderate, so redirect to forum with view all set
     
    419419
    420420    // Remove kses filters from title and content for capable users and if the nonce is verified
    421     if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_forum'] ) && ( wp_create_nonce( 'bbp-unfiltered-html-forum_' . $forum_id ) === $_POST['_bbp_unfiltered_html_forum'] ) ) {
     421    if ( current_user_can( 'unfiltered_html' ) && ! empty( $_POST['_bbp_unfiltered_html_forum'] ) && ( wp_create_nonce( 'bbp-unfiltered-html-forum_' . $forum_id ) === $_POST['_bbp_unfiltered_html_forum'] ) ) {
    422422        remove_filter( 'bbp_edit_forum_pre_title',   'wp_filter_kses'      );
    423423        remove_filter( 'bbp_edit_forum_pre_content', 'bbp_encode_bad',  10 );
     
    428428
    429429    // Forum parent id was passed
    430     if ( !empty( $_POST['bbp_forum_parent_id'] ) ) {
     430    if ( ! empty( $_POST['bbp_forum_parent_id'] ) ) {
    431431        $forum_parent_id = bbp_get_forum_id( $_POST['bbp_forum_parent_id'] );
    432432    }
     
    436436
    437437    // Forum exists
    438     if ( !empty( $forum_parent_id ) && ( $forum_parent_id !== $current_parent_forum_id ) ) {
     438    if ( ! empty( $forum_parent_id ) && ( $forum_parent_id !== $current_parent_forum_id ) ) {
    439439
    440440        // Forum is closed and user cannot access
     
    456456    /** Forum Title ***********************************************************/
    457457
    458     if ( !empty( $_POST['bbp_forum_title'] ) ) {
     458    if ( ! empty( $_POST['bbp_forum_title'] ) ) {
    459459        $forum_title = sanitize_text_field( $_POST['bbp_forum_title'] );
    460460    }
     
    470470    /** Forum Content *********************************************************/
    471471
    472     if ( !empty( $_POST['bbp_forum_content'] ) ) {
     472    if ( ! empty( $_POST['bbp_forum_content'] ) ) {
    473473        $forum_content = $_POST['bbp_forum_content'];
    474474    }
     
    484484    /** Forum Blacklist *******************************************************/
    485485
    486     if ( !bbp_check_for_blacklist( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content ) ) {
     486    if ( ! bbp_check_for_blacklist( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content ) ) {
    487487        bbp_add_error( 'bbp_forum_blacklist', __( '<strong>ERROR</strong>: Your forum cannot be edited at this time.', 'bbpress' ) );
    488488    }
     
    491491
    492492    $post_status = bbp_get_public_status_id();
    493     if ( !bbp_check_for_moderation( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content ) ) {
     493    if ( ! bbp_check_for_moderation( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content ) ) {
    494494        $post_status = bbp_get_pending_status_id();
    495495    }
     
    524524     * @todo omitted for 2.1
    525525    // Revision Reason
    526     if ( !empty( $_POST['bbp_forum_edit_reason'] ) )
     526    if ( ! empty( $_POST['bbp_forum_edit_reason'] ) )
    527527        $forum_edit_reason = sanitize_text_field( $_POST['bbp_forum_edit_reason'] );
    528528
    529529    // Update revision log
    530     if ( !empty( $_POST['bbp_log_forum_edit'] ) && ( "1" === $_POST['bbp_log_forum_edit'] ) && ( $revision_id = wp_save_post_revision( $forum_id ) ) ) {
     530    if ( ! empty( $_POST['bbp_log_forum_edit'] ) && ( "1" === $_POST['bbp_log_forum_edit'] ) && ( $revision_id = wp_save_post_revision( $forum_id ) ) ) {
    531531        bbp_update_forum_revision_log( array(
    532532            'forum_id'    => $forum_id,
     
    540540    /** No Errors *************************************************************/
    541541
    542     if ( !empty( $forum_id ) && !is_wp_error( $forum_id ) ) {
     542    if ( ! empty( $forum_id ) && !is_wp_error( $forum_id ) ) {
    543543
    544544        // Update counts, etc...
     
    577577
    578578        // Add view all?
    579         if ( !empty( $view_all ) ) {
     579        if ( ! empty( $view_all ) ) {
    580580            $forum_url = bbp_add_view_all( $forum_url );
    581581        }
     
    653653    /** Forum Visibility **************************************************/
    654654
    655     if ( !empty( $_POST['bbp_forum_visibility'] ) && in_array( $_POST['bbp_forum_visibility'], array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id() ) ) ) {
     655    if ( ! empty( $_POST['bbp_forum_visibility'] ) && in_array( $_POST['bbp_forum_visibility'], array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id() ) ) ) {
    656656
    657657        // Get forums current visibility
     
    10251025
    10261026    // Users exist
    1027     if ( !empty( $users ) ) {
     1027    if ( ! empty( $users ) ) {
    10281028
    10291029        // Loop through users
     
    10771077
    10781078        // If has ancestors, loop through them...
    1079         if ( !empty( $ancestors ) ) {
     1079        if ( ! empty( $ancestors ) ) {
    10801080            foreach ( (array) $ancestors as $parent_forum_id ) {
    10811081
     
    11681168
    11691169        // If has ancestors, loop through them...
    1170         if ( !empty( $ancestors ) ) {
     1170        if ( ! empty( $ancestors ) ) {
    11711171            foreach ( (array) $ancestors as $parent_forum_id ) {
    11721172
     
    12171217        // Loop through children and add together forum reply counts
    12181218        $children = bbp_forum_query_subforum_ids( $forum_id );
    1219         if ( !empty( $children ) ) {
     1219        if ( ! empty( $children ) ) {
    12201220            foreach ( $children as $child ) {
    12211221                $children_last_topic = bbp_update_forum_last_topic_id( $child ); // Recursive
     
    12351235        // Get the most recent topic in this forum_id
    12361236        $recent_topic = get_posts( $post_vars );
    1237         if ( !empty( $recent_topic ) ) {
     1237        if ( ! empty( $recent_topic ) ) {
    12381238            $topic_id = $recent_topic[0]->ID;
    12391239        }
     
    12451245
    12461246    // If child forums have higher id, use that instead
    1247     if ( !empty( $children ) && ( $children_last_topic > $topic_id ) ) {
     1247    if ( ! empty( $children ) && ( $children_last_topic > $topic_id ) ) {
    12481248        $topic_id = $children_last_topic;
    12491249    }
     
    12871287        // Loop through children and get the most recent reply id
    12881288        $children = bbp_forum_query_subforum_ids( $forum_id );
    1289         if ( !empty( $children ) ) {
     1289        if ( ! empty( $children ) ) {
    12901290            foreach ( $children as $child ) {
    12911291                $children_last_reply = bbp_update_forum_last_reply_id( $child ); // Recursive
     
    12951295        // If this forum has topics...
    12961296        $topic_ids = bbp_forum_query_topic_ids( $forum_id );
    1297         if ( !empty( $topic_ids ) ) {
     1297        if ( ! empty( $topic_ids ) ) {
    12981298
    12991299            // ...get the most recent reply from those topics...
     
    13101310
    13111311    // If child forums have higher ID, check for newer reply id
    1312     if ( !empty( $children ) && ( $children_last_reply > $reply_id ) ) {
     1312    if ( ! empty( $children ) && ( $children_last_reply > $reply_id ) ) {
    13131313        $reply_id = $children_last_reply;
    13141314    }
     
    13531353        // Loop through children and add together forum reply counts
    13541354        $children = bbp_forum_query_subforum_ids( $forum_id );
    1355         if ( !empty( $children ) ) {
     1355        if ( ! empty( $children ) ) {
    13561356            foreach ( $children as $child ) {
    13571357                $children_last_active = bbp_update_forum_last_active_id( $child, $active_id );
     
    13611361        // Don't count replies if the forum is a category
    13621362        $topic_ids = bbp_forum_query_topic_ids( $forum_id );
    1363         if ( !empty( $topic_ids ) ) {
     1363        if ( ! empty( $topic_ids ) ) {
    13641364            $active_id = bbp_forum_query_last_reply_id( $forum_id, $topic_ids );
    13651365            $active_id = $active_id > max( $topic_ids ) ? $active_id : max( $topic_ids );
     
    13761376
    13771377    // If child forums have higher id, use that instead
    1378     if ( !empty( $children ) && ( $children_last_active > $active_id ) ) {
     1378    if ( ! empty( $children ) && ( $children_last_active > $active_id ) ) {
    13791379        $active_id = $children_last_active;
    13801380    }
     
    14121412
    14131413    // Update only if there is a time
    1414     if ( !empty( $new_time ) ) {
     1414    if ( ! empty( $new_time ) ) {
    14151415        update_post_meta( $forum_id, '_bbp_last_active_time', $new_time );
    14161416    }
     
    14671467    // Loop through subforums and add together forum topic counts
    14681468    $children = bbp_forum_query_subforum_ids( $forum_id );
    1469     if ( !empty( $children ) ) {
     1469    if ( ! empty( $children ) ) {
    14701470        foreach ( $children as $child ) {
    14711471            $children_topic_count += bbp_update_forum_topic_count( $child ); // Recursive
     
    15671567    // Loop through children and add together forum reply counts
    15681568    $children = bbp_forum_query_subforum_ids( $forum_id );
    1569     if ( !empty( $children ) ) {
     1569    if ( ! empty( $children ) ) {
    15701570        foreach ( (array) $children as $child ) {
    15711571            $children_reply_count += bbp_update_forum_reply_count( $child );
     
    16531653
    16541654    // Update the parent forum if one was passed
    1655     if ( !empty( $r['post_parent'] ) && is_numeric( $r['post_parent'] ) ) {
     1655    if ( ! empty( $r['post_parent'] ) && is_numeric( $r['post_parent'] ) ) {
    16561656        bbp_update_forum( array(
    16571657            'forum_id'    => $r['post_parent'],
     
    17921792
    17931793        // There are forums that need to be excluded
    1794         if ( !empty( $forum_ids ) ) {
     1794        if ( ! empty( $forum_ids ) ) {
    17951795
    17961796            switch ( $type ) {
     
    18841884        if ( ! current_user_can( 'read_private_forums' ) ) {
    18851885            $key = array_search( bbp_get_private_status_id(), $post_stati );
    1886             if ( !empty( $key ) ) {
     1886            if ( ! empty( $key ) ) {
    18871887                unset( $post_stati[$key] );
    18881888            }
     
    18981898        if ( ! current_user_can( 'read_hidden_forums' ) ) {
    18991899            $key = array_search( bbp_get_hidden_status_id(), $post_stati );
    1900             if ( !empty( $key ) ) {
     1900            if ( ! empty( $key ) ) {
    19011901                unset( $post_stati[$key] );
    19021902            }
     
    20122012        }
    20132013
    2014         if ( !empty( $topic_ids ) ) {
     2014        if ( ! empty( $topic_ids ) ) {
    20152015            $bbp_db    = bbp_db();
    20162016            $topic_ids = implode( ',', wp_parse_id_list( $topic_ids ) );
     
    20802080
    20812081    // If forum is explicitly hidden and user not capable, set 404
    2082     if ( !empty( $forum_id ) && bbp_is_forum_hidden( $forum_id ) && !current_user_can( 'read_hidden_forums' ) ) {
     2082    if ( ! empty( $forum_id ) && bbp_is_forum_hidden( $forum_id ) && !current_user_can( 'read_hidden_forums' ) ) {
    20832083        bbp_set_404();
    20842084    }
     
    21352135
    21362136    // If forum is explicitly hidden and user not capable, set 404
    2137     if ( !empty( $forum_id ) && bbp_is_forum_private( $forum_id ) && !current_user_can( 'read_private_forums' ) ) {
     2137    if ( ! empty( $forum_id ) && bbp_is_forum_private( $forum_id ) && !current_user_can( 'read_private_forums' ) ) {
    21382138        bbp_set_404();
    21392139    }
     
    22022202    // Loop through and delete child topics. Topic replies will get deleted by
    22032203    // the bbp_delete_topic() action.
    2204     if ( !empty( $topics->posts ) ) {
     2204    if ( ! empty( $topics->posts ) ) {
    22052205        foreach ( $topics->posts as $topic ) {
    22062206            wp_delete_post( $topic->ID, true );
     
    22592259    // Loop through and trash child topics. Topic replies will get trashed by
    22602260    // the bbp_trash_topic() action.
    2261     if ( !empty( $topics->posts ) ) {
     2261    if ( ! empty( $topics->posts ) ) {
    22622262
    22632263        // Prevent debug notices
     
    23082308
    23092309    // There are topics to untrash
    2310     if ( !empty( $pre_trashed_topics ) ) {
     2310    if ( ! empty( $pre_trashed_topics ) ) {
    23112311
    23122312        // Maybe reverse the trashed topics array
     
    23392339    $forum_id = bbp_get_forum_id( $forum_id );
    23402340
    2341     if ( empty( $forum_id ) || !bbp_is_forum( $forum_id ) ) {
     2341    if ( empty( $forum_id ) || ! bbp_is_forum( $forum_id ) ) {
    23422342        return false;
    23432343    }
     
    23612361    $forum_id = bbp_get_forum_id( $forum_id );
    23622362
    2363     if ( empty( $forum_id ) || !bbp_is_forum( $forum_id ) ) {
     2363    if ( empty( $forum_id ) || ! bbp_is_forum( $forum_id ) ) {
    23642364        return false;
    23652365    }
     
    23792379    $forum_id = bbp_get_forum_id( $forum_id );
    23802380
    2381     if ( empty( $forum_id ) || !bbp_is_forum( $forum_id ) ) {
     2381    if ( empty( $forum_id ) || ! bbp_is_forum( $forum_id ) ) {
    23822382        return false;
    23832383    }
     
    23992399    $forum_id = bbp_get_forum_id( $forum_id );
    24002400
    2401     if ( empty( $forum_id ) || !bbp_is_forum( $forum_id ) ) {
     2401    if ( empty( $forum_id ) || ! bbp_is_forum( $forum_id ) ) {
    24022402        return false;
    24032403    }
     
    24172417    $forum_id = bbp_get_forum_id( $forum_id );
    24182418
    2419     if ( empty( $forum_id ) || !bbp_is_forum( $forum_id ) ) {
     2419    if ( empty( $forum_id ) || ! bbp_is_forum( $forum_id ) ) {
    24202420        return false;
    24212421    }
     
    24352435    $forum_id = bbp_get_forum_id( $forum_id );
    24362436
    2437     if ( empty( $forum_id ) || !bbp_is_forum( $forum_id ) ) {
     2437    if ( empty( $forum_id ) || ! bbp_is_forum( $forum_id ) ) {
    24382438        return false;
    24392439    }
  • trunk/src/includes/replies/capabilities.php

    r5770 r5829  
    6161                // Get the post
    6262                $_post = get_post( $args[0] );
    63                 if ( !empty( $_post ) ) {
     63                if ( ! empty( $_post ) ) {
    6464
    6565                    // Get caps for post type object
     
    116116            // Get the post
    117117            $_post = get_post( $args[0] );
    118             if ( !empty( $_post ) ) {
     118            if ( ! empty( $_post ) ) {
    119119
    120120                // Get caps for post type object
     
    144144            // Get the post
    145145            $_post = get_post( $args[0] );
    146             if ( !empty( $_post ) ) {
     146            if ( ! empty( $_post ) ) {
    147147
    148148                // Get caps for post type object
  • trunk/src/includes/replies/functions.php

    r5827 r5829  
    129129
    130130        // Anonymous data checks out, so set cookies, etc...
    131         if ( !empty( $anonymous_data ) && is_array( $anonymous_data ) ) {
     131        if ( ! empty( $anonymous_data ) && is_array( $anonymous_data ) ) {
    132132            bbp_set_current_anonymous_user_data( $anonymous_data );
    133133        }
     
    179179
    180180    // Try to use the forum id of the topic
    181     if ( !isset( $_POST['bbp_forum_id'] ) && !empty( $topic_id ) ) {
     181    if ( ! isset( $_POST['bbp_forum_id'] ) && ! empty( $topic_id ) ) {
    182182        $forum_id = bbp_get_topic_forum_id( $topic_id );
    183183
     
    219219
    220220    // Forum exists
    221     if ( !empty( $forum_id ) ) {
     221    if ( ! empty( $forum_id ) ) {
    222222
    223223        // Forum is a category
     
    251251
    252252    // Remove kses filters from title and content for capable users and if the nonce is verified
    253     if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_reply'] ) && wp_create_nonce( 'bbp-unfiltered-html-reply_' . $topic_id ) === $_POST['_bbp_unfiltered_html_reply'] ) {
     253    if ( current_user_can( 'unfiltered_html' ) && ! empty( $_POST['_bbp_unfiltered_html_reply'] ) && wp_create_nonce( 'bbp-unfiltered-html-reply_' . $topic_id ) === $_POST['_bbp_unfiltered_html_reply'] ) {
    254254        remove_filter( 'bbp_new_reply_pre_title',   'wp_filter_kses'      );
    255255        remove_filter( 'bbp_new_reply_pre_content', 'bbp_encode_bad',  10 );
     
    259259    /** Reply Title ***********************************************************/
    260260
    261     if ( !empty( $_POST['bbp_reply_title'] ) ) {
     261    if ( ! empty( $_POST['bbp_reply_title'] ) ) {
    262262        $reply_title = sanitize_text_field( $_POST['bbp_reply_title'] );
    263263    }
     
    268268    /** Reply Content *********************************************************/
    269269
    270     if ( !empty( $_POST['bbp_reply_content'] ) ) {
     270    if ( ! empty( $_POST['bbp_reply_content'] ) ) {
    271271        $reply_content = $_POST['bbp_reply_content'];
    272272    }
     
    282282    /** Reply Flooding ********************************************************/
    283283
    284     if ( !bbp_check_for_flood( $anonymous_data, $reply_author ) ) {
     284    if ( ! bbp_check_for_flood( $anonymous_data, $reply_author ) ) {
    285285        bbp_add_error( 'bbp_reply_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
    286286    }
     
    288288    /** Reply Duplicate *******************************************************/
    289289
    290     if ( !bbp_check_for_duplicate( array( 'post_type' => bbp_get_reply_post_type(), 'post_author' => $reply_author, 'post_content' => $reply_content, 'post_parent' => $topic_id, 'anonymous_data' => $anonymous_data ) ) ) {
     290    if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_reply_post_type(), 'post_author' => $reply_author, 'post_content' => $reply_content, 'post_parent' => $topic_id, 'anonymous_data' => $anonymous_data ) ) ) {
    291291        bbp_add_error( 'bbp_reply_duplicate', __( '<strong>ERROR</strong>: Duplicate reply detected; it looks as though you&#8217;ve already said that!', 'bbpress' ) );
    292292    }
     
    294294    /** Reply Blacklist *******************************************************/
    295295
    296     if ( !bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
     296    if ( ! bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
    297297        bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be created at this time.', 'bbpress' ) );
    298298    }
     
    301301
    302302    // Maybe put into moderation
    303     if ( !bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
     303    if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
    304304        $reply_status = bbp_get_pending_status_id();
    305305
     
    368368
    369369    // Check for missing reply_id or error
    370     if ( !empty( $reply_id ) && !is_wp_error( $reply_id ) ) {
     370    if ( ! empty( $reply_id ) && !is_wp_error( $reply_id ) ) {
    371371
    372372        /** Topic Tags ********************************************************/
     
    547547
    548548    // Remove kses filters from title and content for capable users and if the nonce is verified
    549     if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_reply'] ) && wp_create_nonce( 'bbp-unfiltered-html-reply_' . $reply_id ) === $_POST['_bbp_unfiltered_html_reply'] ) {
     549    if ( current_user_can( 'unfiltered_html' ) && ! empty( $_POST['_bbp_unfiltered_html_reply'] ) && wp_create_nonce( 'bbp-unfiltered-html-reply_' . $reply_id ) === $_POST['_bbp_unfiltered_html_reply'] ) {
    550550        remove_filter( 'bbp_edit_reply_pre_title',   'wp_filter_kses'      );
    551551        remove_filter( 'bbp_edit_reply_pre_content', 'bbp_encode_bad',  10 );
     
    562562
    563563    // Forum exists
    564     if ( !empty( $forum_id ) && ( $forum_id !== bbp_get_reply_forum_id( $reply_id ) ) ) {
     564    if ( ! empty( $forum_id ) && ( $forum_id !== bbp_get_reply_forum_id( $reply_id ) ) ) {
    565565
    566566        // Forum is a category
     
    593593    /** Reply Title ***********************************************************/
    594594
    595     if ( !empty( $_POST['bbp_reply_title'] ) ) {
     595    if ( ! empty( $_POST['bbp_reply_title'] ) ) {
    596596        $reply_title = sanitize_text_field( $_POST['bbp_reply_title'] );
    597597    }
     
    602602    /** Reply Content *********************************************************/
    603603
    604     if ( !empty( $_POST['bbp_reply_content'] ) ) {
     604    if ( ! empty( $_POST['bbp_reply_content'] ) ) {
    605605        $reply_content = $_POST['bbp_reply_content'];
    606606    }
     
    616616    /** Reply Blacklist *******************************************************/
    617617
    618     if ( !bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
     618    if ( ! bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
    619619        bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );
    620620    }
     
    623623
    624624    // Maybe put into moderation
    625     if ( !bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
     625    if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
    626626
    627627        // Set post status to pending if public
     
    711711
    712712    // Revision Reason
    713     if ( !empty( $_POST['bbp_reply_edit_reason'] ) ) {
     713    if ( ! empty( $_POST['bbp_reply_edit_reason'] ) ) {
    714714        $reply_edit_reason = sanitize_text_field( $_POST['bbp_reply_edit_reason'] );
    715715    }
    716716
    717717    // Update revision log
    718     if ( !empty( $_POST['bbp_log_reply_edit'] ) && ( "1" === $_POST['bbp_log_reply_edit'] ) ) {
     718    if ( ! empty( $_POST['bbp_log_reply_edit'] ) && ( "1" === $_POST['bbp_log_reply_edit'] ) ) {
    719719        $revision_id = wp_save_post_revision( $reply_id );
    720         if ( !empty( $revision_id ) ) {
     720        if ( ! empty( $revision_id ) ) {
    721721            bbp_update_reply_revision_log( array(
    722722                'reply_id'    => $reply_id,
     
    730730    /** No Errors *************************************************************/
    731731
    732     if ( !empty( $reply_id ) && !is_wp_error( $reply_id ) ) {
     732    if ( ! empty( $reply_id ) && !is_wp_error( $reply_id ) ) {
    733733
    734734        // Update counts, etc...
     
    816816
    817817    // Check forum_id
    818     if ( !empty( $topic_id ) && empty( $forum_id ) ) {
     818    if ( ! empty( $topic_id ) && empty( $forum_id ) ) {
    819819        $forum_id = bbp_get_topic_forum_id( $topic_id );
    820820    }
     
    823823    // It expects anonymous_data to be sanitized.
    824824    // Check bbp_filter_anonymous_post_data() for sanitization.
    825     if ( !empty( $anonymous_data ) && is_array( $anonymous_data ) ) {
     825    if ( ! empty( $anonymous_data ) && is_array( $anonymous_data ) ) {
    826826
    827827        // Parse arguments against default values
     
    849849
    850850    // Handle Subscription Checkbox
    851     if ( bbp_is_subscriptions_active() && !empty( $author_id ) && !empty( $topic_id ) ) {
     851    if ( bbp_is_subscriptions_active() && ! empty( $author_id ) && ! empty( $topic_id ) ) {
    852852        $subscribed = bbp_is_user_subscribed( $author_id, $topic_id );
    853         $subscheck  = ( !empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' === $_POST['bbp_topic_subscription'] ) ) ? true : false;
     853        $subscheck  = ( ! empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' === $_POST['bbp_topic_subscription'] ) ) ? true : false;
    854854
    855855        // Subscribed and unsubscribing
     
    922922
    923923    // Reply was passed
    924     if ( !empty( $reply_id ) ) {
     924    if ( ! empty( $reply_id ) ) {
    925925
    926926        // Get the topic ID if none was passed
     
    947947
    948948    // Walk up ancestors
    949     if ( !empty( $ancestors ) ) {
     949    if ( ! empty( $ancestors ) ) {
    950950        foreach ( $ancestors as $ancestor ) {
    951951
     
    10361036
    10371037        // Loop through ancestors
    1038         if ( !empty( $ancestors ) ) {
     1038        if ( ! empty( $ancestors ) ) {
    10391039            foreach ( $ancestors as $ancestor ) {
    10401040
     
    10851085
    10861086        // Loop through ancestors
    1087         if ( !empty( $ancestors ) ) {
     1087        if ( ! empty( $ancestors ) ) {
    10881088            foreach ( $ancestors as $ancestor ) {
    10891089
     
    13111311
    13121312    // How to move
    1313     if ( !empty( $_POST['bbp_reply_move_option'] ) ) {
     1313    if ( ! empty( $_POST['bbp_reply_move_option'] ) ) {
    13141314        $move_option = (string) trim( $_POST['bbp_reply_move_option'] );
    13151315    }
    13161316
    13171317    // Invalid move option
    1318     if ( empty( $move_option ) || !in_array( $move_option, array( 'existing', 'topic' ) ) ) {
     1318    if ( empty( $move_option ) || ! in_array( $move_option, array( 'existing', 'topic' ) ) ) {
    13191319        bbp_add_error( 'bbp_move_reply_option', __( '<strong>ERROR</strong>: You need to choose a valid move option.', 'bbpress' ) );
    13201320
     
    13751375
    13761376                    // Use the new title that was passed
    1377                     if ( !empty( $_POST['bbp_reply_move_destination_title'] ) ) {
     1377                    if ( ! empty( $_POST['bbp_reply_move_destination_title'] ) ) {
    13781378                        $destination_topic_title = sanitize_text_field( $_POST['bbp_reply_move_destination_title'] );
    13791379
     
    15701570
    15711571    // Bail if actions aren't meant for this function
    1572     if ( !in_array( $action, $possible_actions ) ) {
     1572    if ( ! in_array( $action, $possible_actions ) ) {
    15731573        return;
    15741574    }
     
    16021602            $success    = $is_approve ? bbp_approve_reply( $reply_id ) : bbp_unapprove_reply( $reply_id );
    16031603            $failure    = $is_approve ? __( '<strong>ERROR</strong>: There was a problem approving the reply!', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem unapproving the reply!', 'bbpress' );
    1604             $view_all   = !$is_approve;
     1604            $view_all   = ! $is_approve;
    16051605
    16061606            break;
     
    16131613            $success  = $is_spam ? bbp_unspam_reply( $reply_id ) : bbp_spam_reply( $reply_id );
    16141614            $failure  = $is_spam ? __( '<strong>ERROR</strong>: There was a problem unmarking the reply as spam!', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the reply as spam!', 'bbpress' );
    1615             $view_all = !$is_spam;
     1615            $view_all = ! $is_spam;
    16161616
    16171617            break;
     
    16711671
    16721672        // Add view all if needed
    1673         if ( !empty( $view_all ) ) {
     1673        if ( ! empty( $view_all ) ) {
    16741674            $reply_url = bbp_add_view_all( $reply_url, true );
    16751675        }
     
    19111911    $reply_id = bbp_get_reply_id( $reply_id );
    19121912
    1913     if ( empty( $reply_id ) || !bbp_is_reply( $reply_id ) ) {
     1913    if ( empty( $reply_id ) || ! bbp_is_reply( $reply_id ) ) {
    19141914        return false;
    19151915    }
     
    19281928    $reply_id = bbp_get_reply_id( $reply_id );
    19291929
    1930     if ( empty( $reply_id ) || !bbp_is_reply( $reply_id ) ) {
     1930    if ( empty( $reply_id ) || ! bbp_is_reply( $reply_id ) ) {
    19311931        return false;
    19321932    }
     
    19451945    $reply_id = bbp_get_reply_id( $reply_id );
    19461946
    1947     if ( empty( $reply_id ) || !bbp_is_reply( $reply_id ) ) {
     1947    if ( empty( $reply_id ) || ! bbp_is_reply( $reply_id ) ) {
    19481948        return false;
    19491949    }
     
    19641964    $reply_id = bbp_get_reply_id( $reply_id );
    19651965
    1966     if ( empty( $reply_id ) || !bbp_is_reply( $reply_id ) ) {
     1966    if ( empty( $reply_id ) || ! bbp_is_reply( $reply_id ) ) {
    19671967        return false;
    19681968    }
     
    19811981    $reply_id = bbp_get_reply_id( $reply_id );
    19821982
    1983     if ( empty( $reply_id ) || !bbp_is_reply( $reply_id ) ) {
     1983    if ( empty( $reply_id ) || ! bbp_is_reply( $reply_id ) ) {
    19841984        return false;
    19851985    }
     
    19981998    $reply_id = bbp_get_reply_id( $reply_id );
    19991999
    2000     if ( empty( $reply_id ) || !bbp_is_reply( $reply_id ) ) {
     2000    if ( empty( $reply_id ) || ! bbp_is_reply( $reply_id ) ) {
    20012001        return false;
    20022002    }
     
    21762176
    21772177    // User cannot access forum this topic is in
    2178     if ( bbp_is_single_topic() && !bbp_user_can_view_forum( array( 'forum_id' => bbp_get_topic_forum_id() ) ) ) {
     2178    if ( bbp_is_single_topic() && ! bbp_user_can_view_forum( array( 'forum_id' => bbp_get_topic_forum_id() ) ) ) {
    21792179        return;
    21802180    }
     
    21832183    if ( bbp_is_single_topic() && bbp_user_can_view_forum( array( 'forum_id' => bbp_get_topic_forum_id() ) ) ) {
    21842184        $title = apply_filters( 'wp_title_rss', get_wp_title_rss( ' &#187; ' ) );
    2185     } elseif ( !bbp_show_lead_topic() ) {
     2185    } elseif ( ! bbp_show_lead_topic() ) {
    21862186        $title = ' &#187; ' .  __( 'All Posts',   'bbpress' );
    21872187    } else {
     
    23682368    // Get required data
    23692369    $reply_id       = bbp_get_reply_id( $reply_id );
    2370     $topic_id       = !empty( $topic_id ) ? bbp_get_topic_id( $topic_id ) : bbp_get_reply_topic_id( $reply_id );
     2370    $topic_id       = ! empty( $topic_id ) ? bbp_get_topic_id( $topic_id ) : bbp_get_reply_topic_id( $reply_id );
    23712371    $reply_position = 0;
    23722372
     
    23762376        // Make sure the topic has replies before running another query
    23772377        $reply_count = bbp_get_topic_reply_count( $topic_id, false );
    2378         if ( !empty( $reply_count ) ) {
     2378        if ( ! empty( $reply_count ) ) {
    23792379
    23802380            // Get reply id's
    23812381            $topic_replies = bbp_get_all_child_ids( $topic_id, bbp_get_reply_post_type() );
    2382             if ( !empty( $topic_replies ) ) {
     2382            if ( ! empty( $topic_replies ) ) {
    23832383
    23842384                // Reverse replies array and search for current reply position
  • 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 .= '&hellip;';
     
    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        }
  • trunk/src/includes/topics/functions.php

    r5827 r5829  
    11951195
    11961196    // Source topic not found
    1197     } elseif ( !$source_topic = bbp_get_topic( $source_topic_id ) ) {
     1197    } elseif ( ! $source_topic = bbp_get_topic( $source_topic_id ) ) {
    11981198        bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to merge was not found.', 'bbpress' ) );
    11991199        return;
     
    12161216
    12171217    // Destination topic not found
    1218     if ( !$destination_topic = bbp_get_topic( $destination_topic_id ) ) {
     1218    if ( ! $destination_topic = bbp_get_topic( $destination_topic_id ) ) {
    12191219        bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to merge to was not found.', 'bbpress' ) );
    12201220    }
     
    18721872
    18731873            // No tag name was provided
    1874             if ( empty( $_POST['tag-name'] ) || !$name = $_POST['tag-name'] ) {
     1874            if ( empty( $_POST['tag-name'] ) || ! $name = $_POST['tag-name'] ) {
    18751875                bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
    18761876                return;
     
    19121912
    19131913            // No tag name was provided
    1914             if ( empty( $_POST['tag-existing-name'] ) || !$name = $_POST['tag-existing-name'] ) {
     1914            if ( empty( $_POST['tag-existing-name'] ) || ! $name = $_POST['tag-existing-name'] ) {
    19151915                bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
    19161916                return;
     
    19181918
    19191919            // If term does not exist, create it
    1920             if ( !$tag = term_exists( $name, bbp_get_topic_tag_tax_id() ) ) {
     1920            if ( ! $tag = term_exists( $name, bbp_get_topic_tag_tax_id() ) ) {
    19211921                $tag = wp_insert_term( $name, bbp_get_topic_tag_tax_id() );
    19221922            }
     
    21782178            $success  = true === $is_spam ? bbp_unspam_topic( $topic_id ) : bbp_spam_topic( $topic_id );
    21792179            $failure  = true === $is_spam ? __( '<strong>ERROR</strong>: There was a problem unmarking the topic as spam.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the topic as spam.', 'bbpress' );
    2180             $view_all = !$is_spam;
     2180            $view_all = ! $is_spam;
    21812181
    21822182            break;
  • trunk/src/templates/default/bbpress-functions.php

    r5770 r5829  
    356356        // Get user and topic data
    357357        $user_id = bbp_get_current_user_id();
    358         $id      = !empty( $_POST['id'] ) ? intval( $_POST['id'] ) : 0;
     358        $id      = ! empty( $_POST['id'] ) ? intval( $_POST['id'] ) : 0;
    359359
    360360        // Bail if user cannot add favorites for this user
  • trunk/src/templates/default/bbpress/content-single-forum.php

    r5770 r5829  
    3232        <?php endif; ?>
    3333
    34         <?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
     34        <?php if ( ! bbp_is_forum_category() && bbp_has_topics() ) : ?>
    3535
    3636            <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
     
    4242            <?php bbp_get_template_part( 'form',       'topic'     ); ?>
    4343
    44         <?php elseif ( !bbp_is_forum_category() ) : ?>
     44        <?php elseif ( ! bbp_is_forum_category() ) : ?>
    4545
    4646            <?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
  • trunk/src/templates/default/bbpress/content-statistics.php

    r5770 r5829  
    4040    </dd>
    4141
    42     <?php if ( !empty( $stats['empty_topic_tag_count'] ) ) : ?>
     42    <?php if ( ! empty( $stats['empty_topic_tag_count'] ) ) : ?>
    4343
    4444        <dt><?php esc_html_e( 'Empty Topic Tags', 'bbpress' ); ?></dt>
     
    4949    <?php endif; ?>
    5050
    51     <?php if ( !empty( $stats['topic_count_hidden'] ) ) : ?>
     51    <?php if ( ! empty( $stats['topic_count_hidden'] ) ) : ?>
    5252
    5353        <dt><?php esc_html_e( 'Hidden Topics', 'bbpress' ); ?></dt>
     
    6060    <?php endif; ?>
    6161
    62     <?php if ( !empty( $stats['reply_count_hidden'] ) ) : ?>
     62    <?php if ( ! empty( $stats['reply_count_hidden'] ) ) : ?>
    6363
    6464        <dt><?php esc_html_e( 'Hidden Replies', 'bbpress' ); ?></dt>
  • trunk/src/templates/default/bbpress/form-forum.php

    r5770 r5829  
    4343                <?php do_action( 'bbp_theme_before_forum_form_notices' ); ?>
    4444
    45                 <?php if ( !bbp_is_forum_edit() && bbp_is_forum_closed() ) : ?>
     45                <?php if ( ! bbp_is_forum_edit() && bbp_is_forum_closed() ) : ?>
    4646
    4747                    <div class="bbp-template-notice">
  • trunk/src/templates/default/bbpress/form-reply.php

    r5770 r5829  
    2929                <?php do_action( 'bbp_theme_before_reply_form_notices' ); ?>
    3030
    31                 <?php if ( !bbp_is_topic_open() && !bbp_is_reply_edit() ) : ?>
     31                <?php if ( ! bbp_is_topic_open() && ! bbp_is_reply_edit() ) : ?>
    3232
    3333                    <div class="bbp-template-notice">
     
    8383                    <?php endif; ?>
    8484
    85                     <?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_reply_edit() || ( bbp_is_reply_edit() && !bbp_is_reply_anonymous() ) ) ) : ?>
     85                    <?php if ( bbp_is_subscriptions_active() && ! bbp_is_anonymous() && ( ! bbp_is_reply_edit() || ( bbp_is_reply_edit() && ! bbp_is_reply_anonymous() ) ) ) : ?>
    8686
    8787                        <?php do_action( 'bbp_theme_before_reply_form_subscription' ); ?>
  • trunk/src/templates/default/bbpress/form-topic.php

    r5770 r5829  
    4949                <?php do_action( 'bbp_theme_before_topic_form_notices' ); ?>
    5050
    51                 <?php if ( !bbp_is_topic_edit() && bbp_is_forum_closed() ) : ?>
     51                <?php if ( ! bbp_is_topic_edit() && bbp_is_forum_closed() ) : ?>
    5252
    5353                    <div class="bbp-template-notice">
     
    112112                    <?php endif; ?>
    113113
    114                     <?php if ( !bbp_is_single_forum() ) : ?>
     114                    <?php if ( ! bbp_is_single_forum() ) : ?>
    115115
    116116                        <?php do_action( 'bbp_theme_before_topic_form_forum' ); ?>
     
    158158                    <?php endif; ?>
    159159
    160                     <?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_topic_edit() || ( bbp_is_topic_edit() && !bbp_is_topic_anonymous() ) ) ) : ?>
     160                    <?php if ( bbp_is_subscriptions_active() && ! bbp_is_anonymous() && ( ! bbp_is_topic_edit() || ( bbp_is_topic_edit() && ! bbp_is_topic_anonymous() ) ) ) : ?>
    161161
    162162                        <?php do_action( 'bbp_theme_before_topic_form_subscriptions' ); ?>
     
    250250<?php endif; ?>
    251251
    252 <?php if ( !bbp_is_single_forum() ) : ?>
     252<?php if ( ! bbp_is_single_forum() ) : ?>
    253253
    254254</div>
  • trunk/src/templates/default/bbpress/loop-single-topic.php

    r5770 r5829  
    6161            <?php do_action( 'bbp_theme_after_topic_started_by' ); ?>
    6262
    63             <?php if ( !bbp_is_single_forum() || ( bbp_get_topic_forum_id() !== bbp_get_forum_id() ) ) : ?>
     63            <?php if ( ! bbp_is_single_forum() || ( bbp_get_topic_forum_id() !== bbp_get_forum_id() ) ) : ?>
    6464
    6565                <?php do_action( 'bbp_theme_before_topic_started_in' ); ?>
Note: See TracChangeset for help on using the changeset viewer.