Skip to:
Content

bbPress.org

Ticket #3626: bbp_pre_handle_404.diff

File bbp_pre_handle_404.diff, 601 bytes (added by ethitter, 5 months ago)
  • src/includes/common/functions.php

     
    26162616        if ( isset( $wp_query->bbp_is_404 ) ) {
    26172617
    26182618                // Either force a 404 when 200, or a 200 when 404
    2619                 $override = ( true === $wp_query->bbp_is_404 )
    2620                         ? bbp_set_404( $wp_query )
    2621                         : bbp_set_200();
     2619                if ( true === $wp_query->bbp_is_404 ) {
     2620                        bbp_set_404( $wp_query );
     2621                } else {
     2622                        bbp_set_200();
     2623                }
     2624
     2625                return true;
    26222626        }
    26232627
    26242628        // Return, maybe overridden