Skip to content

Redirect logging skips WP core and other redirects before the wp hook #962

@kasparsd

Description

@kasparsd

The redirect dispatcher is currently checking for did_action( 'wp' ) or did_action( 'login_init' ) to become active:

# Don't process if the minimum required actions haven't fired:
if ( is_admin() ) {
if ( ! did_action( 'admin_init' ) ) {
return false;
}
} else {
if ( ! ( did_action( 'wp' ) || did_action( 'login_init' ) ) ) {
return false;
}
}

This leads to missing most of the WP core canonical redirects which happen during template_redirect

Consider relaxing the logic to capture as many redirects as possible.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions