Making WordPress.org

Changeset 11250


Ignore:
Timestamp:
09/22/2021 08:10:18 AM (2 years ago)
Author:
dd32
Message:

Bad Requests: Remove any actions on 'body_class' as well, to avoid notices within notices.

Most plugins hooking to body_class expect that the page has a post or query available, which is unavalable in this case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-bad-request.php

    r11249 r11250  
    207207 */
    208208function die_bad_request( $reference = '' ) {
    209     // Log it if possible, and not on a sandbox
     209    // When the user is logged in, log it if possible
    210210    if ( ! defined( 'WPORG_SANDBOXED' ) || ! WPORG_SANDBOXED ) {
    211211        if ( function_exists( 'wporg_error_reporter' ) && ! empty( $_COOKIE['wporg_logged_in'] ) ) {
     
    223223        remove_all_actions( 'wp_head' );
    224224        remove_all_actions( 'wp_footer' );
     225        remove_all_actions( 'body_class' );
    225226
    226227        status_header( 400 );
Note: See TracChangeset for help on using the changeset viewer.