page.php
106 lines
| 1 | <?php |
| 2 | /** |
| 3 | * General education template. |
| 4 | * |
| 5 | * @since 1.8.6 |
| 6 | * |
| 7 | * @var string $action Is plugin installed? |
| 8 | * @var string $path Plugin file. |
| 9 | * @var string $url URL download plugin download. |
| 10 | * @var bool $plugin_allow Allow using plugin. |
| 11 | * @var string $heading_title Heading title. |
| 12 | * @var string $badge Badge. |
| 13 | * @var string $heading_description Heading description. |
| 14 | * @var string $features_description Features description. |
| 15 | * @var array $features List of features. |
| 16 | * @var array $images List of images. |
| 17 | * @var string $utm_medium UTM medium. |
| 18 | * @var string $utm_content UTM content. |
| 19 | * @var string $upgrade_link Upgrade link. |
| 20 | */ |
| 21 | if ( ! defined( 'ABSPATH' ) ) { |
| 22 | exit; |
| 23 | } |
| 24 | ?> |
| 25 | |
| 26 | <div class="wpforms-education-page"> |
| 27 | <div class="wpforms-education-page-heading"> |
| 28 | <?php if ( isset( $heading_title ) ) : ?> |
| 29 | <h4> |
| 30 | <?php echo esc_html( $heading_title ); ?> |
| 31 | <?php if ( isset( $badge ) ) : ?> |
| 32 | <span class="wpforms-badge wpforms-badge-sm wpforms-badge-inline wpforms-badge-titanium wpforms-badge-rounded"><?php echo esc_html( $badge ); ?></span> |
| 33 | <?php endif; ?> |
| 34 | </h4> |
| 35 | <?php endif; ?> |
| 36 | <?php |
| 37 | if ( isset( $heading_description ) ) { |
| 38 | echo wp_kses_post( $heading_description ); |
| 39 | } |
| 40 | ?> |
| 41 | </div> |
| 42 | |
| 43 | <div class="wpforms-education-page-media"> |
| 44 | <div class="wpforms-education-page-images"> |
| 45 | <?php |
| 46 | if ( isset( $images ) ) : |
| 47 | foreach ( $images as $image ) : |
| 48 | ?> |
| 49 | <figure> |
| 50 | <div class="wpforms-education-page-images-image"> |
| 51 | <img src="<?php echo esc_url( $image['url'] ); ?>" alt="<?php echo esc_attr( $image['title'] ); ?>" /> |
| 52 | <a href="<?php echo esc_url( $image['url2x'] ); ?>" class="hover" data-lity data-lity-desc="<?php echo esc_attr( $image['title'] ); ?>"></a> |
| 53 | </div> |
| 54 | <figcaption><?php echo esc_html( $image['title'] ); ?></figcaption> |
| 55 | </figure> |
| 56 | <?php |
| 57 | endforeach; |
| 58 | endif; |
| 59 | ?> |
| 60 | </div> |
| 61 | </div> |
| 62 | |
| 63 | <div class="wpforms-education-page-caps"> |
| 64 | <?php if ( isset( $features_description ) ) : ?> |
| 65 | <p><?php echo esc_html( $features_description ); ?></p> |
| 66 | <?php endif; ?> |
| 67 | <ul> |
| 68 | <?php |
| 69 | if ( isset( $features ) ) : |
| 70 | foreach ( $features as $feature ) : |
| 71 | ?> |
| 72 | <li> |
| 73 | <i class="fa fa-solid fa-check"></i> |
| 74 | <?php echo esc_html( $feature ); ?> |
| 75 | </li> |
| 76 | <?php |
| 77 | endforeach; |
| 78 | endif; |
| 79 | ?> |
| 80 | </ul> |
| 81 | </div> |
| 82 | |
| 83 | <div class="wpforms-education-page-button"> |
| 84 | <?php |
| 85 | if ( isset( $action ) ) { |
| 86 | wpforms_edu_get_button( |
| 87 | $action, |
| 88 | $plugin_allow, |
| 89 | $path, |
| 90 | $url, |
| 91 | [ |
| 92 | 'medium' => $utm_medium, |
| 93 | 'content' => $utm_content, |
| 94 | ] |
| 95 | ); |
| 96 | } else { |
| 97 | printf( |
| 98 | '<a href="%s" target="_blank" rel="noopener noreferrer" class="wpforms-upgrade-modal wpforms-btn wpforms-btn-lg wpforms-btn-orange">%s</a>', |
| 99 | esc_url( wpforms_admin_upgrade_link( $utm_medium, $utm_content ) ), |
| 100 | esc_html__( 'Upgrade to WPForms Pro', 'wpforms-lite' ) |
| 101 | ); |
| 102 | } |
| 103 | ?> |
| 104 | </div> |
| 105 | </div> |
| 106 |