Changeset 2555548
- Timestamp:
- 06/29/2021 04:51:57 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
microsoft-advertising-universal-event-tracking-uet/trunk/wp-uet-plugin.php
r2531528 r2555548 7 7 * Plugin URI: https://ads.microsoft.com/ 8 8 * Description: The official plugin for setting up Microsoft Advertising UET. 9 * Version: 1.0. 29 * Version: 1.0.3 10 10 * Author: Microsoft Corporation 11 11 * Author URI: https://www.microsoft.com/ … … 31 31 function UetIsTagAvailable() { 32 32 $options = get_option('UetTagSettings'); 33 return !empty($options[ uet_tag_id]);33 return !empty($options['uet_tag_id']); 34 34 } 35 35 … … 39 39 <script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"<?php 40 40 $options = get_option('UetTagSettings'); 41 echo "$options[uet_tag_id]" 42 ?>",tm:"wpp_1.0.2"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");</script> 41 $uet_tag_id = $options['uet_tag_id']; 42 echo "{$uet_tag_id}" 43 ?>",tm:"wpp_1.0.3"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");</script> 43 44 <?php 44 45 return null; … … 76 77 $options = get_option('UetTagSettings'); 77 78 include 'tagid.php'; 78 if (empty($options[ uet_tag_id]) && !empty($tagid)) {79 if (empty($options['uet_tag_id']) && !empty($tagid)) { 79 80 if (ctype_digit($tagid)) { 80 $options[ uet_tag_id] = $tagid;81 $options['uet_tag_id'] = $tagid; 81 82 update_option('UetTagSettings', $options); 82 83 } … … 93 94 function UetEchoTagId() { 94 95 $options = get_option('UetTagSettings'); 95 echo "<input id='uet_tag_id' name='UetTagSettings[uet_tag_id]' type='text' value='$options[uet_tag_id]' />"; 96 $uet_tag_id = ''; 97 if(isset($options['uet_tag_id'])){ 98 $uet_tag_id = $options['uet_tag_id']; 99 } 100 echo "<input id='uet_tag_id' name='UetTagSettings[uet_tag_id]' type='text' value='{$uet_tag_id}' />"; 96 101 } 97 102
Note: See TracChangeset
for help on using the changeset viewer.