$location_data ) { // Register setting. register_setting( $option_group = 'astoundify-recaptcha', $option_name = "astoundify-recaptcha-{$location_id}", $sanitize_callback = 'astoundify_recaptcha_settings_sanitize_locations' ); // Create field for each form. add_settings_field( $field_id = "astoundify_recaptcha_{$location_id}", $field_title = $location_data['label'], $callback_function = function() use ( $location_id, $location_data ) { foreach ( $location_data['forms'] as $form_id => $form_label ) { $is_active = astoundify_recaptcha_is_active( $location_id, $form_id ); ?>