| 1 |
<?php |
| 2 |
/** |
| 3 |
* Charitable Admin Splash modal template. |
| 4 |
* |
| 5 |
* @package Charitable/Admin/Templates |
| 6 |
* @since 1.8.6 |
| 7 |
* @version 1.8.8.6 |
| 8 |
* |
| 9 |
* @var array $header Header data. |
| 10 |
* @var array $footer Footer data. |
| 11 |
* @var array $blocks Blocks data. |
| 12 |
* @var array $license License type. |
| 13 |
*/ |
| 14 |
|
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
/** |
| 20 |
* Build kses allowed HTML for splash output — wp_kses_post strips <source>, |
| 21 |
* so we extend the "post" set with the media tags we render in sections. |
| 22 |
* |
| 23 |
* phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- local helper. |
| 24 |
*/ |
| 25 |
$charitable_splash_allowed = wp_kses_allowed_html( 'post' ); |
| 26 |
$charitable_splash_allowed['video'] = array( |
| 27 |
'autoplay' => true, |
| 28 |
'muted' => true, |
| 29 |
'playsinline' => true, |
| 30 |
'controls' => true, |
| 31 |
'preload' => true, |
| 32 |
'poster' => true, |
| 33 |
'src' => true, |
| 34 |
'class' => true, |
| 35 |
); |
| 36 |
$charitable_splash_allowed['source'] = array( |
| 37 |
'src' => true, |
| 38 |
'type' => true, |
| 39 |
); |
| 40 |
?> |
| 41 |
|
| 42 |
<script type="text/html" id="tmpl-charitable-splash-modal-content"> |
| 43 |
<div id="charitable-splash-modal"> |
| 44 |
<?php |
| 45 |
echo wp_kses( |
| 46 |
charitable_render( |
| 47 |
'admin/templates/splash/splash-header', |
| 48 |
[ |
| 49 |
'header' => $data['header'], |
| 50 |
], |
| 51 |
true |
| 52 |
), |
| 53 |
$charitable_splash_allowed |
| 54 |
); |
| 55 |
?> |
| 56 |
<main> |
| 57 |
<?php |
| 58 |
if ( ! empty( $data['sections'] ) ) { |
| 59 |
|
| 60 |
foreach ( $data['sections'] as $charitable_section ) { |
| 61 |
echo wp_kses( |
| 62 |
charitable_render( |
| 63 |
'admin/templates/splash/splash-section', |
| 64 |
[ |
| 65 |
'section' => $charitable_section, |
| 66 |
], |
| 67 |
true |
| 68 |
), |
| 69 |
$charitable_splash_allowed |
| 70 |
); |
| 71 |
} |
| 72 |
} |
| 73 |
?> |
| 74 |
</main> |
| 75 |
<?php |
| 76 |
$charitable_license = isset( $license ) ? $license : 'lite'; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- $license may be passed in from external context. |
| 77 |
echo wp_kses( |
| 78 |
charitable_render( |
| 79 |
'admin/templates/splash/splash-footer', |
| 80 |
[ |
| 81 |
'footer' => $data['footer'], |
| 82 |
], |
| 83 |
true |
| 84 |
), |
| 85 |
$charitable_splash_allowed |
| 86 |
); |
| 87 |
?> |
| 88 |
</div> |
| 89 |
</script> |
| 90 |
|