Changeset 1048297
- Timestamp:
- 12/18/2014 05:16:11 PM (11 years ago)
- Location:
- tracking-script-manager
- Files:
-
- 4 edited
- 1 copied
-
tags/1.0.6 (copied) (copied from tracking-script-manager/trunk)
-
tags/1.0.6/readme.txt (modified) (3 diffs)
-
tags/1.0.6/tracking-scripts.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/tracking-scripts.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tracking-script-manager/tags/1.0.6/readme.txt
r987508 r1048297 5 5 Requires at least: 3.0.1 6 6 Tested up to: 4.0 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 == Changelog == 44 44 45 = 1.0.6 = 46 * Fixed some php warnings 47 45 48 = 1.0.5 = 46 49 * Fixed decoding issue … … 63 66 == Upgrade Notice == 64 67 68 = 1.0.6 = 69 Fixed some php warnings 70 65 71 = 1.0.5 = 66 72 Fixed decoding issue -
tracking-script-manager/tags/1.0.6/tracking-scripts.php
r987510 r1048297 161 161 <?php $header_scripts = unserialize(get_option(WP_HEADER_TRACKING_SCRIPT)); $i = 1; ?> 162 162 <div class="tracking_scripts"> 163 <?php foreach($header_scripts as $script) { ?> 164 <div class="tracking_script"> 165 <i class="fa fa-sort" title="Drag to Sort"></i> 166 <p><?php echo $i; ?></p> 167 <div class="script_info"> 168 <input type="text" name="header_script_<?php echo $i; ?>_name" value="<?php echo $script->script_name; ?>" readonly="readonly"> 169 <input type="text" name="header_script_<?php echo $i; ?>_code" value="<?php echo $script->script_code; ?>" readonly="readonly"> 170 </div> 171 <i class="active_tracking fa <?php if($script->active === true) { echo 'fa-check-circle'; } else { echo 'fa-circle-o'; } ?>" title="<?php if($script->active === true) { echo 'Deactivate Script'; } else { echo 'Activate Script'; } ?>"></i> 172 <i class="edit_tracking fa fa-edit" title="Edit Script"></i> 173 <i class="delete_tracking fa fa-times" title="Delete Script"></i> 174 <input type="hidden" class="script_order" name="header_script_<?php echo $i; ?>_order" value="<?php echo $i; ?>"> 175 <input type="hidden" class="script_active" name="header_script_<?php echo $i; ?>_active" value="<?php if($script->active === true) { echo 'true'; } else { echo 'false'; } ?>"> 176 <input type="hidden" class="script_exists" name="header_script_<?php echo $i; ?>_exists" value="true"> 177 </div> 178 <?php $i++; } ?> 163 <?php if($header_scripts) { ?> 164 <?php foreach($header_scripts as $script) { ?> 165 <div class="tracking_script"> 166 <i class="fa fa-sort" title="Drag to Sort"></i> 167 <p><?php echo $i; ?></p> 168 <div class="script_info"> 169 <input type="text" name="header_script_<?php echo $i; ?>_name" value="<?php echo $script->script_name; ?>" readonly="readonly"> 170 <input type="text" name="header_script_<?php echo $i; ?>_code" value="<?php echo $script->script_code; ?>" readonly="readonly"> 171 </div> 172 <i class="active_tracking fa <?php if($script->active === true) { echo 'fa-check-circle'; } else { echo 'fa-circle-o'; } ?>" title="<?php if($script->active === true) { echo 'Deactivate Script'; } else { echo 'Activate Script'; } ?>"></i> 173 <i class="edit_tracking fa fa-edit" title="Edit Script"></i> 174 <i class="delete_tracking fa fa-times" title="Delete Script"></i> 175 <input type="hidden" class="script_order" name="header_script_<?php echo $i; ?>_order" value="<?php echo $i; ?>"> 176 <input type="hidden" class="script_active" name="header_script_<?php echo $i; ?>_active" value="<?php if($script->active === true) { echo 'true'; } else { echo 'false'; } ?>"> 177 <input type="hidden" class="script_exists" name="header_script_<?php echo $i; ?>_exists" value="true"> 178 </div> 179 <?php $i++; } ?> 180 <?php } ?> 179 181 </div> 180 182 </div> … … 183 185 <?php $footer_scripts = unserialize(get_option(WP_FOOTER_TRACKING_SCRIPT)); $i = 1; ?> 184 186 <div class="tracking_scripts"> 185 <?php foreach($footer_scripts as $script) { ?> 186 <div class="tracking_script"> 187 <i class="fa fa-sort" title="Drag to Sort"></i> 188 <p><?php echo $i; ?></p> 189 <div class="script_info"> 190 <input type="text" name="footer_script_<?php echo $i; ?>_name" value="<?php echo $script->script_name; ?>" readonly="readonly"> 191 <input type="text" name="footer_script_<?php echo $i; ?>_code" value="<?php echo $script->script_code; ?>" readonly="readonly"> 192 </div> 193 <i class="active_tracking fa <?php if($script->active === true) { echo 'fa-check-circle'; } else { echo 'fa-circle-o'; } ?>" title="<?php if($script->active === true) { echo 'Deactivate Script'; } else { echo 'Activate Script'; } ?>"></i> 194 <i class="edit_tracking fa fa-edit" title="Edit Script"></i> 195 <i class="delete_tracking fa fa-times" title="Delete Script"></i> 196 <input type="hidden" class="script_order" name="footer_script_<?php echo $i; ?>_order" value="<?php echo $i; ?>"> 197 <input type="hidden" class="script_active" name="footer_script_<?php echo $i; ?>_active" value="<?php if($script->active === true) { echo 'true'; } else { echo 'false'; } ?>"> 198 <input type="hidden" class="script_exists" name="footer_script_<?php echo $i; ?>_exists" value="true"> 199 </div> 200 <?php $i++; } ?> 187 <?php if($footer_scripts) { ?> 188 <?php foreach($footer_scripts as $script) { ?> 189 <div class="tracking_script"> 190 <i class="fa fa-sort" title="Drag to Sort"></i> 191 <p><?php echo $i; ?></p> 192 <div class="script_info"> 193 <input type="text" name="footer_script_<?php echo $i; ?>_name" value="<?php echo $script->script_name; ?>" readonly="readonly"> 194 <input type="text" name="footer_script_<?php echo $i; ?>_code" value="<?php echo $script->script_code; ?>" readonly="readonly"> 195 </div> 196 <i class="active_tracking fa <?php if($script->active === true) { echo 'fa-check-circle'; } else { echo 'fa-circle-o'; } ?>" title="<?php if($script->active === true) { echo 'Deactivate Script'; } else { echo 'Activate Script'; } ?>"></i> 197 <i class="edit_tracking fa fa-edit" title="Edit Script"></i> 198 <i class="delete_tracking fa fa-times" title="Delete Script"></i> 199 <input type="hidden" class="script_order" name="footer_script_<?php echo $i; ?>_order" value="<?php echo $i; ?>"> 200 <input type="hidden" class="script_active" name="footer_script_<?php echo $i; ?>_active" value="<?php if($script->active === true) { echo 'true'; } else { echo 'false'; } ?>"> 201 <input type="hidden" class="script_exists" name="footer_script_<?php echo $i; ?>_exists" value="true"> 202 </div> 203 <?php $i++; } ?> 204 <?php } ?> 201 205 </div> 202 206 </div> … … 273 277 274 278 $i = 1; 275 foreach($header_scripts as $script) { 276 if($_POST['header_script_'.$i.'_name']) { 277 $script->script_name = sanitize_text_field($_POST['header_script_'.$i.'_name']); 279 if($header_scripts) { 280 foreach($header_scripts as $script) { 281 if($_POST['header_script_'.$i.'_name']) { 282 $script->script_name = sanitize_text_field($_POST['header_script_'.$i.'_name']); 283 } 284 if($_POST['header_script_'.$i.'_code']) { 285 $script->script_code = stripslashes(esc_textarea($_POST['header_script_'.$i.'_code'])); 286 } 287 if($_POST['header_script_'.$i.'_active']) { 288 if($_POST['header_script_'.$i.'_active'] === 'false') { 289 $script->active = false; 290 } else { 291 $script->active = true; 292 } 293 } 294 if($_POST['header_script_'.$i.'_order']) { 295 $order = filter_input(INPUT_POST, 'header_script_'.$i.'_order', FILTER_VALIDATE_INT); 296 if(is_int($order)) { 297 $script->order = $order; 298 } 299 } 300 if($_POST['header_script_'.$i.'_exists']) { 301 if($_POST['header_script_'.$i.'_exists'] === 'false') { 302 unset($header_scripts[$i-1]); 303 } 304 } 305 306 $i++; 278 307 } 279 if($_POST['header_script_'.$i.'_code']) { 280 $script->script_code = stripslashes(esc_textarea($_POST['header_script_'.$i.'_code'])); 308 } 309 310 $i = 1; 311 if($footer_scripts) { 312 foreach($footer_scripts as $script) { 313 if($_POST['footer_script_'.$i.'_name']) { 314 $script->script_name = sanitize_text_field($_POST['footer_script_'.$i.'_name']); 315 } 316 if($_POST['footer_script_'.$i.'_code']) { 317 $script->script_code = stripslashes(esc_textarea($_POST['footer_script_'.$i.'_code'])); 318 } 319 if($_POST['footer_script_'.$i.'_active']) { 320 if($_POST['footer_script_'.$i.'_active'] === 'false') { 321 $script->active = false; 322 } else { 323 $script->active = true; 324 } 325 } 326 if($_POST['footer_script_'.$i.'_order']) { 327 $order = filter_input(INPUT_POST, 'footer_script_'.$i.'_order', FILTER_VALIDATE_INT); 328 if(is_int($order)) { 329 $script->order = $order; 330 } 331 } 332 if($_POST['footer_script_'.$i.'_exists']) { 333 if($_POST['footer_script_'.$i.'_exists'] === 'false') { 334 unset($footer_scripts[$i-1]); 335 } 336 } 337 338 $i++; 281 339 } 282 if($_POST['header_script_'.$i.'_active']) {283 if($_POST['header_script_'.$i.'_active'] === 'false') {284 $script->active = false;285 } else {286 $script->active = true;287 }288 }289 if($_POST['header_script_'.$i.'_order']) {290 $order = filter_input(INPUT_POST, 'header_script_'.$i.'_order', FILTER_VALIDATE_INT);291 if(is_int($order)) {292 $script->order = $order;293 }294 }295 if($_POST['header_script_'.$i.'_exists']) {296 if($_POST['header_script_'.$i.'_exists'] === 'false') {297 unset($header_scripts[$i-1]);298 }299 }300 301 $i++;302 }303 304 $i = 1;305 foreach($footer_scripts as $script) {306 if($_POST['footer_script_'.$i.'_name']) {307 $script->script_name = sanitize_text_field($_POST['footer_script_'.$i.'_name']);308 }309 if($_POST['footer_script_'.$i.'_code']) {310 $script->script_code = stripslashes(esc_textarea($_POST['footer_script_'.$i.'_code']));311 }312 if($_POST['footer_script_'.$i.'_active']) {313 if($_POST['footer_script_'.$i.'_active'] === 'false') {314 $script->active = false;315 } else {316 $script->active = true;317 }318 }319 if($_POST['footer_script_'.$i.'_order']) {320 $order = filter_input(INPUT_POST, 'footer_script_'.$i.'_order', FILTER_VALIDATE_INT);321 if(is_int($order)) {322 $script->order = $order;323 }324 }325 if($_POST['footer_script_'.$i.'_exists']) {326 if($_POST['footer_script_'.$i.'_exists'] === 'false') {327 unset($footer_scripts[$i-1]);328 }329 }330 331 $i++;332 340 } 333 341 -
tracking-script-manager/trunk/readme.txt
r987508 r1048297 5 5 Requires at least: 3.0.1 6 6 Tested up to: 4.0 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 == Changelog == 44 44 45 = 1.0.6 = 46 * Fixed some php warnings 47 45 48 = 1.0.5 = 46 49 * Fixed decoding issue … … 63 66 == Upgrade Notice == 64 67 68 = 1.0.6 = 69 Fixed some php warnings 70 65 71 = 1.0.5 = 66 72 Fixed decoding issue -
tracking-script-manager/trunk/tracking-scripts.php
r987510 r1048297 161 161 <?php $header_scripts = unserialize(get_option(WP_HEADER_TRACKING_SCRIPT)); $i = 1; ?> 162 162 <div class="tracking_scripts"> 163 <?php foreach($header_scripts as $script) { ?> 164 <div class="tracking_script"> 165 <i class="fa fa-sort" title="Drag to Sort"></i> 166 <p><?php echo $i; ?></p> 167 <div class="script_info"> 168 <input type="text" name="header_script_<?php echo $i; ?>_name" value="<?php echo $script->script_name; ?>" readonly="readonly"> 169 <input type="text" name="header_script_<?php echo $i; ?>_code" value="<?php echo $script->script_code; ?>" readonly="readonly"> 170 </div> 171 <i class="active_tracking fa <?php if($script->active === true) { echo 'fa-check-circle'; } else { echo 'fa-circle-o'; } ?>" title="<?php if($script->active === true) { echo 'Deactivate Script'; } else { echo 'Activate Script'; } ?>"></i> 172 <i class="edit_tracking fa fa-edit" title="Edit Script"></i> 173 <i class="delete_tracking fa fa-times" title="Delete Script"></i> 174 <input type="hidden" class="script_order" name="header_script_<?php echo $i; ?>_order" value="<?php echo $i; ?>"> 175 <input type="hidden" class="script_active" name="header_script_<?php echo $i; ?>_active" value="<?php if($script->active === true) { echo 'true'; } else { echo 'false'; } ?>"> 176 <input type="hidden" class="script_exists" name="header_script_<?php echo $i; ?>_exists" value="true"> 177 </div> 178 <?php $i++; } ?> 163 <?php if($header_scripts) { ?> 164 <?php foreach($header_scripts as $script) { ?> 165 <div class="tracking_script"> 166 <i class="fa fa-sort" title="Drag to Sort"></i> 167 <p><?php echo $i; ?></p> 168 <div class="script_info"> 169 <input type="text" name="header_script_<?php echo $i; ?>_name" value="<?php echo $script->script_name; ?>" readonly="readonly"> 170 <input type="text" name="header_script_<?php echo $i; ?>_code" value="<?php echo $script->script_code; ?>" readonly="readonly"> 171 </div> 172 <i class="active_tracking fa <?php if($script->active === true) { echo 'fa-check-circle'; } else { echo 'fa-circle-o'; } ?>" title="<?php if($script->active === true) { echo 'Deactivate Script'; } else { echo 'Activate Script'; } ?>"></i> 173 <i class="edit_tracking fa fa-edit" title="Edit Script"></i> 174 <i class="delete_tracking fa fa-times" title="Delete Script"></i> 175 <input type="hidden" class="script_order" name="header_script_<?php echo $i; ?>_order" value="<?php echo $i; ?>"> 176 <input type="hidden" class="script_active" name="header_script_<?php echo $i; ?>_active" value="<?php if($script->active === true) { echo 'true'; } else { echo 'false'; } ?>"> 177 <input type="hidden" class="script_exists" name="header_script_<?php echo $i; ?>_exists" value="true"> 178 </div> 179 <?php $i++; } ?> 180 <?php } ?> 179 181 </div> 180 182 </div> … … 183 185 <?php $footer_scripts = unserialize(get_option(WP_FOOTER_TRACKING_SCRIPT)); $i = 1; ?> 184 186 <div class="tracking_scripts"> 185 <?php foreach($footer_scripts as $script) { ?> 186 <div class="tracking_script"> 187 <i class="fa fa-sort" title="Drag to Sort"></i> 188 <p><?php echo $i; ?></p> 189 <div class="script_info"> 190 <input type="text" name="footer_script_<?php echo $i; ?>_name" value="<?php echo $script->script_name; ?>" readonly="readonly"> 191 <input type="text" name="footer_script_<?php echo $i; ?>_code" value="<?php echo $script->script_code; ?>" readonly="readonly"> 192 </div> 193 <i class="active_tracking fa <?php if($script->active === true) { echo 'fa-check-circle'; } else { echo 'fa-circle-o'; } ?>" title="<?php if($script->active === true) { echo 'Deactivate Script'; } else { echo 'Activate Script'; } ?>"></i> 194 <i class="edit_tracking fa fa-edit" title="Edit Script"></i> 195 <i class="delete_tracking fa fa-times" title="Delete Script"></i> 196 <input type="hidden" class="script_order" name="footer_script_<?php echo $i; ?>_order" value="<?php echo $i; ?>"> 197 <input type="hidden" class="script_active" name="footer_script_<?php echo $i; ?>_active" value="<?php if($script->active === true) { echo 'true'; } else { echo 'false'; } ?>"> 198 <input type="hidden" class="script_exists" name="footer_script_<?php echo $i; ?>_exists" value="true"> 199 </div> 200 <?php $i++; } ?> 187 <?php if($footer_scripts) { ?> 188 <?php foreach($footer_scripts as $script) { ?> 189 <div class="tracking_script"> 190 <i class="fa fa-sort" title="Drag to Sort"></i> 191 <p><?php echo $i; ?></p> 192 <div class="script_info"> 193 <input type="text" name="footer_script_<?php echo $i; ?>_name" value="<?php echo $script->script_name; ?>" readonly="readonly"> 194 <input type="text" name="footer_script_<?php echo $i; ?>_code" value="<?php echo $script->script_code; ?>" readonly="readonly"> 195 </div> 196 <i class="active_tracking fa <?php if($script->active === true) { echo 'fa-check-circle'; } else { echo 'fa-circle-o'; } ?>" title="<?php if($script->active === true) { echo 'Deactivate Script'; } else { echo 'Activate Script'; } ?>"></i> 197 <i class="edit_tracking fa fa-edit" title="Edit Script"></i> 198 <i class="delete_tracking fa fa-times" title="Delete Script"></i> 199 <input type="hidden" class="script_order" name="footer_script_<?php echo $i; ?>_order" value="<?php echo $i; ?>"> 200 <input type="hidden" class="script_active" name="footer_script_<?php echo $i; ?>_active" value="<?php if($script->active === true) { echo 'true'; } else { echo 'false'; } ?>"> 201 <input type="hidden" class="script_exists" name="footer_script_<?php echo $i; ?>_exists" value="true"> 202 </div> 203 <?php $i++; } ?> 204 <?php } ?> 201 205 </div> 202 206 </div> … … 273 277 274 278 $i = 1; 275 foreach($header_scripts as $script) { 276 if($_POST['header_script_'.$i.'_name']) { 277 $script->script_name = sanitize_text_field($_POST['header_script_'.$i.'_name']); 279 if($header_scripts) { 280 foreach($header_scripts as $script) { 281 if($_POST['header_script_'.$i.'_name']) { 282 $script->script_name = sanitize_text_field($_POST['header_script_'.$i.'_name']); 283 } 284 if($_POST['header_script_'.$i.'_code']) { 285 $script->script_code = stripslashes(esc_textarea($_POST['header_script_'.$i.'_code'])); 286 } 287 if($_POST['header_script_'.$i.'_active']) { 288 if($_POST['header_script_'.$i.'_active'] === 'false') { 289 $script->active = false; 290 } else { 291 $script->active = true; 292 } 293 } 294 if($_POST['header_script_'.$i.'_order']) { 295 $order = filter_input(INPUT_POST, 'header_script_'.$i.'_order', FILTER_VALIDATE_INT); 296 if(is_int($order)) { 297 $script->order = $order; 298 } 299 } 300 if($_POST['header_script_'.$i.'_exists']) { 301 if($_POST['header_script_'.$i.'_exists'] === 'false') { 302 unset($header_scripts[$i-1]); 303 } 304 } 305 306 $i++; 278 307 } 279 if($_POST['header_script_'.$i.'_code']) { 280 $script->script_code = stripslashes(esc_textarea($_POST['header_script_'.$i.'_code'])); 308 } 309 310 $i = 1; 311 if($footer_scripts) { 312 foreach($footer_scripts as $script) { 313 if($_POST['footer_script_'.$i.'_name']) { 314 $script->script_name = sanitize_text_field($_POST['footer_script_'.$i.'_name']); 315 } 316 if($_POST['footer_script_'.$i.'_code']) { 317 $script->script_code = stripslashes(esc_textarea($_POST['footer_script_'.$i.'_code'])); 318 } 319 if($_POST['footer_script_'.$i.'_active']) { 320 if($_POST['footer_script_'.$i.'_active'] === 'false') { 321 $script->active = false; 322 } else { 323 $script->active = true; 324 } 325 } 326 if($_POST['footer_script_'.$i.'_order']) { 327 $order = filter_input(INPUT_POST, 'footer_script_'.$i.'_order', FILTER_VALIDATE_INT); 328 if(is_int($order)) { 329 $script->order = $order; 330 } 331 } 332 if($_POST['footer_script_'.$i.'_exists']) { 333 if($_POST['footer_script_'.$i.'_exists'] === 'false') { 334 unset($footer_scripts[$i-1]); 335 } 336 } 337 338 $i++; 281 339 } 282 if($_POST['header_script_'.$i.'_active']) {283 if($_POST['header_script_'.$i.'_active'] === 'false') {284 $script->active = false;285 } else {286 $script->active = true;287 }288 }289 if($_POST['header_script_'.$i.'_order']) {290 $order = filter_input(INPUT_POST, 'header_script_'.$i.'_order', FILTER_VALIDATE_INT);291 if(is_int($order)) {292 $script->order = $order;293 }294 }295 if($_POST['header_script_'.$i.'_exists']) {296 if($_POST['header_script_'.$i.'_exists'] === 'false') {297 unset($header_scripts[$i-1]);298 }299 }300 301 $i++;302 }303 304 $i = 1;305 foreach($footer_scripts as $script) {306 if($_POST['footer_script_'.$i.'_name']) {307 $script->script_name = sanitize_text_field($_POST['footer_script_'.$i.'_name']);308 }309 if($_POST['footer_script_'.$i.'_code']) {310 $script->script_code = stripslashes(esc_textarea($_POST['footer_script_'.$i.'_code']));311 }312 if($_POST['footer_script_'.$i.'_active']) {313 if($_POST['footer_script_'.$i.'_active'] === 'false') {314 $script->active = false;315 } else {316 $script->active = true;317 }318 }319 if($_POST['footer_script_'.$i.'_order']) {320 $order = filter_input(INPUT_POST, 'footer_script_'.$i.'_order', FILTER_VALIDATE_INT);321 if(is_int($order)) {322 $script->order = $order;323 }324 }325 if($_POST['footer_script_'.$i.'_exists']) {326 if($_POST['footer_script_'.$i.'_exists'] === 'false') {327 unset($footer_scripts[$i-1]);328 }329 }330 331 $i++;332 340 } 333 341
Note: See TracChangeset
for help on using the changeset viewer.