Changeset 2531528
- Timestamp:
- 05/14/2021 04:55:10 AM (5 years ago)
- Location:
- microsoft-advertising-universal-event-tracking-uet/trunk
- Files:
-
- 1 added
- 1 edited
-
tagid.php (added)
-
wp-uet-plugin.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
microsoft-advertising-universal-event-tracking-uet/trunk/wp-uet-plugin.php
r2492820 r2531528 7 7 * Plugin URI: https://ads.microsoft.com/ 8 8 * Description: The official plugin for setting up Microsoft Advertising UET. 9 * Version: 1.0. 09 * Version: 1.0.2 10 10 * Author: Microsoft Corporation 11 11 * Author URI: https://www.microsoft.com/ 12 12 * License: MIT license 13 13 */ 14 15 // NOTE: If you update 'Version' above, update the 'tm' parameter in the script, around line 42. 14 16 15 17 // … … 21 23 add_action('admin_notices', 'UetShowAdminNotice'); // To show an admin banner when UET is not setup correctly. 22 24 add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'UetAddSettingsLinkOnPluginDashboard'); // To add a link to the settings page from the plugin dashboard 25 26 27 register_activation_hook( __FILE__, function() { 28 add_option('Activated_Plugin','microsoft-advertising-universal-event-tracking-uet'); 29 }); 23 30 24 31 function UetIsTagAvailable() { … … 33 40 $options = get_option('UetTagSettings'); 34 41 echo "$options[uet_tag_id]" 35 ?>",tm:"wpp_1.0. 0"};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>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> 36 43 <?php 37 44 return null; … … 63 70 add_settings_section('uet_general_settings_section', '', 'UetRenderGeneralSettingsSectionHeader', 'uet_tag_settings_page'); 64 71 add_settings_field('uet_tag_id', 'UET Tag ID', 'UetEchoTagId', 'uet_tag_settings_page', 'uet_general_settings_section'); 72 73 if(is_admin() && get_option('Activated_Plugin') == 'microsoft-advertising-universal-event-tracking-uet') { 74 delete_option('Activated_Plugin'); 75 76 $options = get_option('UetTagSettings'); 77 include 'tagid.php'; 78 if (empty($options[uet_tag_id]) && !empty($tagid)) { 79 if (ctype_digit($tagid)) { 80 $options[uet_tag_id] = $tagid; 81 update_option('UetTagSettings', $options); 82 } 83 } 84 } 65 85 } 66 86
Note: See TracChangeset
for help on using the changeset viewer.