Bueno, debo agradecer, literalmente me han resuelto el problema...
Finalmente el código quedó así:
Código PHP:
Ver original 'user' => 1,
'status' => 'pending',
),
'user' => 22,
'status' => 'pending',
),
'user' => 13,
'status' => 'pending',
),
'user' => 4,
'status' => 'pending',
),
'user' => 512,
'status' => 'pending',
),
);
$status = ( isset( $_REQUEST['status'] ) ) ?
$_REQUEST['status'] : null; $updated_users = array(); foreach ( $notes as $key => $value ) :
for ($i = 0; $i < count($_REQUEST['user']); $i++) : if ( $value['user'] == $_REQUEST['user'][$i] ) :
if ( $status == 'approved' || $status == 'pending' ) :
'user' => $_REQUEST['user'][$i],
'status' => $status,
),
);
elseif ( $status == 'disapprove' ) :
endif;
break;
else :
'user' => $value['user'],
'status' => $value['status'],
),
);
endif;
endfor;
endforeach;
Cambié la función sizeof() por count() por una cuestión pura de manía, y cambié el break al final de la sentencia if... pues si el estado es disapprove debo eliminar el usuario del registro en la BD
Para ampliar un poquito, y matar la curiocidad de quien la padezca, cuando me pasan este tipo de cosas trabajando con WP, trato de simplificar el código y lo trabajo en un archivo php simple y sato, que es lo que he mostrado aquí, pero también les traigo la función original, por si hace algún bien a alguien
Código PHP:
Ver originalfunction humi_mentor_update_multi_supported_users(){
$status = ( isset( $_REQUEST['status'] ) ) ?
$_REQUEST['status'] : null; $current_users = get_user_meta( get_current_user_id(), 'humi_mentor_supported_users', true );
$updated_users = array();
// Check for multi user update
$multi_nonce = ( isset( $_REQUEST['update_bulk_users_field'] ) ) ?
$_REQUEST['update_bulk_users_field'] : null; if ( ! wp_verify_nonce( $multi_nonce, 'update_bulk_users_attr' ) ) return;
if ( wp_verify_nonce( $multi_nonce, 'update_bulk_users_attr' ) ) :
// Check if there is something to do
if ( $status == 'null' ) :
$redirect = apply_filters
( 'humi_mentor_update_supported_users_fail', add_query_arg
( array( 'update-multi-user' => 'false' ), get_permalink
() ) ); wp_safe_redirect( $redirect );
endif;
foreach ( $current_users as $key => $value ) :
for ( $i = 0; $i < count( $_REQUEST['user'] ); $i++ ) : if ( $value['user'] == $_REQUEST['user'][$i] ) :
if ( $status == 'approved' || $status == 'pending' ) :
'user' => $_REQUEST['user'][$i],
'status' => $status,
),
);
elseif ( $status == 'disapprove' ) :
delete_user_meta( $value['user'], 'humi_user_mentor' );
endif;
break;
else :
'user' => $value['user'],
'status' => $value['status'],
),
);
endif;
endfor;
endforeach;
update_user_meta( get_current_user_id(), 'humi_mentor_supported_users', $updated_users );
$redirect = apply_filters
( 'humi_mentor_update_supported_users_success', add_query_arg
( array( 'update-multi-user' => 'true' ), get_permalink
() ) ); wp_safe_redirect( $redirect );
endif;
}
add_action( 'template_redirect', 'humi_mentor_update_multi_supported_users' );
Gracias nuevamente por la ayuda y la prontitud...