PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13.1
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13.1
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
← All changes | templates/form-fields/default.php +20 -0 1.8.12.2 → 1.8.13.1 View file →
@@ -13,8 +13,9 @@
13 13 * @since 1.0.0
14 14 * @version 1.0.0
15 15 * @version 1.8.6.1 Added description output.
16 16 * @version 1.8.8.6
17 + * @version 1.8.13.1
17 18 */
18 19
19 20 if ( ! isset( $view_args['form'] ) || ! isset( $view_args['field'] ) ) {
20 21 return;
@@ -25,8 +26,27 @@
25 26 $charitable_classes = esc_attr( $view_args['classes'] );
26 27 $charitable_field_type = isset( $charitable_field['type'] ) ? $charitable_field['type'] : 'text';
27 28 $charitable_is_required = isset( $charitable_field['required'] ) ? $charitable_field['required'] : false;
28 29 $charitable_value = isset( $charitable_field['value'] ) ? $charitable_field['value'] : '';
30 +
31 +/*
32 + * Fill in the autocomplete token for known personal fields (WCAG 1.3.5) -- 1.8.13.1.
33 + *
34 + * Done here as well as in the field registry so every render path that reaches this
35 + * template is covered, including fields an addon registers without declaring a token.
36 + * Never overwrites an explicit value. The attribute itself is emitted by the existing
37 + * charitable_get_arbitrary_attributes() call on the input below.
38 + *
39 + * function_exists guarded because this template is theme-overridable --
40 + * Charitable_Template::locate_template() checks the theme and child theme before the
41 + * plugin's own copy. A site that took a copy into its theme and later ran it against a
42 + * Charitable without this helper (a rollback, or a theme moved between sites) would
43 + * otherwise hit Call to undefined function on every donation form. Unguarded, the field
44 + * simply renders without the token, exactly as it did before 1.8.13.1.
45 + */
46 +if ( function_exists( 'charitable_maybe_add_field_autocomplete' ) ) {
47 + $charitable_field = charitable_maybe_add_field_autocomplete( $charitable_field );
48 +}
29 49
30 50 ?>
31 51 <div id="charitable_field_<?php echo esc_attr( $charitable_field['key'] ); ?>" class="<?php echo esc_attr( $charitable_classes ); ?>">
32 52 <?php if ( isset( $charitable_field['label'] ) ) : ?>