Skip to content

Commit 5e15257

Browse files
author
Daniel Smith
committed
Fixes #9 - Show GA Tracking Options does not work
1 parent e69dabf commit 5e15257

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

plugin.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,17 @@ function(data){
339339
}
340340

341341
jQuery(document).ready(function($){
342+
$('#new_url_form').append('<a style="display:block" class="toggle" href="#ga_tracking_options">Show GA Tracking Options</a><div class="toggle" id="ga_tracking_options" style="display:none;"><?php
343+
344+
$sources = kws_yourls_analytics_defaults();
345+
346+
foreach($sources as $source => $value) {
347+
$sourceNice = preg_replace('/(?:.*?)\_(.+)/ism', '$1', $source);
348+
echo '<label for="'.$source.'" style="padding-left:.75em;">'.$sourceNice.' <input id="'.$source.'" type="text" size="12" name="'.$source.'" value="'.$value.'" /></label>';
349+
}
350+
351+
352+
?></div><div style="clear:both;"></div>');
342353
$('a.toggle').on('click', null, function(e) {
343354
e.preventDefault();
344355
var $div = $($(this).attr('href'));
@@ -352,17 +363,6 @@ function(data){
352363
});
353364
return false;
354365
});
355-
$('#new_url_form').append('<a style="display:block" class="toggle" href="#ga_tracking_options">Show GA Tracking Options</a><div class="toggle" id="ga_tracking_options" style="display:none;"><?php
356-
357-
$sources = kws_yourls_analytics_defaults();
358-
359-
foreach($sources as $source => $value) {
360-
$sourceNice = preg_replace('/(?:.*?)\_(.+)/ism', '$1', $source);
361-
echo '<label for="'.$source.'" style="padding-left:.75em;">'.$sourceNice.' <input id="'.$source.'" type="text" size="12" name="'.$source.'" value="'.$value.'" /></label>';
362-
}
363-
364-
365-
?></div><div style="clear:both;"></div>');
366366

367367
});
368368

@@ -539,4 +539,4 @@ function kws_yourls_process_array($query) {
539539

540540
return $query;
541541

542-
}
542+
}

0 commit comments

Comments
 (0)