Skip to:
Content

bbPress.org

Changeset 6554


Ignore:
Timestamp:
06/15/2017 05:02:11 AM (8 years ago)
Author:
johnjamesjacoby
Message:

General: Introduce bbp_pre_handle_404() to handle 404 overrides.

This only introduces the function for now. I'll go through and check all of the conditions next.

See #3047.

Location:
trunk/src/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/functions.php

    r6543 r6554  
    21652165    $wp_query->set_404();
    21662166}
     2167
     2168/**
     2169 * Maybe avoid default 404 handling for some bbPress pages
     2170 *
     2171 * @since 2.6.0 bbPress (r6555)
     2172 */
     2173function bbp_pre_handle_404( $override = false, $wp_query = false ) {
     2174    return $override;
     2175}
  • trunk/src/includes/core/filters.php

    r6484 r6554  
    6060// Reply title fallback
    6161add_filter( 'the_title', 'bbp_get_reply_title_fallback', 2, 2 );
     62
     63// Avoid 404ing
     64add_filter( 'pre_handle_404', 'bbp_pre_handle_404', 10, 2 );
    6265
    6366/**
Note: See TracChangeset for help on using the changeset viewer.