Skip to:
Content

bbPress.org


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/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';
Note: See TracChangeset for help on using the changeset viewer.