Keine Beschreibung

form.php 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <?php
  2. use Automattic\Jetpack\Redirect;
  3. ?>
  4. <p>
  5. <strong>
  6. <?php esc_html_e( 'Banner text', 'jetpack' ); ?>
  7. </strong>
  8. <ul>
  9. <li>
  10. <label>
  11. <input
  12. <?php checked( $instance['text'], 'default' ); ?>
  13. name="<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>"
  14. type="radio"
  15. value="default"
  16. />
  17. <?php esc_html_e( 'Default', 'jetpack' ); ?>
  18. </label>
  19. </li>
  20. <li>
  21. <label>
  22. <input
  23. <?php checked( $instance['text'], 'custom' ); ?>
  24. name="<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>"
  25. type="radio"
  26. value="custom"
  27. />
  28. <?php esc_html_e( 'Custom:', 'jetpack' ); ?>
  29. </label>
  30. </li>
  31. </ul>
  32. <textarea
  33. class="widefat"
  34. name="<?php echo esc_attr( $this->get_field_name( 'customtext' ) ); ?>"
  35. placeholder="<?php echo esc_attr( $instance['default-text'] ); ?>"
  36. ><?php echo esc_html( $instance['customtext'] ); ?></textarea>
  37. </p>
  38. <hr />
  39. <p>
  40. <strong>
  41. <?php esc_html_e( 'Privacy Policy Link', 'jetpack' ); ?>
  42. </strong>
  43. <ul class="eu-cookie-law-widget-policy-url">
  44. <li>
  45. <label>
  46. <input
  47. <?php checked( $instance['policy-url'], 'default' ); ?>
  48. name="<?php echo esc_attr( $this->get_field_name( 'policy-url' ) ); ?>"
  49. type="radio"
  50. value="default"
  51. />
  52. <?php esc_html_e( 'Default', 'jetpack' ); ?>
  53. </label>
  54. </li>
  55. <li>
  56. <label>
  57. <input
  58. <?php checked( $instance['policy-url'], 'custom' ); ?>
  59. name="<?php echo esc_attr( $this->get_field_name( 'policy-url' ) ); ?>"
  60. type="radio"
  61. value="custom"
  62. />
  63. <?php esc_html_e( 'Custom URL:', 'jetpack' ); ?>
  64. </label>
  65. <input
  66. class="widefat"
  67. name="<?php echo esc_attr( $this->get_field_name( 'custom-policy-url' ) ); ?>"
  68. placeholder="<?php echo esc_url( $instance['default-policy-url'] ); ?>"
  69. style="margin-top: .5em;"
  70. type="text"
  71. value="<?php echo esc_url( $instance['custom-policy-url'] ); ?>"
  72. />
  73. <span class="notice notice-warning default-policy" style="display: none;">
  74. <span style="display: block; margin: .5em 0;">
  75. <strong><?php esc_html_e( 'Caution:', 'jetpack' ); ?></strong>
  76. <?php esc_html_e( 'The default policy URL only covers cookies set by Jetpack. If you’re running other plugins, custom cookies, or third-party tracking technologies, you should create and link to your own cookie statement.', 'jetpack' ); ?>
  77. </span>
  78. </span>
  79. <?php if ( Jetpack::is_module_active( 'wordads' ) ) : ?>
  80. <span class="notice notice-warning custom-policy" style="display: none;">
  81. <span style="display: block; margin: .5em 0;">
  82. <strong><?php esc_html_e( 'Caution:', 'jetpack' ); ?></strong>
  83. <?php echo sprintf(
  84. __( 'For GDPR compliance, please make sure your policy contains <a href="%s" target="_blank">privacy information relating to Jetpack Ads</a>.', 'jetpack' ),
  85. esc_url( Redirect::get_url( 'jetpack-support-ads', array( 'anchor' => 'privacy' ) ) )
  86. ); ?>
  87. </span>
  88. </span>
  89. <?php endif; ?>
  90. </li>
  91. </ul>
  92. </p>
  93. <p>
  94. <strong>
  95. <?php esc_html_e( 'Link text', 'jetpack' ); ?>
  96. </strong>
  97. <label>
  98. <input
  99. class="widefat"
  100. name="<?php echo $this->get_field_name( 'policy-link-text' ); ?>"
  101. type="text"
  102. value="<?php echo esc_attr( $instance['policy-link-text'] ); ?>"
  103. />
  104. </label>
  105. </p>
  106. <hr />
  107. <p>
  108. <strong>
  109. <?php esc_html_e( 'Button text', 'jetpack' ); ?>
  110. </strong>
  111. <label>
  112. <input
  113. class="widefat"
  114. name="<?php echo $this->get_field_name( 'button' ); ?>"
  115. type="text"
  116. value="<?php echo esc_attr( $instance['button'] ); ?>"
  117. />
  118. </label>
  119. </p>
  120. <hr />
  121. <p>
  122. <strong>
  123. <?php _ex( 'Capture consent & hide the banner', 'action', 'jetpack' ); ?>
  124. </strong>
  125. <ul>
  126. <li>
  127. <label>
  128. <input
  129. <?php checked( $instance['hide'], 'button' ); ?>
  130. name="<?php echo esc_attr( $this->get_field_name( 'hide' ) ); ?>"
  131. type="radio"
  132. value="button"
  133. <?php echo Jetpack::is_module_active( 'wordads' ) ? 'disabled' : ''; ?>
  134. />
  135. <?php esc_html_e( 'after the user clicks the dismiss button', 'jetpack' ); ?>
  136. </label>
  137. </li>
  138. <li>
  139. <label>
  140. <input
  141. <?php checked( $instance['hide'], 'scroll' ); ?>
  142. name="<?php echo esc_attr( $this->get_field_name( 'hide' ) ); ?>"
  143. type="radio"
  144. value="scroll"
  145. <?php echo Jetpack::is_module_active( 'wordads' ) ? 'disabled' : ''; ?>
  146. />
  147. <?php esc_html_e( 'after the user scrolls the page', 'jetpack' ); ?>
  148. </label>
  149. </li>
  150. <li>
  151. <label>
  152. <input
  153. <?php checked( $instance['hide'], 'time' ); ?>
  154. name="<?php echo esc_attr( $this->get_field_name( 'hide' ) ); ?>"
  155. type="radio"
  156. value="time"
  157. <?php echo Jetpack::is_module_active( 'wordads' ) ? 'disabled' : ''; ?>
  158. />
  159. <?php esc_html_e( 'after this amount of time', 'jetpack' ); ?>
  160. </label>
  161. <input
  162. max="1000"
  163. min="3"
  164. name="<?php echo esc_attr( $this->get_field_name( 'hide-timeout' ) ); ?>"
  165. style="padding: 3px 5px; width: 3em;"
  166. type="number"
  167. value="<?php echo esc_attr( $instance['hide-timeout'] ); ?>"
  168. />
  169. <?php esc_html_e( 'seconds', 'jetpack' ); ?>
  170. </li>
  171. </ul>
  172. <?php if ( Jetpack::is_module_active( 'wordads' ) ) : ?>
  173. <span class="notice notice-warning" style="display: block;">
  174. <span style="display: block; margin: .5em 0;">
  175. <?php esc_html_e( 'Visitors must provide consent by clicking the dismiss button when Jetpack Ads is turned on.', 'jetpack' ); ?>
  176. </span>
  177. </span>
  178. <?php endif; ?>
  179. </p>
  180. <hr />
  181. <p>
  182. <strong>
  183. <?php _ex( 'Consent expires after', 'action', 'jetpack' ); ?>
  184. </strong>
  185. <ul>
  186. <li>
  187. <input
  188. max="365"
  189. min="1"
  190. name="<?php echo esc_attr( $this->get_field_name( 'consent-expiration' ) ); ?>"
  191. style="padding: 3px 5px; width: 3.75em;"
  192. type="number"
  193. value="<?php echo esc_attr( $instance['consent-expiration'] ); ?>"
  194. />
  195. <?php esc_html_e( 'days', 'jetpack' ); ?>
  196. </li>
  197. </ul>
  198. </p>
  199. <hr />
  200. <p>
  201. <strong>
  202. <?php _e( 'Color scheme', 'jetpack' ); ?>
  203. </strong>
  204. <ul>
  205. <li>
  206. <label>
  207. <input
  208. <?php checked( $instance['color-scheme'], 'default' ); ?>
  209. name="<?php echo esc_attr( $this->get_field_name( 'color-scheme' ) ); ?>"
  210. type="radio"
  211. value="default"
  212. />
  213. <?php esc_html_e( 'Light', 'jetpack' ); ?>
  214. </label>
  215. </li>
  216. <li>
  217. <label>
  218. <input
  219. <?php checked( $instance['color-scheme'], 'negative' ); ?>
  220. name="<?php echo esc_attr( $this->get_field_name( 'color-scheme' ) ); ?>"
  221. type="radio"
  222. value="negative"
  223. />
  224. <?php esc_html_e( 'Dark', 'jetpack' ); ?>
  225. </label>
  226. </li>
  227. </ul>
  228. </p>
  229. <hr />
  230. <p>
  231. <strong>
  232. <?php _e( 'Position', 'jetpack' ); ?>
  233. </strong>
  234. <ul>
  235. <li>
  236. <label>
  237. <input
  238. <?php checked( $instance['position'], 'bottom' ); ?>
  239. name="<?php echo esc_attr( $this->get_field_name( 'position' ) ); ?>"
  240. type="radio"
  241. value="bottom"
  242. />
  243. <?php esc_html_e( 'Bottom', 'jetpack' ); ?>
  244. </label>
  245. </li>
  246. <li>
  247. <label>
  248. <input
  249. <?php checked( $instance['position'], 'top' ); ?>
  250. name="<?php echo esc_attr( $this->get_field_name( 'position' ) ); ?>"
  251. type="radio"
  252. value="top"
  253. />
  254. <?php esc_html_e( 'Top', 'jetpack' ); ?>
  255. </label>
  256. </li>
  257. </ul>
  258. </p>
  259. <hr />
  260. <p class="small">
  261. <?php esc_html_e( 'It is your own responsibility to ensure that your site complies with the relevant laws.', 'jetpack' ); ?>
  262. <a href="<?php echo esc_url( Redirect::get_url( 'jetpack-support-extra-sidebar-widgets-eu-cookie-law-widget' ) ); ?>">
  263. <?php esc_html_e( 'Click here for more information', 'jetpack' ); ?>
  264. </a>
  265. </p>