| 1 |
<?php |
| 2 |
/** |
| 3 |
* Displays the wizard licenses step |
| 4 |
* |
| 5 |
* @package Polylang |
| 6 |
* |
| 7 |
* @since 2.7 |
| 8 |
*/ |
| 9 |
|
| 10 |
defined( 'ABSPATH' ) || exit; |
| 11 |
|
| 12 |
$licenses = apply_filters( 'pll_settings_licenses', array() ); |
| 13 |
$is_error = isset( $_GET['activate_error'] ) && 'i18n_license_key_error' === sanitize_key( $_GET['activate_error'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended |
| 14 |
?> |
| 15 |
<p> |
| 16 |
<?php esc_html_e( 'You are using plugins which require a license key.', 'polylang' ); ?> |
| 17 |
<?php |
| 18 |
if ( 1 === count( $licenses ) ) { |
| 19 |
echo esc_html( __( 'Please enter your license key:', 'polylang' ) ); |
| 20 |
} else { |
| 21 |
echo esc_html( __( 'Please enter your license keys:', 'polylang' ) ); |
| 22 |
} |
| 23 |
?> |
| 24 |
</p> |
| 25 |
<h2><?php esc_html_e( 'Licenses', 'polylang' ); ?></h2> |
| 26 |
<div id="messages"> |
| 27 |
<?php if ( $is_error ) : ?> |
| 28 |
<p class="error"><?php esc_html_e( 'There is an error with a license key.', 'polylang' ); ?></p> |
| 29 |
<?php endif; ?> |
| 30 |
</div> |
| 31 |
<div class="form-field"> |
| 32 |
<table id="pll-licenses-table" class="form-table pll-table-top"> |
| 33 |
<tbody> |
| 34 |
<?php |
| 35 |
foreach ( $licenses as $license ) { |
| 36 |
// Escaping is already done in get_form_field method. |
| 37 |
echo $license->get_form_field(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 38 |
} |
| 39 |
?> |
| 40 |
</tbody> |
| 41 |
</table> |
| 42 |
</div> |
| 43 |
|