| 1 |
<?php |
| 2 |
|
| 3 |
use WPCoder\Dashboard\FieldHelper; |
| 4 |
|
| 5 |
defined( 'ABSPATH' ) || exit; |
| 6 |
|
| 7 |
?> |
| 8 |
|
| 9 |
<div class="wowp-snippet__list"> |
| 10 |
|
| 11 |
|
| 12 |
<div class="wowp-snippet__item"> |
| 13 |
<div class="wowp-snippet__item-header"> |
| 14 |
<label for="enable_tracking_tool">Tracking Code Manager</label> |
| 15 |
<p class="wowp-snippet__item-description">Easily integrate your website with popular platforms like |
| 16 |
Google, Facebook, and Pinterest by adding their |
| 17 |
respective IDs, enabling seamless tracking and analytics.</p> |
| 18 |
</div> |
| 19 |
<div class="wowp-field has-checkbox"> |
| 20 |
<label class="switch"> |
| 21 |
<?php self::field( 'checkbox', 'enable_tracking_tool' ); ?> |
| 22 |
<span class="slider"></span> |
| 23 |
</label> |
| 24 |
</div> |
| 25 |
<div class="wowp-snippet__item-expand is-hidden"> |
| 26 |
<div class="wowp-fields__group"> |
| 27 |
|
| 28 |
<div class="wowp-field is-column"> |
| 29 |
<label><span class="label">Google Analytics</span> |
| 30 |
<?php self::field( 'text', 'tracking_tool_google', '', 'set tracking ID' ); ?> |
| 31 |
</label> |
| 32 |
<a target="_blank" href="https://support.google.com/analytics/answer/9539598?hl=en" rel="noopener noreferrer nofollow">How to |
| 33 |
find the tracking ID</a> |
| 34 |
</div> |
| 35 |
<div class="wowp-field is-column"> |
| 36 |
<label><span class="label">Facebook Pixel</span> |
| 37 |
<?php self::field( 'text', 'tracking_tool_facebook', '', 'set Pixel ID' ); ?> |
| 38 |
</label> |
| 39 |
<a target="_blank" |
| 40 |
href="https://en-gb.facebook.com/business/help/952192354843755?id=1205376682832142" rel="noopener noreferrer nofollow">How |
| 41 |
to find the Facebook pixel ID</a> |
| 42 |
</div> |
| 43 |
<div class="wowp-field is-column"> |
| 44 |
<label><span class="label">Pintrest Pixel</span> |
| 45 |
<?php self::field( 'text', 'tracking_tool_pintrest', '', 'set Pixel ID' ); ?> |
| 46 |
</label> |
| 47 |
<a target="_blank" |
| 48 |
href="https://help.pinterest.com/en/business/article/install-the-pinterest-tag" rel="noopener noreferrer nofollow">How to |
| 49 |
find the Pinterest pixel ID</a> |
| 50 |
</div> |
| 51 |
|
| 52 |
</div> |
| 53 |
</div> |
| 54 |
</div> |
| 55 |
|
| 56 |
<div class="wowp-snippet__item"> |
| 57 |
<div class="wowp-snippet__item-header"> |
| 58 |
<label for="enable_google_adsense">Google AdSense</label> |
| 59 |
<p class="wowp-snippet__item-description">Easily add Google AdSense to your WordPress site.</p> |
| 60 |
</div> |
| 61 |
<div class="wowp-field has-checkbox"> |
| 62 |
<label class="switch"> |
| 63 |
<?php self::field( 'checkbox', 'enable_google_adsense' ); ?> |
| 64 |
<span class="slider"></span> |
| 65 |
</label> |
| 66 |
</div> |
| 67 |
<div class="wowp-snippet__item-expand is-hidden"> |
| 68 |
<div class="wowp-field is-column"> |
| 69 |
<label> |
| 70 |
<span class="label">Publisher ID</span> |
| 71 |
<?php self::field( 'text', 'google_adsense_publisher', '', 'e.g pub-1234567890111213' ); ?> |
| 72 |
</label> |
| 73 |
<a target="_blank" |
| 74 |
href="https://support.google.com/adsense/answer/105516?hl=en" rel="noopener noreferrer nofollow">Find your publisher ID</a> |
| 75 |
</div> |
| 76 |
|
| 77 |
<p><b>Disable Google AdSense Ads for these user roles:</b></p> |
| 78 |
|
| 79 |
<div class="wowp-fields__group"> |
| 80 |
<?php foreach ( FieldHelper::user_roles() as $key => $value ) : |
| 81 |
if ( $key === 'all' ) { |
| 82 |
continue; |
| 83 |
} |
| 84 |
?> |
| 85 |
<div class="wowp-field has-checkbox"> |
| 86 |
<span class="label"><?php echo esc_html( $value ); ?></span> |
| 87 |
<label class="switch"> |
| 88 |
<?php self::field( 'checkbox', 'disable_google_adsense_user_' . $key ); ?> |
| 89 |
<span class="slider"></span> |
| 90 |
</label> |
| 91 |
</div> |
| 92 |
<?php endforeach; ?> |
| 93 |
</div> |
| 94 |
</div> |
| 95 |
</div> |
| 96 |
|
| 97 |
</div> |
| 98 |
|
| 99 |
<?php |
| 100 |
|