$field ) { $field_args = [ 'prefix' => $args['prefix'], 'key' => $key, 'field' => $field, 'value' => $saved_settings[$key] ?? $field['default'], 'current_screen_slug' => $screen_slug, ]; echo Utility::get_template( 'settings/fields/' . sanitize_key( $field['type'] ) . '.php', $field_args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Field templates escape their own output. } ?>