Changeset 2099672
- Timestamp:
- 06/03/2019 08:30:15 AM (7 years ago)
- File:
-
- 1 edited
-
wp-etracker/trunk/tracklet.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-etracker/trunk/tracklet.php
r2092835 r2099672 4 4 Plugin URI: https://developer.wordpress.org/plugins/wpetracker/ 5 5 Description: Analysiere dein WordPress mit etracker. 6 Version: 1.0. 96 Version: 1.0.10 7 7 Author: WP-etracker 8 8 Author URI: https://wp-etracker.com … … 50 50 // Init Plugin Scripts 51 51 add_action('admin_menu', array($this, 'wpetracker_add_admin_page')); 52 add_action('wp_enqueue_scripts', array($this, 'wpetracker_add_tracking_script')); 52 // K. Meffert: Optionally add etracker tracking code to footer instead of header 53 if(get_option('tracking_code_hf_option') == 'on') { 54 $toFooter=true; 55 add_action('wp_footer', array($this, 'wpetracker_add_tracking_script')); 56 } 57 else { 58 $toFooter=false; 59 add_action('wp_enqueue_scripts', array($this, 'wpetracker_add_tracking_script')); 60 } 61 53 62 add_action('wp_print_scripts', array($this, 'wpetracker_ajax_load_scripts')); 54 63 … … 58 67 add_action('wp_ajax_auto_update', array($this, 'wpetracker_auto_update')); 59 68 add_action('wp_ajax_youtube_tracking', array($this, 'wpetracker_youtube_tracking')); 69 add_action('wp_ajax_tracking_code_hf', array($this, 'wpetracker_tracking_code_hf')); 60 70 add_action('wp_ajax_wpetracker_accept_tos', array($this, 'wpetracker_accept_tos')); 61 71 … … 153 163 154 164 /** 165 * Allow to disable YouTube tracking 155 166 * @author Dr. Klaus Meffert 156 167 * @email mail@doktor-meffert,de … … 162 173 } 163 174 175 /** 176 * Allow to add tracking code either to header or to footer of page 177 * @author Dr. Klaus Meffert 178 * @email mail@doktor-meffert,de 179 * -------------------------------------------- 180 * Function wpetracker_tracking_code_hf 181 */ 182 function wpetracker_tracking_code_hf() { 183 update_option('tracking_code_hf_option', $_POST['item']); 184 } 164 185 function wpetracker_accept_tos() { 165 186 $updateTos = update_option('wpetracker_accept_tos', $_POST['accept_tos_value']); … … 224 245 $wpetrackerKey = get_option('wpetracker-key'); 225 246 //K. Meffert: Add own plugin version to etracker call (as requested by etracker) 226 // $wp_version_plugin="1.0.9";227 247 $plugin_data = get_plugin_data( __FILE__ ); 228 248 $wp_version_plugin = $plugin_data['Version']; … … 342 362 343 363 function wpetracker_add_tracking_script() { 344 if (get_option('wpetracker_accept_tos') == 'on') : 364 if (get_option('wpetracker_accept_tos') == 'on') { 365 // wp_enqueue_script('etracker-tracking',$code,); 345 366 Tracklet::wpetracker_get_main_tracking_script(); 346 endif;367 } 347 368 } 348 369
Note: See TracChangeset
for help on using the changeset viewer.