setting-use-adblocker.php
38 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The view to render the option. |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @var boolean $checked True, when the option is checked. |
| 7 | * @var boolean $is_main_site True, when the site is the main site of the current network. |
| 8 | */ |
| 9 | |
| 10 | ?> |
| 11 | <label> |
| 12 | <?php if ( $is_main_site ) : ?> |
| 13 | <input id="advanced-ads-use-adblocker" type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER ); ?>[use-adblocker]" <?php checked( $checked, 1, true ); ?>> |
| 14 | <?php else : ?> |
| 15 | <?php esc_html_e( 'The ad block disguise can only be set by the super admin on the main site in the network.', 'advanced-ads' ); ?> |
| 16 | <?php endif ?> |
| 17 | <?php esc_html_e( 'Prevents ad blockers from breaking your website when blocking asset files (.js, .css).', 'advanced-ads' ); ?> |
| 18 | <?php if ( ! defined( 'AAP_VERSION' ) ) : ?> |
| 19 | <p> |
| 20 | <?php |
| 21 | printf( |
| 22 | wp_kses( |
| 23 | /* translators: %s is a URL. */ |
| 24 | __( 'Learn how to display alternative content to ad block users <a href="%s" target="_blank">in the manual</a>.', 'advanced-ads' ), |
| 25 | [ |
| 26 | 'a' => [ |
| 27 | 'href' => [], |
| 28 | 'target' => [], |
| 29 | ], |
| 30 | ] |
| 31 | ), |
| 32 | 'https://wpadvancedads.com/manual/ad-blockers/#utm_source=advanced-ads&utm_medium=link&utm_campaign=adblock-manual' |
| 33 | ); |
| 34 | ?> |
| 35 | </p> |
| 36 | <?php endif; ?> |
| 37 | </label> |
| 38 |