| @@ -240,18 +240,23 @@ | ||
| 240 | 240 | $this->modal ? 'class="in-modal"' : '', |
| 241 | 241 | $loader |
| 242 | 242 | ); |
| 243 | 243 | |
| 244 | + /** | |
| 245 | + * @since 4.3.0 remove modal-inner-wrap element to achieve style parity with v3 modals. | |
| 246 | + */ | |
| 244 | 247 | if ($this->modal) { |
| 245 | 248 | $iframe = sprintf( |
| 246 | - '<div class="modal-inner-wrap"> | |
| 249 | + ' | |
| 247 | 250 | <div class="modal-content"> |
| 248 | - <a href="#" class="close-btn js-give-embed-form-modal-closer" aria-label="%3$s" data-form-id="%3$s" rel="nofollow">%2$s<span>×</span></a> | |
| 251 | + <a href="#" class="close-btn js-give-embed-form-modal-closer" aria-label="%3$s" data-form-id="%3$s" rel="nofollow">%2$s | |
| 252 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false" class="givewp-donation-form-modal__close__icon"><path stroke="black" stroke-width="2" d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg> | |
| 253 | + </a> | |
| 249 | 254 | %1$s |
| 250 | 255 | </div> |
| 251 | - </div>', | |
| 256 | + ', | |
| 252 | 257 | $iframe, |
| 253 | - esc_html__('Close', 'give'), | |
| 258 | + '', | |
| 254 | 259 | $this->uniqueId |
| 255 | 260 | ); |
| 256 | 261 | } |
| 257 | 262 | |
| @@ -260,8 +265,11 @@ | ||
| 260 | 265 | |
| 261 | 266 | /** |
| 262 | 267 | * Get button HTML. |
| 263 | 268 | * |
| 269 | + * @since 4.3.0 add v3 button classname to match v3 modals. | |
| 270 | + * @since 3.7.0 Escape attributes | |
| 271 | + * | |
| 264 | 272 | * @return string |
| 265 | 273 | */ |
| 266 | 274 | private function getButtonHTML() |
| 267 | 275 | { |
| @@ -268,14 +276,15 @@ | ||
| 268 | 276 | return sprintf( |
| 269 | 277 | '<div class="js-give-embed-form-modal-launcher-wrap"> |
| 270 | 278 | <button |
| 271 | 279 | type="button" |
| 272 | - class="js-give-embed-form-modal-opener" | |
| 273 | - data-form-id="%1$s"%3$s>%2$s</button> | |
| 280 | + class="js-give-embed-form-modal-opener givewp-donation-form-modal__open" | |
| 281 | + data-form-id="%1$s"%3$s | |
| 282 | + >%2$s</button> | |
| 274 | 283 | </div>', |
| 275 | - $this->uniqueId, | |
| 276 | - $this->buttonTitle, | |
| 277 | - $this->buttonColor ? " style=\"background-color: {$this->buttonColor}\"" : '' | |
| 284 | + esc_attr($this->uniqueId), | |
| 285 | + esc_html($this->buttonTitle), | |
| 286 | + $this->buttonColor ? ' style="background-color: ' . esc_attr($this->buttonColor) . '"' : '' | |
| 278 | 287 | ); |
| 279 | 288 | } |
| 280 | 289 | |
| 281 | 290 | /** |