PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
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 | includes/admin/campaign-builder/fields/class-donate-amount.php +20 -1 1.8.12 → 1.8.13 View file →
@@ -179,9 +179,28 @@
179 179 ?>
180 180 <li class="charitable-<?php echo esc_attr( $preview_or_template_css ); ?>-donation-amount suggested-donation-amount <?php echo esc_attr( $selected_css ); ?>">
181 181 <label>
182 182 <input type="radio" name="donation_amount" value="<?php echo esc_attr( $suggested_donation['amount'] ); ?>" <?php echo esc_attr( $checked_attribute ); ?>>
183 - <span class="amount"><?php echo esc_html( $currency_helper->get_monetary_amount( $suggested_donation['amount'] ) ); ?></span> <?php /* <span class="description"><?php echo esc_html( $suggested_donation['description'] ); ?></span> */ ?>
183 + <span class="amount"><?php echo esc_html( $currency_helper->get_monetary_amount( $suggested_donation['amount'] ) ); ?></span>
184 + <?php
185 + /*
186 + * The builder's "Optional Description" beside each amount. Rows saved before
187 + * that input existed, written by the legacy metabox, or added programmatically
188 + * have no 'description' key at all, so this is guarded rather than read
189 + * directly. The span is omitted entirely when the description is blank, which
190 + * keeps the markup (and so the layout) identical for the campaigns that never
191 + * filled it in.
192 + *
193 + * wp_kses_post() rather than esc_html() to match
194 + * templates/donation-form/donation-amount-list.php, so the same description
195 + * renders the same way in this block and on the donation form.
196 + */
197 + if ( ! empty( $suggested_donation['description'] ) ) :
198 + ?>
199 + <span class="description"><?php echo wp_kses_post( $suggested_donation['description'] ); ?></span>
200 + <?php
201 + endif;
202 + ?>
184 203 </label>
185 204 </li>
186 205 <?php
187 206 endforeach;