Version Description
To upgrade GA Google Analytics, remove the old version and replace with the new version. Or just click "Update" from the Plugins screen and let WordPress do it for you automatically.
Note: uninstalling the plugin from the WP Plugins screen results in the removal of all settings from the WP database.
For more information, visit the GA Plugin Homepage.
Download this release
Release Info
Developer | specialk |
Plugin | GA Google Analytics |
Version | 20171021 |
Comparing to | |
See all releases |
Code changes from version 20170731 to 20171021
- ga-google-analytics.php +96 -100
- images/250x250-bbq-pro.jpg +0 -0
- images/250x250-blackhole-pro.jpg +0 -0
- images/250x250-digging-into-wordpress.jpg +0 -0
- images/250x250-htaccess-made-easy.jpg +0 -0
- images/250x250-ses-pro.jpg +0 -0
- images/250x250-tao-of-wordpress.jpg +0 -0
- images/250x250-usp-pro.jpg +0 -0
- images/250x250-wp-themes-in-depth.jpg +0 -0
- languages/gap.pot +136 -90
- readme.txt +50 -3
- support-panel.php +97 -0
ga-google-analytics.php
CHANGED
@@ -9,9 +9,10 @@
|
|
9 |
Donate link: https://m0n.co/donate
|
10 |
Contributors: specialk
|
11 |
Requires at least: 4.1
|
12 |
-
Tested up to: 4.
|
13 |
-
Stable tag:
|
14 |
-
Version:
|
|
|
15 |
Text Domain: gap
|
16 |
Domain Path: /languages
|
17 |
License: GPL v2 or later
|
@@ -37,7 +38,7 @@
|
|
37 |
if (!defined('ABSPATH')) die();
|
38 |
|
39 |
$gap_wp_vers = '4.1';
|
40 |
-
$gap_version = '
|
41 |
$gap_plugin = esc_html__('GA Google Analytics', 'gap');
|
42 |
$gap_options = get_option('gap_options');
|
43 |
$gap_path = plugin_basename(__FILE__); // 'ga-google-analytics/ga-google-analytics.php';
|
@@ -52,24 +53,24 @@ add_action('plugins_loaded', 'gap_i18n_init');
|
|
52 |
// require minimum version of WordPress
|
53 |
function gap_require_wp_version() {
|
54 |
global $gap_path, $gap_plugin, $gap_wp_vers;
|
55 |
-
$
|
56 |
-
|
57 |
-
if (
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
62 |
}
|
63 |
}
|
64 |
}
|
65 |
-
|
66 |
-
add_action('admin_init', 'gap_require_wp_version');
|
67 |
-
}
|
68 |
|
69 |
// Google Analytics Tracking Code
|
70 |
function google_analytics_tracking_code() {
|
71 |
|
72 |
-
$options = get_option('gap_options');
|
73 |
|
74 |
extract($options);
|
75 |
|
@@ -86,16 +87,22 @@ function google_analytics_tracking_code() {
|
|
86 |
$ga_anon_gaq = "_gaq.push(['_gat._anonymizeIp']);";
|
87 |
$ga_ssl_gaq = "_gaq.push(['_gat._forceSSL']);";
|
88 |
|
|
|
|
|
|
|
89 |
if ($gap_display_ads) $ga_src = $ga_alt;
|
90 |
|
91 |
if ($gap_enable && (!is_user_logged_in() || !current_user_can('administrator') || (current_user_can('administrator') && !$disable_admin))) {
|
|
|
|
|
|
|
92 |
if ($gap_universal) { ?>
|
93 |
|
94 |
<script>
|
95 |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
96 |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
97 |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
98 |
-
})(window,document,'script','
|
99 |
ga('create', '<?php echo $gap_id; ?>', 'auto'<?php if ($tracker_object) echo ", " . $tracker_object; ?>);
|
100 |
<?php
|
101 |
if ($gap_display_ads) echo $ga_display . "\n\t\t\t";
|
@@ -125,8 +132,11 @@ function google_analytics_tracking_code() {
|
|
125 |
</script>
|
126 |
|
127 |
<?php }
|
128 |
-
|
|
|
|
|
129 |
}
|
|
|
130 |
}
|
131 |
|
132 |
// include tracking code in header or footer
|
@@ -142,6 +152,8 @@ if (isset($gap_options['gap_location']) && $gap_options['gap_location'] == 'head
|
|
142 |
add_action('wp_footer', 'google_analytics_tracking_code');
|
143 |
}
|
144 |
|
|
|
|
|
145 |
// display settings link on plugin page
|
146 |
function gap_plugin_action_links($links, $file) {
|
147 |
global $gap_path;
|
@@ -153,8 +165,6 @@ function gap_plugin_action_links($links, $file) {
|
|
153 |
}
|
154 |
add_filter ('plugin_action_links', 'gap_plugin_action_links', 10, 2);
|
155 |
|
156 |
-
|
157 |
-
|
158 |
// rate plugin link
|
159 |
function add_gap_links($links, $file) {
|
160 |
|
@@ -173,8 +183,6 @@ function add_gap_links($links, $file) {
|
|
173 |
}
|
174 |
add_filter('plugin_row_meta', 'add_gap_links', 10, 2);
|
175 |
|
176 |
-
|
177 |
-
|
178 |
// delete plugin settings
|
179 |
function gap_delete_plugin_options() {
|
180 |
delete_option('gap_options');
|
@@ -188,21 +196,22 @@ function gap_add_defaults() {
|
|
188 |
$tmp = get_option('gap_options');
|
189 |
if(($tmp['default_options'] == '1') || (!is_array($tmp))) {
|
190 |
$arr = array(
|
|
|
|
|
191 |
'version_alert' => 0,
|
192 |
'default_options' => 0,
|
193 |
'gap_enable' => 0,
|
194 |
-
'gap_id' => 'UA-XXXXX-Y',
|
195 |
-
'gap_location' => 'header',
|
196 |
-
'gap_display_ads' => 0,
|
197 |
'gap_universal' => 0,
|
198 |
-
'
|
199 |
-
'tracker_object' => '',
|
200 |
'link_attr' => 0,
|
201 |
-
'admin_area' => 0,
|
202 |
-
'disable_admin' => 0,
|
203 |
'gap_anonymize' => 0,
|
204 |
'gap_force_ssl' => 0,
|
|
|
|
|
|
|
|
|
205 |
'gap_custom_code' => '',
|
|
|
206 |
);
|
207 |
update_option('gap_options', $arr);
|
208 |
}
|
@@ -217,8 +226,16 @@ add_action ('admin_init', 'gap_init');
|
|
217 |
|
218 |
// sanitize and validate input
|
219 |
function gap_validate_options($input) {
|
|
|
220 |
global $gap_location;
|
221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
if (!isset($input['version_alert'])) $input['version_alert'] = null;
|
223 |
$input['version_alert'] = ($input['version_alert'] == 1 ? 1 : 0);
|
224 |
|
@@ -228,71 +245,38 @@ function gap_validate_options($input) {
|
|
228 |
if (!isset($input['gap_enable'])) $input['gap_enable'] = null;
|
229 |
$input['gap_enable'] = ($input['gap_enable'] == 1 ? 1 : 0);
|
230 |
|
231 |
-
$input['gap_id'] = wp_filter_nohtml_kses($input['gap_id']);
|
232 |
-
|
233 |
-
if (!isset($input['gap_location'])) $input['gap_location'] = null;
|
234 |
-
if (!array_key_exists($input['gap_location'], $gap_location)) $input['gap_location'] = null;
|
235 |
-
|
236 |
-
if (!isset($input['gap_display_ads'])) $input['gap_display_ads'] = null;
|
237 |
-
$input['gap_display_ads'] = ($input['gap_display_ads'] == 1 ? 1 : 0);
|
238 |
-
|
239 |
if (!isset($input['gap_universal'])) $input['gap_universal'] = null;
|
240 |
$input['gap_universal'] = ($input['gap_universal'] == 1 ? 1 : 0);
|
241 |
|
242 |
-
|
243 |
-
|
244 |
-
$allowed_atts = array(
|
245 |
-
'align'=>array(), 'class'=>array(), 'id'=>array(), 'dir'=>array(), 'lang'=>array(), 'style'=>array(), 'label'=>array(), 'url'=>array(),
|
246 |
-
'xml:lang'=>array(), 'src'=>array(), 'alt'=>array(), 'name'=>array(), 'content'=>array(), 'http-equiv'=>array(), 'profile'=>array(),
|
247 |
-
'href'=>array(), 'property'=>array(), 'title'=>array(), 'rel'=>array(), 'type'=>array(), 'charset'=>array(), 'media'=>array(), 'rev'=>array(),
|
248 |
-
);
|
249 |
-
$allowedposttags['strong'] = $allowed_atts;
|
250 |
-
$allowedposttags['script'] = $allowed_atts;
|
251 |
-
$allowedposttags['style'] = $allowed_atts;
|
252 |
-
$allowedposttags['small'] = $allowed_atts;
|
253 |
-
$allowedposttags['span'] = $allowed_atts;
|
254 |
-
$allowedposttags['meta'] = $allowed_atts;
|
255 |
-
$allowedposttags['item'] = $allowed_atts;
|
256 |
-
$allowedposttags['base'] = $allowed_atts;
|
257 |
-
$allowedposttags['link'] = $allowed_atts;
|
258 |
-
$allowedposttags['abbr'] = $allowed_atts;
|
259 |
-
$allowedposttags['code'] = $allowed_atts;
|
260 |
-
$allowedposttags['div'] = $allowed_atts;
|
261 |
-
$allowedposttags['img'] = $allowed_atts;
|
262 |
-
$allowedposttags['h1'] = $allowed_atts;
|
263 |
-
$allowedposttags['h2'] = $allowed_atts;
|
264 |
-
$allowedposttags['h3'] = $allowed_atts;
|
265 |
-
$allowedposttags['h4'] = $allowed_atts;
|
266 |
-
$allowedposttags['h5'] = $allowed_atts;
|
267 |
-
$allowedposttags['ol'] = $allowed_atts;
|
268 |
-
$allowedposttags['ul'] = $allowed_atts;
|
269 |
-
$allowedposttags['li'] = $allowed_atts;
|
270 |
-
$allowedposttags['em'] = $allowed_atts;
|
271 |
-
$allowedposttags['p'] = $allowed_atts;
|
272 |
-
$allowedposttags['a'] = $allowed_atts;
|
273 |
-
|
274 |
-
$input['gap_custom'] = wp_kses($input['gap_custom'], $allowedposttags);
|
275 |
-
|
276 |
-
$input['tracker_object'] = wp_kses($input['tracker_object'], $allowedposttags);
|
277 |
|
278 |
if (!isset($input['link_attr'])) $input['link_attr'] = null;
|
279 |
$input['link_attr'] = ($input['link_attr'] == 1 ? 1 : 0);
|
280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
if (!isset($input['admin_area'])) $input['admin_area'] = null;
|
282 |
$input['admin_area'] = ($input['admin_area'] == 1 ? 1 : 0);
|
283 |
|
284 |
if (!isset($input['disable_admin'])) $input['disable_admin'] = null;
|
285 |
$input['disable_admin'] = ($input['disable_admin'] == 1 ? 1 : 0);
|
286 |
|
287 |
-
if (!isset($input['
|
288 |
-
$input['
|
289 |
|
290 |
-
if (
|
291 |
-
$input['gap_force_ssl'] = ($input['gap_force_ssl'] == 1 ? 1 : 0);
|
292 |
|
293 |
-
$input['gap_custom_code'] =
|
|
|
|
|
294 |
|
295 |
return $input;
|
|
|
296 |
}
|
297 |
|
298 |
// define dropdown options
|
@@ -316,11 +300,16 @@ add_action ('admin_menu', 'gap_add_options_page');
|
|
316 |
|
317 |
// create the options page
|
318 |
function gap_render_form() {
|
|
|
319 |
global $gap_plugin, $gap_options, $gap_path, $gap_homeurl, $gap_version, $gap_location;
|
320 |
|
321 |
-
if (
|
322 |
-
|
323 |
-
|
|
|
|
|
|
|
|
|
324 |
<style type="text/css">
|
325 |
.dismiss-alert { margin: 15px; }
|
326 |
.dismiss-alert-wrap { display: inline-block; padding: 7px 0 10px 0; }
|
@@ -330,7 +319,6 @@ function gap_render_form() {
|
|
330 |
background-image: url(<?php echo plugins_url(); ?>/ga-google-analytics/gap-logo.jpg);
|
331 |
background-repeat: no-repeat; background-position: 15px 0; background-size: 80px 80px;
|
332 |
}
|
333 |
-
|
334 |
.mm-panel-usage { padding-bottom: 10px; }
|
335 |
|
336 |
#mm-plugin-options h1 small { line-height: 12px; font-size: 12px; color: #bbb; }
|
@@ -350,6 +338,8 @@ function gap_render_form() {
|
|
350 |
.mm-table-wrap td { padding: 15px; vertical-align: middle; }
|
351 |
.mm-table-wrap .widefat td { vertical-align: middle; }
|
352 |
.mm-table-wrap .widefat th { width: 25%; vertical-align: middle; }
|
|
|
|
|
353 |
.mm-code { background-color: #fafae0; color: #333; font-size: 14px; }
|
354 |
.mm-radio-inputs { margin: 7px 0; }
|
355 |
.mm-radio-inputs span { padding-left: 5px; }
|
@@ -360,8 +350,6 @@ function gap_render_form() {
|
|
360 |
|
361 |
#mm-panel-toggle { margin: 5px 0; }
|
362 |
#mm-credit-info { margin-top: -5px; }
|
363 |
-
#mm-iframe-wrap { width: 100%; height: 225px; overflow: hidden; }
|
364 |
-
#mm-iframe-wrap iframe { width: 100%; height: 100%; overflow: hidden; margin: 0; padding: 0; }
|
365 |
</style>
|
366 |
|
367 |
<div id="mm-plugin-options" class="wrap">
|
@@ -381,7 +369,7 @@ function gap_render_form() {
|
|
381 |
<p>
|
382 |
<?php esc_html_e('Universal Analytics is now the standard for Google Analytics.', 'gap'); ?>
|
383 |
<?php esc_html_e('Please read the following info and migrate by enabling Universal Analytics in the plugin settings.', 'gap'); ?>
|
384 |
-
<?php esc_html_e('Universal Analytics will be the default setting in an future version of this plugin (probably in
|
385 |
</p>
|
386 |
<ul>
|
387 |
<li><a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/"><?php esc_html_e('Learn about Universal Analytics', 'gap'); ?></a></li>
|
@@ -518,20 +506,10 @@ function gap_render_form() {
|
|
518 |
</div>
|
519 |
</td>
|
520 |
</tr>
|
521 |
-
<tr>
|
522 |
-
<th scope="row"><label class="description" for="gap_options[gap_custom]"><?php esc_html_e('Custom', 'gap'); ?> <code><head></code> <?php esc_html_e('Code', 'gap'); ?></label></th>
|
523 |
-
<td>
|
524 |
-
<textarea type="textarea" rows="3" cols="50" name="gap_options[gap_custom]"><?php if (isset($gap_options['gap_custom'])) echo esc_textarea($gap_options['gap_custom']); ?></textarea>
|
525 |
-
<div class="mm-item-caption">
|
526 |
-
<?php esc_html_e('Here you may specify any markup to be displayed in the', 'gap'); ?>
|
527 |
-
<code><head></code> <?php esc_html_e('section. Leave blank to disable.', 'gap'); ?>
|
528 |
-
</div>
|
529 |
-
</td>
|
530 |
-
</tr>
|
531 |
<tr>
|
532 |
<th scope="row"><label class="description" for="gap_options[tracker_object]"><?php esc_html_e('Custom Tracker Objects', 'gap'); ?></label></th>
|
533 |
<td>
|
534 |
-
<textarea type="textarea" rows="
|
535 |
<div class="mm-item-caption">
|
536 |
<?php esc_html_e('Any code entered here will be added to the primary', 'gap'); ?>
|
537 |
<code>ga('create')</code> <?php esc_html_e('function as the fourth parameter.', 'gap'); ?>
|
@@ -542,13 +520,33 @@ function gap_render_form() {
|
|
542 |
<tr>
|
543 |
<th scope="row"><label class="description" for="gap_options[gap_custom_code]"><?php esc_html_e('Custom GA Code', 'gap'); ?></label></th>
|
544 |
<td>
|
545 |
-
<textarea type="textarea" rows="
|
546 |
<div class="mm-item-caption">
|
547 |
-
<?php esc_html_e('Any code entered here will be added to the GA code snippet.
|
548 |
-
<a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_with_multiple_trackers"><?php esc_html_e('creating multiple trackers', 'gap'); ?></a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
549 |
</div>
|
550 |
</td>
|
551 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
552 |
<tr>
|
553 |
<th scope="row"><label class="description" for="gap_options[admin_area]"><?php esc_html_e('Admin Area', 'gap') ?></label></th>
|
554 |
<td>
|
@@ -589,9 +587,7 @@ function gap_render_form() {
|
|
589 |
<div id="mm-panel-current" class="postbox">
|
590 |
<h2><?php esc_html_e('Show Support', 'gap'); ?></h2>
|
591 |
<div class="toggle">
|
592 |
-
|
593 |
-
<iframe src="https://perishablepress.com/current/data.php?current=gap"></iframe>
|
594 |
-
</div>
|
595 |
</div>
|
596 |
</div>
|
597 |
|
9 |
Donate link: https://m0n.co/donate
|
10 |
Contributors: specialk
|
11 |
Requires at least: 4.1
|
12 |
+
Tested up to: 4.9
|
13 |
+
Stable tag: 20171021
|
14 |
+
Version: 20171021
|
15 |
+
Requires PHP: 5.2
|
16 |
Text Domain: gap
|
17 |
Domain Path: /languages
|
18 |
License: GPL v2 or later
|
38 |
if (!defined('ABSPATH')) die();
|
39 |
|
40 |
$gap_wp_vers = '4.1';
|
41 |
+
$gap_version = '20171021';
|
42 |
$gap_plugin = esc_html__('GA Google Analytics', 'gap');
|
43 |
$gap_options = get_option('gap_options');
|
44 |
$gap_path = plugin_basename(__FILE__); // 'ga-google-analytics/ga-google-analytics.php';
|
53 |
// require minimum version of WordPress
|
54 |
function gap_require_wp_version() {
|
55 |
global $gap_path, $gap_plugin, $gap_wp_vers;
|
56 |
+
if (isset($_GET['activate']) && $_GET['activate'] == 'true') {
|
57 |
+
$wp_version = get_bloginfo('version');
|
58 |
+
if (version_compare($wp_version, $gap_wp_vers, '<')) {
|
59 |
+
if (is_plugin_active($gap_path)) {
|
60 |
+
deactivate_plugins($gap_path);
|
61 |
+
$msg = '<strong>' . $gap_plugin . '</strong> ' . esc_html__('requires WordPress ', 'gap') . $gap_wp_vers . esc_html__(' or higher, and has been deactivated!', 'gap') . '<br />';
|
62 |
+
$msg .= esc_html__('Please return to the ', 'gap') . '<a href="' . admin_url() . '">' . esc_html__('WordPress Admin area', 'gap') . '</a> ' . esc_html__('to upgrade WordPress and try again.', 'gap');
|
63 |
+
wp_die($msg);
|
64 |
+
}
|
65 |
}
|
66 |
}
|
67 |
}
|
68 |
+
add_action('admin_init', 'gap_require_wp_version');
|
|
|
|
|
69 |
|
70 |
// Google Analytics Tracking Code
|
71 |
function google_analytics_tracking_code() {
|
72 |
|
73 |
+
$options = get_option('gap_options', array());
|
74 |
|
75 |
extract($options);
|
76 |
|
87 |
$ga_anon_gaq = "_gaq.push(['_gat._anonymizeIp']);";
|
88 |
$ga_ssl_gaq = "_gaq.push(['_gat._forceSSL']);";
|
89 |
|
90 |
+
$gap_custom_code = preg_replace("/%%userid%%/i", get_current_user_id(), $gap_custom_code);
|
91 |
+
$gap_custom_code = apply_filters('gap_custom_code', $gap_custom_code);
|
92 |
+
|
93 |
if ($gap_display_ads) $ga_src = $ga_alt;
|
94 |
|
95 |
if ($gap_enable && (!is_user_logged_in() || !current_user_can('administrator') || (current_user_can('administrator') && !$disable_admin))) {
|
96 |
+
|
97 |
+
if ($gap_custom && $gap_custom_loc) echo $gap_custom . "\n";
|
98 |
+
|
99 |
if ($gap_universal) { ?>
|
100 |
|
101 |
<script>
|
102 |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
103 |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
104 |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
105 |
+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
106 |
ga('create', '<?php echo $gap_id; ?>', 'auto'<?php if ($tracker_object) echo ", " . $tracker_object; ?>);
|
107 |
<?php
|
108 |
if ($gap_display_ads) echo $ga_display . "\n\t\t\t";
|
132 |
</script>
|
133 |
|
134 |
<?php }
|
135 |
+
|
136 |
+
if ($gap_custom && !$gap_custom_loc) echo $gap_custom . "\n";
|
137 |
+
|
138 |
}
|
139 |
+
|
140 |
}
|
141 |
|
142 |
// include tracking code in header or footer
|
152 |
add_action('wp_footer', 'google_analytics_tracking_code');
|
153 |
}
|
154 |
|
155 |
+
|
156 |
+
|
157 |
// display settings link on plugin page
|
158 |
function gap_plugin_action_links($links, $file) {
|
159 |
global $gap_path;
|
165 |
}
|
166 |
add_filter ('plugin_action_links', 'gap_plugin_action_links', 10, 2);
|
167 |
|
|
|
|
|
168 |
// rate plugin link
|
169 |
function add_gap_links($links, $file) {
|
170 |
|
183 |
}
|
184 |
add_filter('plugin_row_meta', 'add_gap_links', 10, 2);
|
185 |
|
|
|
|
|
186 |
// delete plugin settings
|
187 |
function gap_delete_plugin_options() {
|
188 |
delete_option('gap_options');
|
196 |
$tmp = get_option('gap_options');
|
197 |
if(($tmp['default_options'] == '1') || (!is_array($tmp))) {
|
198 |
$arr = array(
|
199 |
+
'gap_id' => 'UA-XXXXX-X',
|
200 |
+
'gap_location' => 'header',
|
201 |
'version_alert' => 0,
|
202 |
'default_options' => 0,
|
203 |
'gap_enable' => 0,
|
|
|
|
|
|
|
204 |
'gap_universal' => 0,
|
205 |
+
'gap_display_ads' => 0,
|
|
|
206 |
'link_attr' => 0,
|
|
|
|
|
207 |
'gap_anonymize' => 0,
|
208 |
'gap_force_ssl' => 0,
|
209 |
+
'admin_area' => 0,
|
210 |
+
'disable_admin' => 0,
|
211 |
+
'gap_custom_loc' => 0,
|
212 |
+
'tracker_object' => '',
|
213 |
'gap_custom_code' => '',
|
214 |
+
'gap_custom' => '',
|
215 |
);
|
216 |
update_option('gap_options', $arr);
|
217 |
}
|
226 |
|
227 |
// sanitize and validate input
|
228 |
function gap_validate_options($input) {
|
229 |
+
|
230 |
global $gap_location;
|
231 |
|
232 |
+
if (!current_user_can('manage_options')) wp_die(__('Sorry, you are not allowed to manage options for this site.', 'gap'));
|
233 |
+
|
234 |
+
$input['gap_id'] = wp_filter_nohtml_kses($input['gap_id']);
|
235 |
+
|
236 |
+
if (!isset($input['gap_location'])) $input['gap_location'] = null;
|
237 |
+
if (!array_key_exists($input['gap_location'], $gap_location)) $input['gap_location'] = null;
|
238 |
+
|
239 |
if (!isset($input['version_alert'])) $input['version_alert'] = null;
|
240 |
$input['version_alert'] = ($input['version_alert'] == 1 ? 1 : 0);
|
241 |
|
245 |
if (!isset($input['gap_enable'])) $input['gap_enable'] = null;
|
246 |
$input['gap_enable'] = ($input['gap_enable'] == 1 ? 1 : 0);
|
247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
if (!isset($input['gap_universal'])) $input['gap_universal'] = null;
|
249 |
$input['gap_universal'] = ($input['gap_universal'] == 1 ? 1 : 0);
|
250 |
|
251 |
+
if (!isset($input['gap_display_ads'])) $input['gap_display_ads'] = null;
|
252 |
+
$input['gap_display_ads'] = ($input['gap_display_ads'] == 1 ? 1 : 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
|
254 |
if (!isset($input['link_attr'])) $input['link_attr'] = null;
|
255 |
$input['link_attr'] = ($input['link_attr'] == 1 ? 1 : 0);
|
256 |
|
257 |
+
if (!isset($input['gap_anonymize'])) $input['gap_anonymize'] = null;
|
258 |
+
$input['gap_anonymize'] = ($input['gap_anonymize'] == 1 ? 1 : 0);
|
259 |
+
|
260 |
+
if (!isset($input['gap_force_ssl'])) $input['gap_force_ssl'] = null;
|
261 |
+
$input['gap_force_ssl'] = ($input['gap_force_ssl'] == 1 ? 1 : 0);
|
262 |
+
|
263 |
if (!isset($input['admin_area'])) $input['admin_area'] = null;
|
264 |
$input['admin_area'] = ($input['admin_area'] == 1 ? 1 : 0);
|
265 |
|
266 |
if (!isset($input['disable_admin'])) $input['disable_admin'] = null;
|
267 |
$input['disable_admin'] = ($input['disable_admin'] == 1 ? 1 : 0);
|
268 |
|
269 |
+
if (!isset($input['gap_custom_loc'])) $input['gap_custom_loc'] = null;
|
270 |
+
$input['gap_custom_loc'] = ($input['gap_custom_loc'] == 1 ? 1 : 0);
|
271 |
|
272 |
+
if (isset($input['tracker_object'])) $input['tracker_object'] = stripslashes(trim($input['tracker_object']));
|
|
|
273 |
|
274 |
+
if (isset($input['gap_custom_code'])) $input['gap_custom_code'] = stripslashes(trim($input['gap_custom_code']));
|
275 |
+
|
276 |
+
if (isset($input['gap_custom'])) $input['gap_custom'] = stripslashes(trim($input['gap_custom']));
|
277 |
|
278 |
return $input;
|
279 |
+
|
280 |
}
|
281 |
|
282 |
// define dropdown options
|
300 |
|
301 |
// create the options page
|
302 |
function gap_render_form() {
|
303 |
+
|
304 |
global $gap_plugin, $gap_options, $gap_path, $gap_homeurl, $gap_version, $gap_location;
|
305 |
|
306 |
+
if (isset($gap_options['version_alert'])) $version_alert = $gap_options['version_alert'] ? true : false;
|
307 |
+
if (isset($gap_options['gap_universal'])) $gap_universal = $gap_options['gap_universal'] ? true : false;
|
308 |
+
|
309 |
+
$display_alert = (!$version_alert && !$gap_universal) ? ' style="display:block;"' : ' style="display:none;"';
|
310 |
+
|
311 |
+
?>
|
312 |
+
|
313 |
<style type="text/css">
|
314 |
.dismiss-alert { margin: 15px; }
|
315 |
.dismiss-alert-wrap { display: inline-block; padding: 7px 0 10px 0; }
|
319 |
background-image: url(<?php echo plugins_url(); ?>/ga-google-analytics/gap-logo.jpg);
|
320 |
background-repeat: no-repeat; background-position: 15px 0; background-size: 80px 80px;
|
321 |
}
|
|
|
322 |
.mm-panel-usage { padding-bottom: 10px; }
|
323 |
|
324 |
#mm-plugin-options h1 small { line-height: 12px; font-size: 12px; color: #bbb; }
|
338 |
.mm-table-wrap td { padding: 15px; vertical-align: middle; }
|
339 |
.mm-table-wrap .widefat td { vertical-align: middle; }
|
340 |
.mm-table-wrap .widefat th { width: 25%; vertical-align: middle; }
|
341 |
+
.mm-table-wrap td input[type="checkbox"] { position: relative; top: -2px; }
|
342 |
+
.mm-table-wrap td textarea { width: 90%; }
|
343 |
.mm-code { background-color: #fafae0; color: #333; font-size: 14px; }
|
344 |
.mm-radio-inputs { margin: 7px 0; }
|
345 |
.mm-radio-inputs span { padding-left: 5px; }
|
350 |
|
351 |
#mm-panel-toggle { margin: 5px 0; }
|
352 |
#mm-credit-info { margin-top: -5px; }
|
|
|
|
|
353 |
</style>
|
354 |
|
355 |
<div id="mm-plugin-options" class="wrap">
|
369 |
<p>
|
370 |
<?php esc_html_e('Universal Analytics is now the standard for Google Analytics.', 'gap'); ?>
|
371 |
<?php esc_html_e('Please read the following info and migrate by enabling Universal Analytics in the plugin settings.', 'gap'); ?>
|
372 |
+
<?php esc_html_e('Universal Analytics will be the default setting in an future version of this plugin (probably in 2018).', 'gap'); ?>
|
373 |
</p>
|
374 |
<ul>
|
375 |
<li><a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/"><?php esc_html_e('Learn about Universal Analytics', 'gap'); ?></a></li>
|
506 |
</div>
|
507 |
</td>
|
508 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
<tr>
|
510 |
<th scope="row"><label class="description" for="gap_options[tracker_object]"><?php esc_html_e('Custom Tracker Objects', 'gap'); ?></label></th>
|
511 |
<td>
|
512 |
+
<textarea type="textarea" rows="5" cols="70" name="gap_options[tracker_object]"><?php if (isset($gap_options['tracker_object'])) echo esc_textarea($gap_options['tracker_object']); ?></textarea>
|
513 |
<div class="mm-item-caption">
|
514 |
<?php esc_html_e('Any code entered here will be added to the primary', 'gap'); ?>
|
515 |
<code>ga('create')</code> <?php esc_html_e('function as the fourth parameter.', 'gap'); ?>
|
520 |
<tr>
|
521 |
<th scope="row"><label class="description" for="gap_options[gap_custom_code]"><?php esc_html_e('Custom GA Code', 'gap'); ?></label></th>
|
522 |
<td>
|
523 |
+
<textarea type="textarea" rows="5" cols="70" name="gap_options[gap_custom_code]"><?php if (isset($gap_options['gap_custom_code'])) echo esc_textarea($gap_options['gap_custom_code']); ?></textarea>
|
524 |
<div class="mm-item-caption">
|
525 |
+
<?php esc_html_e('Any code entered here will be added to the GA code snippet. This is useful for things like', 'gap'); ?>
|
526 |
+
<a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_with_multiple_trackers"><?php esc_html_e('creating multiple trackers', 'gap'); ?></a>
|
527 |
+
<?php esc_html_e('and', 'gap'); ?> <a target="_blank" href="https://support.google.com/360suite/optimize/"><?php esc_html_e('Google Optimize', 'gap'); ?></a>.
|
528 |
+
<?php esc_html_e('Can use', 'gap'); ?> <code>%%userid%%</code> <?php esc_html_e('to display the current user ID.', 'gap'); ?>
|
529 |
+
</div>
|
530 |
+
</td>
|
531 |
+
</tr>
|
532 |
+
<tr>
|
533 |
+
<th scope="row"><label class="description" for="gap_options[gap_custom]"><?php esc_html_e('Custom', 'gap'); ?> <code><head></code> <?php esc_html_e('Code', 'gap'); ?></label></th>
|
534 |
+
<td>
|
535 |
+
<textarea type="textarea" rows="5" cols="70" name="gap_options[gap_custom]"><?php if (isset($gap_options['gap_custom'])) echo esc_textarea($gap_options['gap_custom']); ?></textarea>
|
536 |
+
<div class="mm-item-caption">
|
537 |
+
<?php esc_html_e('Here you may specify any markup to be displayed in the', 'gap'); ?> <code><head></code>
|
538 |
+
<?php esc_html_e('section (or in the footer, depending on the "Code Location" setting, above).', 'gap'); ?>
|
539 |
</div>
|
540 |
</td>
|
541 |
</tr>
|
542 |
+
<tr>
|
543 |
+
<th scope="row"><label class="description" for="gap_options[gap_custom_loc]"><?php esc_html_e('Custom', 'gap'); ?> <code><head></code> <?php esc_html_e('Location', 'gap'); ?></label></th>
|
544 |
+
<td>
|
545 |
+
<input name="gap_options[gap_custom_loc]" type="checkbox" value="1" <?php if (isset($gap_options['gap_custom_loc'])) checked('1', $gap_options['gap_custom_loc']); ?> />
|
546 |
+
<?php esc_html_e('Display custom', 'gap'); ?> <code><head></code> <?php esc_html_e('code', 'gap'); ?> <em><?php esc_html_e('before', 'gap'); ?></em>
|
547 |
+
<?php esc_html_e('GA tracking code. Leave unchecked to display', 'gap'); ?> <em><?php esc_html_e('after', 'gap'); ?></em> <?php esc_html_e('the tracking code.', 'gap'); ?>
|
548 |
+
</td>
|
549 |
+
</tr>
|
550 |
<tr>
|
551 |
<th scope="row"><label class="description" for="gap_options[admin_area]"><?php esc_html_e('Admin Area', 'gap') ?></label></th>
|
552 |
<td>
|
587 |
<div id="mm-panel-current" class="postbox">
|
588 |
<h2><?php esc_html_e('Show Support', 'gap'); ?></h2>
|
589 |
<div class="toggle">
|
590 |
+
<?php require_once('support-panel.php'); ?>
|
|
|
|
|
591 |
</div>
|
592 |
</div>
|
593 |
|
images/250x250-bbq-pro.jpg
ADDED
Binary file
|
images/250x250-blackhole-pro.jpg
ADDED
Binary file
|
images/250x250-digging-into-wordpress.jpg
ADDED
Binary file
|
images/250x250-htaccess-made-easy.jpg
ADDED
Binary file
|
images/250x250-ses-pro.jpg
ADDED
Binary file
|
images/250x250-tao-of-wordpress.jpg
ADDED
Binary file
|
images/250x250-usp-pro.jpg
ADDED
Binary file
|
images/250x250-wp-themes-in-depth.jpg
ADDED
Binary file
|
languages/gap.pot
CHANGED
@@ -3,7 +3,7 @@ msgid ""
|
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: GA Google Analytics\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
-
"POT-Creation-Date: 2017-
|
7 |
"POT-Revision-Date: Wed Aug 31 2016 16:01:29 GMT-0700 (PDT)\n"
|
8 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
9 |
"Last-Translator: \n"
|
@@ -24,335 +24,381 @@ msgstr ""
|
|
24 |
"X-Generator: Loco - https://localise.biz/"
|
25 |
|
26 |
#. Name of the plugin
|
27 |
-
#: ga-google-analytics.php:
|
28 |
msgid "GA Google Analytics"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: ga-google-analytics.php:
|
32 |
msgid "requires WordPress "
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: ga-google-analytics.php:
|
36 |
msgid " or higher, and has been deactivated!"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: ga-google-analytics.php:
|
40 |
msgid "Please return to the "
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: ga-google-analytics.php:
|
44 |
msgid "WordPress Admin area"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: ga-google-analytics.php:
|
48 |
msgid "to upgrade WordPress and try again."
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: ga-google-analytics.php:
|
52 |
msgid "Settings"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: ga-google-analytics.php:
|
56 |
msgid "Give us a 5-star rating at WordPress.org"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: ga-google-analytics.php:
|
60 |
msgid "Rate this plugin"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: ga-google-analytics.php:
|
64 |
msgid "Include code in the document head (via wp_head)"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: ga-google-analytics.php:
|
68 |
msgid "Include code in the document footer (via wp_footer)"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: ga-google-analytics.php:
|
72 |
msgid "Toggle all panels"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: ga-google-analytics.php:
|
76 |
msgid "Important"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: ga-google-analytics.php:
|
80 |
msgid "Universal Analytics is now the standard for Google Analytics."
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: ga-google-analytics.php:
|
84 |
msgid ""
|
85 |
"Please read the following info and migrate by enabling Universal Analytics "
|
86 |
"in the plugin settings."
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: ga-google-analytics.php:
|
90 |
msgid ""
|
91 |
"Universal Analytics will be the default setting in an future version of this "
|
92 |
-
"plugin (probably in
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: ga-google-analytics.php:
|
96 |
msgid "Learn about Universal Analytics"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: ga-google-analytics.php:
|
100 |
msgid "Universal Analytics Upgrade Center"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: ga-google-analytics.php:
|
104 |
msgid "Dismiss notice"
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: ga-google-analytics.php:
|
108 |
msgid "Overview"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: ga-google-analytics.php:
|
112 |
msgid ""
|
113 |
"This plugin adds the GA Tracking Code to your site. Log in to your Google "
|
114 |
"account to view your stats."
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: ga-google-analytics.php:
|
118 |
msgid "How to Use"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: ga-google-analytics.php:
|
122 |
msgid "Plugin Settings"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: ga-google-analytics.php:
|
126 |
msgid "Plugin Homepage"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: ga-google-analytics.php:
|
130 |
msgid "If you like this plugin, please"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: ga-google-analytics.php:
|
134 |
msgid "THANK YOU for your support!"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: ga-google-analytics.php:
|
138 |
msgid "give it a 5-star rating"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: ga-google-analytics.php:
|
142 |
msgid "How to use"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: ga-google-analytics.php:
|
146 |
msgid "In the plugin settings, enter your GA Property ID."
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: ga-google-analytics.php:
|
150 |
msgid ""
|
151 |
"In the plugin settings, enable either \"Legacy Analytics\" or \"Universal "
|
152 |
"Analytics\"."
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: ga-google-analytics.php:
|
156 |
msgid "Configure other settings (optional) as desired and save your changes."
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: ga-google-analytics.php:
|
160 |
msgid ""
|
161 |
"After 24-48 hours, you can log into your Google Analytics account to view "
|
162 |
"your stats."
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: ga-google-analytics.php:
|
166 |
msgid ""
|
167 |
"Note that it can take 24-48 hours after adding the tracking code before any "
|
168 |
"analytical data appears in your"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: ga-google-analytics.php:
|
172 |
msgid "Google Analytics account"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: ga-google-analytics.php:
|
176 |
msgid ""
|
177 |
"To check that the GA tacking code is included, look at the source code of "
|
178 |
"your web page(s). Learn more at the"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: ga-google-analytics.php:
|
182 |
msgid "Google Analytics Help Center"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: ga-google-analytics.php:
|
186 |
msgid "Enter your Tracking Code and choose your options."
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: ga-google-analytics.php:
|
190 |
msgid "GA Property ID"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: ga-google-analytics.php:
|
194 |
msgid "Enable Analytics"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: ga-google-analytics.php:
|
198 |
msgid "Enable Google Analytics on your site. Uses"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: ga-google-analytics.php:
|
202 |
msgid "Legacy Analytics"
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: ga-google-analytics.php:
|
206 |
msgid ""
|
207 |
"by default. To use Universal Analytics, check this box and enable the next "
|
208 |
"setting."
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: ga-google-analytics.php:
|
212 |
msgid "Universal Analytics"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: ga-google-analytics.php:
|
216 |
msgid "Enable"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: ga-google-analytics.php:
|
220 |
msgid "Display Advertising"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: ga-google-analytics.php:
|
224 |
-
#: ga-google-analytics.php:
|
225 |
msgid "Enable support for"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: ga-google-analytics.php:
|
229 |
msgid "Link Attribution"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: ga-google-analytics.php:
|
233 |
msgid "Enhanced Link Attribution"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: ga-google-analytics.php:
|
237 |
msgid "IP Anonymization"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: ga-google-analytics.php:
|
241 |
msgid "Force SSL"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: ga-google-analytics.php:
|
245 |
msgid "Code Location"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: ga-google-analytics.php:
|
249 |
msgid ""
|
250 |
"Tip: Google recommends including the Tracking Code in the document header, "
|
251 |
"but including it in the footer can benefit page performance."
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: ga-google-analytics.php:
|
255 |
msgid ""
|
256 |
"If in doubt, go with the default option to include the code in the header."
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: ga-google-analytics.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
msgid "Custom"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: ga-google-analytics.php:
|
264 |
msgid "Code"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: ga-google-analytics.php:
|
268 |
msgid "Here you may specify any markup to be displayed in the"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: ga-google-analytics.php:
|
272 |
-
msgid "
|
|
|
|
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: ga-google-analytics.php:
|
276 |
-
msgid "
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: ga-google-analytics.php:
|
280 |
-
msgid "
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: ga-google-analytics.php:
|
284 |
-
msgid "
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: ga-google-analytics.php:
|
288 |
-
msgid "
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: ga-google-analytics.php:
|
292 |
-
msgid "
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: ga-google-analytics.php:
|
296 |
-
msgid ""
|
297 |
-
"Any code entered here will be added to the GA code snippet. For example, "
|
298 |
-
"this is useful for"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: ga-google-analytics.php:
|
302 |
-
msgid "
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: ga-google-analytics.php:
|
306 |
msgid "Admin Area"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: ga-google-analytics.php:
|
310 |
msgid "Enable GA in the WordPress Admin Area"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: ga-google-analytics.php:
|
314 |
msgid "Admin Users"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: ga-google-analytics.php:
|
318 |
msgid "Disable GA on the frontend for Admin-level users"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: ga-google-analytics.php:
|
322 |
msgid "Save Settings"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: ga-google-analytics.php:
|
326 |
msgid "Restore Defaults"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: ga-google-analytics.php:
|
330 |
msgid "Restore default options upon plugin deactivation/reactivation."
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: ga-google-analytics.php:
|
334 |
msgid "Tip:"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: ga-google-analytics.php:
|
338 |
msgid "leave this option unchecked to remember your settings."
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: ga-google-analytics.php:
|
342 |
msgid ""
|
343 |
"Or, to go ahead and restore all default options, check the box, save your "
|
344 |
"settings, and then deactivate/reactivate the plugin."
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: ga-google-analytics.php:
|
348 |
msgid "Show Support"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: ga-google-analytics.php:
|
352 |
msgid "Save Preference"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: ga-google-analytics.php:
|
356 |
msgid ""
|
357 |
"Are you sure you want to restore all default options? (this action cannot be "
|
358 |
"undone)"
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: GA Google Analytics\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
+
"POT-Creation-Date: 2017-11-02 00:58+0000\n"
|
7 |
"POT-Revision-Date: Wed Aug 31 2016 16:01:29 GMT-0700 (PDT)\n"
|
8 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
9 |
"Last-Translator: \n"
|
24 |
"X-Generator: Loco - https://localise.biz/"
|
25 |
|
26 |
#. Name of the plugin
|
27 |
+
#: ga-google-analytics.php:42
|
28 |
msgid "GA Google Analytics"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: ga-google-analytics.php:60
|
32 |
msgid "requires WordPress "
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ga-google-analytics.php:60
|
36 |
msgid " or higher, and has been deactivated!"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ga-google-analytics.php:61
|
40 |
msgid "Please return to the "
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: ga-google-analytics.php:61
|
44 |
msgid "WordPress Admin area"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: ga-google-analytics.php:61
|
48 |
msgid "to upgrade WordPress and try again."
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: ga-google-analytics.php:161
|
52 |
msgid "Settings"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: ga-google-analytics.php:174
|
56 |
msgid "Give us a 5-star rating at WordPress.org"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: ga-google-analytics.php:175
|
60 |
msgid "Rate this plugin"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: ga-google-analytics.php:286
|
64 |
msgid "Include code in the document head (via wp_head)"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: ga-google-analytics.php:290
|
68 |
msgid "Include code in the document footer (via wp_footer)"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: ga-google-analytics.php:357
|
72 |
msgid "Toggle all panels"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: ga-google-analytics.php:366
|
76 |
msgid "Important"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: ga-google-analytics.php:370
|
80 |
msgid "Universal Analytics is now the standard for Google Analytics."
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: ga-google-analytics.php:371
|
84 |
msgid ""
|
85 |
"Please read the following info and migrate by enabling Universal Analytics "
|
86 |
"in the plugin settings."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: ga-google-analytics.php:372
|
90 |
msgid ""
|
91 |
"Universal Analytics will be the default setting in an future version of this "
|
92 |
+
"plugin (probably in 2018)."
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: ga-google-analytics.php:375
|
96 |
msgid "Learn about Universal Analytics"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: ga-google-analytics.php:376
|
100 |
msgid "Universal Analytics Upgrade Center"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: ga-google-analytics.php:381
|
104 |
msgid "Dismiss notice"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: ga-google-analytics.php:389
|
108 |
msgid "Overview"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: ga-google-analytics.php:392
|
112 |
msgid ""
|
113 |
"This plugin adds the GA Tracking Code to your site. Log in to your Google "
|
114 |
"account to view your stats."
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: ga-google-analytics.php:394 ga-google-analytics.php:409
|
118 |
msgid "How to Use"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: ga-google-analytics.php:395 ga-google-analytics.php:432
|
122 |
msgid "Plugin Settings"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: ga-google-analytics.php:396
|
126 |
msgid "Plugin Homepage"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: ga-google-analytics.php:399
|
130 |
msgid "If you like this plugin, please"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: ga-google-analytics.php:400
|
134 |
msgid "THANK YOU for your support!"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: ga-google-analytics.php:401
|
138 |
msgid "give it a 5-star rating"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: ga-google-analytics.php:412
|
142 |
msgid "How to use"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: ga-google-analytics.php:414
|
146 |
msgid "In the plugin settings, enter your GA Property ID."
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: ga-google-analytics.php:415
|
150 |
msgid ""
|
151 |
"In the plugin settings, enable either \"Legacy Analytics\" or \"Universal "
|
152 |
"Analytics\"."
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: ga-google-analytics.php:416
|
156 |
msgid "Configure other settings (optional) as desired and save your changes."
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: ga-google-analytics.php:417
|
160 |
msgid ""
|
161 |
"After 24-48 hours, you can log into your Google Analytics account to view "
|
162 |
"your stats."
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: ga-google-analytics.php:421
|
166 |
msgid ""
|
167 |
"Note that it can take 24-48 hours after adding the tracking code before any "
|
168 |
"analytical data appears in your"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: ga-google-analytics.php:422
|
172 |
msgid "Google Analytics account"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: ga-google-analytics.php:423
|
176 |
msgid ""
|
177 |
"To check that the GA tacking code is included, look at the source code of "
|
178 |
"your web page(s). Learn more at the"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: ga-google-analytics.php:424
|
182 |
msgid "Google Analytics Help Center"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: ga-google-analytics.php:434
|
186 |
msgid "Enter your Tracking Code and choose your options."
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: ga-google-analytics.php:438
|
190 |
msgid "GA Property ID"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: ga-google-analytics.php:442
|
194 |
msgid "Enable Analytics"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: ga-google-analytics.php:445
|
198 |
msgid "Enable Google Analytics on your site. Uses"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: ga-google-analytics.php:446
|
202 |
msgid "Legacy Analytics"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: ga-google-analytics.php:447
|
206 |
msgid ""
|
207 |
"by default. To use Universal Analytics, check this box and enable the next "
|
208 |
"setting."
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: ga-google-analytics.php:451 ga-google-analytics.php:454
|
212 |
msgid "Universal Analytics"
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: ga-google-analytics.php:454
|
216 |
msgid "Enable"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: ga-google-analytics.php:458 ga-google-analytics.php:461
|
220 |
msgid "Display Advertising"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: ga-google-analytics.php:461 ga-google-analytics.php:468
|
224 |
+
#: ga-google-analytics.php:475 ga-google-analytics.php:482
|
225 |
msgid "Enable support for"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: ga-google-analytics.php:465
|
229 |
msgid "Link Attribution"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: ga-google-analytics.php:468
|
233 |
msgid "Enhanced Link Attribution"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: ga-google-analytics.php:472 ga-google-analytics.php:475
|
237 |
msgid "IP Anonymization"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: ga-google-analytics.php:479
|
241 |
msgid "Force SSL"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: ga-google-analytics.php:486
|
245 |
msgid "Code Location"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: ga-google-analytics.php:504
|
249 |
msgid ""
|
250 |
"Tip: Google recommends including the Tracking Code in the document header, "
|
251 |
"but including it in the footer can benefit page performance."
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: ga-google-analytics.php:505
|
255 |
msgid ""
|
256 |
"If in doubt, go with the default option to include the code in the header."
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: ga-google-analytics.php:510
|
260 |
+
msgid "Custom Tracker Objects"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: ga-google-analytics.php:514
|
264 |
+
msgid "Any code entered here will be added to the primary"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: ga-google-analytics.php:515
|
268 |
+
msgid "function as the fourth parameter."
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: ga-google-analytics.php:516
|
272 |
+
msgid "Learn more about creating trackers"
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: ga-google-analytics.php:521
|
276 |
+
msgid "Custom GA Code"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: ga-google-analytics.php:525
|
280 |
+
msgid ""
|
281 |
+
"Any code entered here will be added to the GA code snippet. This is useful "
|
282 |
+
"for things like"
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: ga-google-analytics.php:526
|
286 |
+
msgid "creating multiple trackers"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: ga-google-analytics.php:527
|
290 |
+
msgid "and"
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: ga-google-analytics.php:527
|
294 |
+
msgid "Google Optimize"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: ga-google-analytics.php:528
|
298 |
+
msgid "Can use"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: ga-google-analytics.php:528
|
302 |
+
msgid "to display the current user ID."
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: ga-google-analytics.php:533 ga-google-analytics.php:543
|
306 |
msgid "Custom"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: ga-google-analytics.php:533
|
310 |
msgid "Code"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: ga-google-analytics.php:537
|
314 |
msgid "Here you may specify any markup to be displayed in the"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: ga-google-analytics.php:538
|
318 |
+
msgid ""
|
319 |
+
"section (or in the footer, depending on the \"Code Location\" setting, above)"
|
320 |
+
"."
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: ga-google-analytics.php:543
|
324 |
+
msgid "Location"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: ga-google-analytics.php:546
|
328 |
+
msgid "Display custom"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: ga-google-analytics.php:546
|
332 |
+
msgid "code"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: ga-google-analytics.php:546
|
336 |
+
msgid "before"
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: ga-google-analytics.php:547
|
340 |
+
msgid "GA tracking code. Leave unchecked to display"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: ga-google-analytics.php:547
|
344 |
+
msgid "after"
|
|
|
|
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: ga-google-analytics.php:547
|
348 |
+
msgid "the tracking code."
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: ga-google-analytics.php:551
|
352 |
msgid "Admin Area"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: ga-google-analytics.php:554
|
356 |
msgid "Enable GA in the WordPress Admin Area"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: ga-google-analytics.php:558
|
360 |
msgid "Admin Users"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: ga-google-analytics.php:561
|
364 |
msgid "Disable GA on the frontend for Admin-level users"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: ga-google-analytics.php:566 ga-google-analytics.php:583
|
368 |
msgid "Save Settings"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: ga-google-analytics.php:571
|
372 |
msgid "Restore Defaults"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: ga-google-analytics.php:575
|
376 |
msgid "Restore default options upon plugin deactivation/reactivation."
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: ga-google-analytics.php:579
|
380 |
msgid "Tip:"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: ga-google-analytics.php:579
|
384 |
msgid "leave this option unchecked to remember your settings."
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: ga-google-analytics.php:580
|
388 |
msgid ""
|
389 |
"Or, to go ahead and restore all default options, check the box, save your "
|
390 |
"settings, and then deactivate/reactivate the plugin."
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: ga-google-analytics.php:588
|
394 |
msgid "Show Support"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: ga-google-analytics.php:630
|
398 |
msgid "Save Preference"
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: ga-google-analytics.php:636
|
402 |
msgid ""
|
403 |
"Are you sure you want to restore all default options? (this action cannot be "
|
404 |
"undone)"
|
readme.txt
CHANGED
@@ -9,9 +9,10 @@ Author URI: https://plugin-planet.com/
|
|
9 |
Donate link: https://m0n.co/donate
|
10 |
Contributors: specialk
|
11 |
Requires at least: 4.1
|
12 |
-
Tested up to: 4.
|
13 |
-
Stable tag:
|
14 |
-
Version:
|
|
|
15 |
Text Domain: gap
|
16 |
Domain Path: /languages
|
17 |
License: GPL v2 or later
|
@@ -50,6 +51,7 @@ This is a lightweight plugin that inserts the required GA tracking code. To view
|
|
50 |
* Supports [Tracker Objects](https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers)
|
51 |
* Supports [IP Anonymization](https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization)
|
52 |
* Supports [Force SSL](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL)
|
|
|
53 |
|
54 |
Learn more about [Google Analytics](http://www.google.com/analytics/)!
|
55 |
|
@@ -117,10 +119,38 @@ For more information, visit the [GA Plugin Homepage](https://perishablepress.com
|
|
117 |
|
118 |
== Frequently Asked Questions ==
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
**Google Analytic says tracking code is not detected?**
|
121 |
|
122 |
You need to wait awhile for Google to collect some data, like at least a day or whatever. Standard stuff for Google Analytics. For more information, check out the [Google Analytics Help Center](https://support.google.com/analytics/?hl=en#topic=3544906).
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
**Got a question?**
|
125 |
|
126 |
To ask a question, suggest a feature, or provide feedback, [contact me directly](https://perishablepress.com/contact/). Learn more about [Google Analytics](http://www.google.com/analytics/) and [GA tracking methods](https://perishablepress.com/3-ways-track-google-analytics/).
|
@@ -149,6 +179,23 @@ Links, tweets and likes also appreciated. Thanks! :)
|
|
149 |
|
150 |
== Changelog ==
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
**20170731**
|
153 |
|
154 |
* Updates GPL license blurb
|
9 |
Donate link: https://m0n.co/donate
|
10 |
Contributors: specialk
|
11 |
Requires at least: 4.1
|
12 |
+
Tested up to: 4.9
|
13 |
+
Stable tag: 20171021
|
14 |
+
Version: 20171021
|
15 |
+
Requires PHP: 5.2
|
16 |
Text Domain: gap
|
17 |
Domain Path: /languages
|
18 |
License: GPL v2 or later
|
51 |
* Supports [Tracker Objects](https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers)
|
52 |
* Supports [IP Anonymization](https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization)
|
53 |
* Supports [Force SSL](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL)
|
54 |
+
* Supports [Google Optimize](https://support.google.com/360suite/optimize/)
|
55 |
|
56 |
Learn more about [Google Analytics](http://www.google.com/analytics/)!
|
57 |
|
119 |
|
120 |
== Frequently Asked Questions ==
|
121 |
|
122 |
+
**Tracking code is not displayed in source code?**
|
123 |
+
|
124 |
+
If you check the source code of your pages and don't see the GA tracking code, check the following:
|
125 |
+
|
126 |
+
* Check that your theme includes the hooks, `wp_head` and `wp_footer`
|
127 |
+
* If you are using a caching plugin, try clearing the cache
|
128 |
+
|
129 |
+
If the GA tracking code still is not displayed, most likely there is interference from another plugin or theme. In this case, the best way to resolve the issue is to do some basic [WordPress troubleshooting](https://perishablepress.com/how-to-troubleshoot-wordpress/).
|
130 |
+
|
131 |
+
|
132 |
**Google Analytic says tracking code is not detected?**
|
133 |
|
134 |
You need to wait awhile for Google to collect some data, like at least a day or whatever. Standard stuff for Google Analytics. For more information, check out the [Google Analytics Help Center](https://support.google.com/analytics/?hl=en#topic=3544906).
|
135 |
|
136 |
+
|
137 |
+
**Can I filter the output of the "Custom GA Code" setting?
|
138 |
+
|
139 |
+
Yes, you can use the `gap_custom_code` filter hook.
|
140 |
+
|
141 |
+
|
142 |
+
**How to implement Google Optimize?**
|
143 |
+
|
144 |
+
Here are the steps:
|
145 |
+
|
146 |
+
1. Enable Universal Analytics in the plugin settings
|
147 |
+
2. Add the Optimize plugin (e.g., `ga('require', 'GTM-XXXXXX');`) to the setting, "Custom GA Code"
|
148 |
+
3. Add the Page Hiding (flicker) snippet to the setting, "Custom <head> Code"
|
149 |
+
4. Enable the setting, "Custom <head> Location"
|
150 |
+
|
151 |
+
Done! You can view the source code of your web pages to verify the results.
|
152 |
+
|
153 |
+
|
154 |
**Got a question?**
|
155 |
|
156 |
To ask a question, suggest a feature, or provide feedback, [contact me directly](https://perishablepress.com/contact/). Learn more about [Google Analytics](http://www.google.com/analytics/) and [GA tracking methods](https://perishablepress.com/3-ways-track-google-analytics/).
|
179 |
|
180 |
== Changelog ==
|
181 |
|
182 |
+
*Thank you to everyone who shares feedback for GA Google Analytics!*
|
183 |
+
|
184 |
+
**20171021**
|
185 |
+
|
186 |
+
* Adds setting to display Custom head code before or after the GA tracking code
|
187 |
+
* Updates tracking URL from `//` to `https://` for Universal Analytics
|
188 |
+
* Updates default/example tracking ID from `UA-XXXXX-Y` to `UA-XXXXX-X`
|
189 |
+
* Adds `%%userid%%` shortcode for "Custom GA Code" setting
|
190 |
+
* Adds filter hook `gap_custom_code` for "Custom GA Code" setting
|
191 |
+
* Fixes PHP warning for "extract() expects parameter 1 to be array"
|
192 |
+
* Fixes code escaping bug for custom code and tracker settings
|
193 |
+
* Adds extra `manage_options` capability check to modify settings
|
194 |
+
* Streamlines Support panel in plugin settings
|
195 |
+
* Regenerates default translation template
|
196 |
+
* Improves display of plugin settings
|
197 |
+
* Tests on WordPress 4.9
|
198 |
+
|
199 |
**20170731**
|
200 |
|
201 |
* Updates GPL license blurb
|
support-panel.php
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php // GA Google Analytics - Show Support Panel
|
2 |
+
|
3 |
+
if (!function_exists('add_action')) die();
|
4 |
+
|
5 |
+
$plugin_project = 'Google Analytics';
|
6 |
+
|
7 |
+
$plugin_url = plugin_dir_url(__FILE__);
|
8 |
+
|
9 |
+
$array = array(
|
10 |
+
|
11 |
+
0 => '<a target="_blank" href="https://plugin-planet.com/bbq-pro/" title="Premium WP Plugin: BBQ Pro">
|
12 |
+
<img width="125" height="125" src="'. $plugin_url .'images/250x250-bbq-pro.jpg" alt="BBQ Pro - Block Bad Queries" />
|
13 |
+
</a>',
|
14 |
+
1 => '<a target="_blank" href="https://plugin-planet.com/blackhole-pro/" title="Premium WP Plugin: Blackhole Pro">
|
15 |
+
<img width="125" height="125" src="'. $plugin_url .'images/250x250-blackhole-pro.jpg" alt="Blackhole Pro - Block Bad Bots" />
|
16 |
+
</a>',
|
17 |
+
2 => '<a target="_blank" href="https://plugin-planet.com/ses-pro/" title="Premium WP Plugin: SES Pro">
|
18 |
+
<img width="125" height="125" src="'. $plugin_url .'images/250x250-ses-pro.jpg" alt="SES Pro - Ajax-Powered Email Signup Forms" />
|
19 |
+
</a>',
|
20 |
+
3 => '<a target="_blank" href="https://plugin-planet.com/usp-pro/" title="Premium WP Plugin: USP Pro">
|
21 |
+
<img width="125" height="125" src="'. $plugin_url .'images/250x250-usp-pro.jpg" alt="USP Pro - Unlimited Front-End Forms" />
|
22 |
+
</a>',
|
23 |
+
|
24 |
+
4 => '<a target="_blank" href="https://digwp.com/" title="Take your WordPress Skills to the Next Level">
|
25 |
+
<img width="125" height="125" src="'. $plugin_url .'images/250x250-digging-into-wordpress.jpg" alt="Digging Into WordPress" />
|
26 |
+
</a>',
|
27 |
+
5 => '<a target="_blank" href="https://wp-tao.com/" title="Learn the Way of WordPress">
|
28 |
+
<img width="125" height="125" src="'. $plugin_url .'images/250x250-tao-of-wordpress.jpg" alt="The Tao of WordPress" />
|
29 |
+
</a>',
|
30 |
+
6 => '<a target="_blank" href="https://wp-tao.com/wordpress-themes-book/" title="WordPress Themes In Depth">
|
31 |
+
<img width="125" height="125" src="'. $plugin_url .'images/250x250-wp-themes-in-depth.jpg" alt="WordPress Themes In Depth" />
|
32 |
+
</a>',
|
33 |
+
7 => '<a target="_blank" href="https://htaccessbook.com/" title="Optimize and Secure with .htaccess">
|
34 |
+
<img width="125" height="125" src="'. $plugin_url .'images/250x250-htaccess-made-easy.jpg" alt=".htaccess made easy" />
|
35 |
+
</a>',
|
36 |
+
|
37 |
+
);
|
38 |
+
|
39 |
+
$items = array_rand($array, 3);
|
40 |
+
|
41 |
+
$item1 = isset($array[$items[0]]) ? $array[$items[0]] : 0;
|
42 |
+
$item2 = isset($array[$items[1]]) ? $array[$items[1]] : 1;
|
43 |
+
$item3 = isset($array[$items[2]]) ? $array[$items[2]] : 2;
|
44 |
+
|
45 |
+
$message = 'Thank you for using '. $plugin_project .'! Please show support by purchasing one of my
|
46 |
+
<a target="_blank" href="https://wp-tao.com/store/" title="Perishable Press Books">books</a> or
|
47 |
+
<a target="_blank" href="https://plugin-planet.com/store/" title="Plugin Planet">plugins</a>,
|
48 |
+
or by making a <a target="_blank" href="https://m0n.co/donate" title="Donate via PayPal">donation</a>.
|
49 |
+
Your generous support helps to ensure future development of '. $plugin_project .' and is greatly appreciated.';
|
50 |
+
|
51 |
+
$donate = 'Any size donation helps me to continue developing this free plugin and other awesome WordPress resources.';
|
52 |
+
|
53 |
+
?>
|
54 |
+
|
55 |
+
<style type="text/css">
|
56 |
+
#project-wrap { width: 100%; overflow: hidden; }
|
57 |
+
#project-wrap p { margin-top: 5px; font-size: 12px; }
|
58 |
+
#project-wrap .project-support { float: left; max-width: 480px; }
|
59 |
+
|
60 |
+
#project-wrap .project-links { width: 100%; overflow: hidden; margin: 15px 0; }
|
61 |
+
#project-wrap .project-links img { display: block; width: 125px; height: 125px; margin: 0; padding: 0; border: 0; background-color: #fff; color: #fff; }
|
62 |
+
#project-wrap .project-links a { float: left; width: 125px; height: 125px; margin: 0 0 0 15px; padding: 1px; border: 1px solid #ccc; opacity: 0.9; }
|
63 |
+
#project-wrap .project-links a:hover { opacity: 1.0; }
|
64 |
+
|
65 |
+
#project-wrap .project-blurb {
|
66 |
+
float: left; width: 220px; box-sizing: border-box; margin: 0 0 25px 20px; padding: 15px 20px; border-radius: 5px;
|
67 |
+
background-color: #fefefe; border: 1px solid #ccc; box-shadow: 0 20px 25px -20px rgba(0,0,0,0.7);
|
68 |
+
}
|
69 |
+
#project-wrap .project-blurb a { text-decoration: none; }
|
70 |
+
#project-wrap .project-blurb a:hover { text-decoration: underline; }
|
71 |
+
#project-wrap .project-blurb p { margin-left: 0; margin-right: 0; }
|
72 |
+
#project-wrap .project-blurb p:first-child { margin: 0 0 10px 0; font-size: 13px; }
|
73 |
+
#project-wrap .project-blurb ul { margin: 0; padding: 0; font-size: 12px; }
|
74 |
+
#project-wrap .project-blurb li { margin: 5px 0; list-style: none; }
|
75 |
+
|
76 |
+
@media (max-width: 520px) {
|
77 |
+
#project-wrap .project-links a { margin-bottom: 15px; }
|
78 |
+
}
|
79 |
+
</style>
|
80 |
+
<div id="project-wrap">
|
81 |
+
<div class="project-support">
|
82 |
+
<div class="project-message">
|
83 |
+
<p><?php echo $message; ?></p>
|
84 |
+
</div>
|
85 |
+
<div class="project-links">
|
86 |
+
<?php echo $item1 . $item2 . $item3; ?>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
<div class="project-blurb">
|
90 |
+
<p><strong>Please Donate</strong></p>
|
91 |
+
<p><?php echo $donate; ?></p>
|
92 |
+
<ul>
|
93 |
+
<li><a target="_blank" href="https://m0n.co/donate">Donate via PayPal »</a></li>
|
94 |
+
<li><a target="_blank" href="https://m0n.co/bitcoin">Donate via Bitcoin »</a></li>
|
95 |
+
</ul>
|
96 |
+
</div>
|
97 |
+
</div>
|