summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/widgets/eu-cookie-law/form.php')
-rw-r--r--plugins/jetpack/modules/widgets/eu-cookie-law/form.php37
1 files changed, 27 insertions, 10 deletions
diff --git a/plugins/jetpack/modules/widgets/eu-cookie-law/form.php b/plugins/jetpack/modules/widgets/eu-cookie-law/form.php
index d4f3bad2..7eb487e8 100644
--- a/plugins/jetpack/modules/widgets/eu-cookie-law/form.php
+++ b/plugins/jetpack/modules/widgets/eu-cookie-law/form.php
@@ -1,7 +1,13 @@
<?php
+/**
+ * EU Cookie Law Widget form.
+ *
+ * @package automattic/jetpack
+ */
use Automattic\Jetpack\Redirect;
+// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
?>
<p>
<strong>
@@ -84,10 +90,21 @@ use Automattic\Jetpack\Redirect;
<span class="notice notice-warning custom-policy" style="display: none;">
<span style="display: block; margin: .5em 0;">
<strong><?php esc_html_e( 'Caution:', 'jetpack' ); ?></strong>
- <?php echo sprintf(
- __( 'For GDPR compliance, please make sure your policy contains <a href="%s" target="_blank">privacy information relating to Jetpack Ads</a>.', 'jetpack' ),
+ <?php
+ echo sprintf(
+ wp_kses(
+ /* Translators: %s is the URL to a Jetpack support article. */
+ __( 'For GDPR compliance, please make sure your policy contains <a href="%s" target="_blank">privacy information relating to WordAds</a>.', 'jetpack' ),
+ array(
+ 'a' => array(
+ 'href' => array(),
+ 'target' => array(),
+ ),
+ )
+ ),
esc_url( Redirect::get_url( 'jetpack-support-ads', array( 'anchor' => 'privacy' ) ) )
- ); ?>
+ );
+ ?>
</span>
</span>
<?php endif; ?>
@@ -102,7 +119,7 @@ use Automattic\Jetpack\Redirect;
<label>
<input
class="widefat"
- name="<?php echo $this->get_field_name( 'policy-link-text' ); ?>"
+ name="<?php echo esc_attr( $this->get_field_name( 'policy-link-text' ) ); ?>"
type="text"
value="<?php echo esc_attr( $instance['policy-link-text'] ); ?>"
/>
@@ -118,7 +135,7 @@ use Automattic\Jetpack\Redirect;
<label>
<input
class="widefat"
- name="<?php echo $this->get_field_name( 'button' ); ?>"
+ name="<?php echo esc_attr( $this->get_field_name( 'button' ) ); ?>"
type="text"
value="<?php echo esc_attr( $instance['button'] ); ?>"
/>
@@ -129,7 +146,7 @@ use Automattic\Jetpack\Redirect;
<p>
<strong>
- <?php _ex( 'Capture consent & hide the banner', 'action', 'jetpack' ); ?>
+ <?php esc_html_x( 'Capture consent & hide the banner', 'action', 'jetpack' ); ?>
</strong>
<ul>
<li>
@@ -181,7 +198,7 @@ use Automattic\Jetpack\Redirect;
<?php if ( Jetpack::is_module_active( 'wordads' ) ) : ?>
<span class="notice notice-warning" style="display: block;">
<span style="display: block; margin: .5em 0;">
- <?php esc_html_e( 'Visitors must provide consent by clicking the dismiss button when Jetpack Ads is turned on.', 'jetpack' ); ?>
+ <?php esc_html_e( 'Visitors must provide consent by clicking the dismiss button when WordAds is turned on.', 'jetpack' ); ?>
</span>
</span>
<?php endif; ?>
@@ -191,7 +208,7 @@ use Automattic\Jetpack\Redirect;
<p>
<strong>
- <?php _ex( 'Consent expires after', 'action', 'jetpack' ); ?>
+ <?php esc_html_x( 'Consent expires after', 'action', 'jetpack' ); ?>
</strong>
<ul>
<li>
@@ -212,7 +229,7 @@ use Automattic\Jetpack\Redirect;
<p>
<strong>
- <?php _e( 'Color scheme', 'jetpack' ); ?>
+ <?php esc_html_e( 'Color scheme', 'jetpack' ); ?>
</strong>
<ul>
<li>
@@ -244,7 +261,7 @@ use Automattic\Jetpack\Redirect;
<p>
<strong>
- <?php _e( 'Position', 'jetpack' ); ?>
+ <?php esc_html_e( 'Position', 'jetpack' ); ?>
</strong>
<ul>
<li>