This commit is contained in:
Javier Casares 2026-11-04 14:37:18 +00:00
commit 7379505d20

View file

@ -299,14 +299,22 @@ class Login_Form_Manager {
return;
}
/**
* Registered filters and actions. Values are WP_Hook objects, but a
* corrupted container from third-party code is tolerated, hence mixed.
*
* @var array<string, mixed>|null $wp_filter
*/
global $wp_filter;
if ( ! isset( $wp_filter['init'] ) || ! $wp_filter['init'] instanceof \WP_Hook ) {
$init_hooks = $wp_filter['init'] ?? null;
if ( ! $init_hooks instanceof \WP_Hook ) {
return;
}
foreach ( array_keys( $wp_filter['init']->callbacks ) as $priority ) {
if ( isset( $wp_filter['init']->callbacks[ $priority ]['altcha_interceptor'] ) ) {
foreach ( array_keys( $init_hooks->callbacks ) as $priority ) {
if ( isset( $init_hooks->callbacks[ $priority ]['altcha_interceptor'] ) ) {
remove_action( 'init', 'altcha_interceptor', (int) $priority );
return;