Changeset 2841294
- Timestamp:
- 12/29/2022 09:35:43 PM (3 years ago)
- Location:
- google-analyticator
- Files:
-
- 139 added
- 2 edited
-
tags/6.5.7 (added)
-
tags/6.5.7/appsumo-capture-form.php (added)
-
tags/6.5.7/class.analytics.stats.php (added)
-
tags/6.5.7/download-button.png (added)
-
tags/6.5.7/external-tracking.js (added)
-
tags/6.5.7/external-tracking.min.js (added)
-
tags/6.5.7/ga-md-ad-532.png (added)
-
tags/6.5.7/ga-plugin-advert-sidebar.png (added)
-
tags/6.5.7/ga-plugin-advert.jpg (added)
-
tags/6.5.7/ga_logo.png (added)
-
tags/6.5.7/gapro-plugin-advert-sidebar.png (added)
-
tags/6.5.7/google-analyticator.php (added)
-
tags/6.5.7/google-analytics-stats-widget.php (added)
-
tags/6.5.7/google-analytics-summary-widget.php (added)
-
tags/6.5.7/google-api-php-client (added)
-
tags/6.5.7/google-api-php-client/LICENSE (added)
-
tags/6.5.7/google-api-php-client/NOTICE (added)
-
tags/6.5.7/google-api-php-client/README (added)
-
tags/6.5.7/google-api-php-client/src (added)
-
tags/6.5.7/google-api-php-client/src/Google_Client.php (added)
-
tags/6.5.7/google-api-php-client/src/auth (added)
-
tags/6.5.7/google-api-php-client/src/auth/Google_AssertionCredentials.php (added)
-
tags/6.5.7/google-api-php-client/src/auth/Google_Auth.php (added)
-
tags/6.5.7/google-api-php-client/src/auth/Google_AuthNone.php (added)
-
tags/6.5.7/google-api-php-client/src/auth/Google_LoginTicket.php (added)
-
tags/6.5.7/google-api-php-client/src/auth/Google_OAuth2.php (added)
-
tags/6.5.7/google-api-php-client/src/auth/Google_P12Signer.php (added)
-
tags/6.5.7/google-api-php-client/src/auth/Google_PemVerifier.php (added)
-
tags/6.5.7/google-api-php-client/src/auth/Google_Signer.php (added)
-
tags/6.5.7/google-api-php-client/src/auth/Google_Verifier.php (added)
-
tags/6.5.7/google-api-php-client/src/cache (added)
-
tags/6.5.7/google-api-php-client/src/cache/Google_ApcCache.php (added)
-
tags/6.5.7/google-api-php-client/src/cache/Google_Cache.php (added)
-
tags/6.5.7/google-api-php-client/src/cache/Google_FileCache.php (added)
-
tags/6.5.7/google-api-php-client/src/cache/Google_MemcacheCache.php (added)
-
tags/6.5.7/google-api-php-client/src/config.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_AdExchangeSellerService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_AdexchangebuyerService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_AdsensehostService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_AnalyticsService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_AndroidpublisherService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_AppstateService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_AuditService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_BigqueryService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_BloggerService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_BooksService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_CalendarService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_CivicInfoService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_ComputeService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_CoordinateService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_CustomsearchService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_DatastoreService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_DfareportingService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_DirectoryService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_DriveService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_FreebaseService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_FusiontablesService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_GamesManagementService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_GamesService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_GanService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_GroupssettingsService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_LatitudeService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_LicensingService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_MirrorService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_ModeratorService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_Oauth2Service.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_OrkutService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_PagespeedonlineService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_PlusDomainsService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_PlusMomentsService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_PlusService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_PredictionService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_ReportsService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_ResellerService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_SQLAdminService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_ShoppingService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_SiteVerificationService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_StorageService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_TaskqueueService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_TasksService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_TranslateService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_UrlshortenerService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_WebfontsService.php (added)
-
tags/6.5.7/google-api-php-client/src/contrib/Google_YouTubeAnalyticsService.php (added)
-
tags/6.5.7/google-api-php-client/src/external (added)
-
tags/6.5.7/google-api-php-client/src/external/URITemplateParser.php (added)
-
tags/6.5.7/google-api-php-client/src/io (added)
-
tags/6.5.7/google-api-php-client/src/io/Google_CacheParser.php (added)
-
tags/6.5.7/google-api-php-client/src/io/Google_CurlIO.php (added)
-
tags/6.5.7/google-api-php-client/src/io/Google_HttpRequest.php (added)
-
tags/6.5.7/google-api-php-client/src/io/Google_HttpStreamIO.php (added)
-
tags/6.5.7/google-api-php-client/src/io/Google_IO.php (added)
-
tags/6.5.7/google-api-php-client/src/io/Google_REST.php (added)
-
tags/6.5.7/google-api-php-client/src/io/cacerts.pem (added)
-
tags/6.5.7/google-api-php-client/src/local_config.php (added)
-
tags/6.5.7/google-api-php-client/src/service (added)
-
tags/6.5.7/google-api-php-client/src/service/Google_BatchRequest.php (added)
-
tags/6.5.7/google-api-php-client/src/service/Google_MediaFileUpload.php (added)
-
tags/6.5.7/google-api-php-client/src/service/Google_Model.php (added)
-
tags/6.5.7/google-api-php-client/src/service/Google_Service.php (added)
-
tags/6.5.7/google-api-php-client/src/service/Google_ServiceResource.php (added)
-
tags/6.5.7/google-api-php-client/src/service/Google_Utils.php (added)
-
tags/6.5.7/google-api-php-client/static (added)
-
tags/6.5.7/google-api-php-client/static/Credentials.png (added)
-
tags/6.5.7/images (added)
-
tags/6.5.7/images/products (added)
-
tags/6.5.7/images/products/appsumo-logo.png (added)
-
tags/6.5.7/images/products/appsumo-logo.svg (added)
-
tags/6.5.7/images/products/kingsumo-logo.svg (added)
-
tags/6.5.7/images/products/sendfox-logo.svg (added)
-
tags/6.5.7/images/products/sumo-logo.png (added)
-
tags/6.5.7/jquery.flot.min.js (added)
-
tags/6.5.7/jquery.sparkline.min.js (added)
-
tags/6.5.7/localizations (added)
-
tags/6.5.7/localizations/google-analyticator-es_ES.mo (added)
-
tags/6.5.7/localizations/google-analyticator-es_ES.po (added)
-
tags/6.5.7/localizations/google-analyticator-nl_NL.mo (added)
-
tags/6.5.7/localizations/google-analyticator-nl_NL.po (added)
-
tags/6.5.7/localizations/google-analyticator-pl_PL.mo (added)
-
tags/6.5.7/localizations/google-analyticator-pl_PL.po (added)
-
tags/6.5.7/localizations/google-analyticator-tr_TR.mo (added)
-
tags/6.5.7/localizations/google-analyticator-tr_TR.po (added)
-
tags/6.5.7/other_plugins.php (added)
-
tags/6.5.7/other_tools.php (added)
-
tags/6.5.7/privacy.png (added)
-
tags/6.5.7/readme.txt (added)
-
tags/6.5.7/screenshot-1.png (added)
-
tags/6.5.7/screenshot-2.png (added)
-
tags/6.5.7/screenshot-3.png (added)
-
tags/6.5.7/screenshot-4.png (added)
-
tags/6.5.7/screenshot-5.png (added)
-
tags/6.5.7/screenshot-6.png (added)
-
tags/6.5.7/scripts (added)
-
tags/6.5.7/scripts/google-analyticator-scripts.js (added)
-
tags/6.5.7/styles (added)
-
tags/6.5.7/styles/google-analyticator-style-common.css (added)
-
tags/6.5.7/styles/google-analyticator-style.css (added)
-
tags/6.5.7/wlcms-plugin-advert.png (added)
-
trunk/google-analyticator.php (modified) (33 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
google-analyticator/trunk/google-analyticator.php
r2839517 r2841294 2 2 /* 3 3 * Plugin Name: Analyticator 4 * Version: 6.5. 64 * Version: 6.5.7 5 5 * Plugin URI: http://www.videousermanuals.com/google-analyticator/?utm_campaign=analyticator&utm_medium=plugin&utm_source=readme-txt 6 6 * Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin you need to authenticate with Google, then select your domain and you're set. … … 13 13 //ini_set('display_errors', '1'); 14 14 15 define('GOOGLE_ANALYTICATOR_VERSION', '6.5. 6');15 define('GOOGLE_ANALYTICATOR_VERSION', '6.5.7'); 16 16 17 17 define('GOOGLE_ANALYTICATOR_CLIENTID', '1007949979410.apps.googleusercontent.com'); … … 247 247 <p>You need to sign in to Google and grant this plugin access to your Google Analytics account</p> 248 248 <p> <a 249 onclick="window.open('https://accounts.google.com/o/oauth2/auth?<?php echo $url?>', 'activate','width=700, height=600, menubar=0, status=0, location=0, toolbar=0')"249 onclick="window.open('https://accounts.google.com/o/oauth2/auth?<?php echo esc_url($url) ?>', 'activate','width=700, height=600, menubar=0, status=0, location=0, toolbar=0')" 250 250 target="_blank" 251 href="javascript:void(0);"> Click Here </a> - <small> Or <a target="_blank" href="https://accounts.google.com/o/oauth2/auth?<?php echo $url?>">here</a> if you have popups blocked</small> </p>251 href="javascript:void(0);"> Click Here </a> - <small> Or <a target="_blank" href="https://accounts.google.com/o/oauth2/auth?<?php echo esc_url($url) ?>">here</a> if you have popups blocked</small> </p> 252 252 <div id="key"> 253 253 <p>Enter your Google Authentication Code in this box. This code will be used to get an Authentication Token so you can access your website stats.</p> 254 <form method="post" action="<?php echo ga_analyticator_setting_url();?>">254 <form method="post" action="<?php echo esc_url(ga_analyticator_setting_url());?>"> 255 255 <?php wp_nonce_field('google-analyticator-update_settings'); ?> 256 256 <input type="text" name="key_ga_google_token" value="" style="width:450px;"/> … … 266 266 <p>If you don't want to authenticate through Google and only use the tracking capability of the plugin (<strong><u>not the dashboard functionality</u></strong>), you can do this by clicking the button below. </p> 267 267 <p>You will be asked on the next page to manually enter your Google Analytics UID.</p> 268 <form method="post" action="<?php echo ga_analyticator_setting_url();?>">268 <form method="post" action="<?php echo esc_url(ga_analyticator_setting_url());?>"> 269 269 <input type="hidden" name="key_ga_google_token" value="" /> 270 270 <?php wp_nonce_field('google-analyticator-update_settings'); ?> … … 485 485 486 486 // Give an updated message 487 echo "<div class='updated settings-error notice is-dismissible'><p><strong>" . __('Google Analyticator settings saved.', 'google-analyticator') . "</strong></p><button type='button' class='notice-dismiss'><span class='screen-reader-text'>Dismiss this notice.</span></button></div>";487 echo "<div class='updated settings-error notice is-dismissible'><p><strong>" . esc_html__('Google Analyticator settings saved.', 'google-analyticator') . "</strong></p><button type='button' class='notice-dismiss'><span class='screen-reader-text'>Dismiss this notice.</span></button></div>"; 488 488 } 489 489 // Are we using the auth system? … … 500 500 501 501 <?php endif ?> 502 <form method="post" action="<?php echo ga_analyticator_setting_url();?>">502 <form method="post" action="<?php echo esc_url(ga_analyticator_setting_url());?>"> 503 503 <?php 504 504 # Add a nonce … … 507 507 <?php if (get_option(key_ga_status) == ga_disabled) { ?> 508 508 <div style="margin:10px auto; border:3px #f00 solid; background-color:#fdd; color:#000; padding:10px; text-align:center;"> 509 <?php _e('Google Analytics integration is currently <strong>DISABLED</strong>.', 'google-analyticator'); ?> 509 <?php //phpcs:ignore ?> 510 <?php _e('Google Analytics integration is currently <strong>DISABLED</strong>.', 'google-analyticator'); ?> 510 511 </div> 511 512 <?php } ?> 512 513 <?php if ((get_option(key_ga_uid) == "XX-XXXXX-X") && (get_option(key_ga_status) != ga_disabled)) { ?> 513 514 <div style="margin:10px auto; border:3px #f00 solid; background-color:#fdd; color:#000; padding:10px; text-align:center;"> 514 <?php _e('Google Analytics integration is currently enabled, but you did not enter a UID. Tracking will not occur.', 'google-analyticator'); ?>515 <?php esc_html_e('Google Analytics integration is currently enabled, but you did not enter a UID. Tracking will not occur.', 'google-analyticator'); ?> 515 516 </div> 516 517 <?php } ?> … … 521 522 <tr> 522 523 <td colspan="2" style="padding-left:0"><h3> 523 <?php _e('Basic Settings', 'google-analyticator'); ?>524 <?php esc_html_e('Basic Settings', 'google-analyticator'); ?> 524 525 </h3></td> 525 526 </tr> 526 527 527 528 <tr> 528 <th width="35%" valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_status?>">529 <?php _e('Google Analytics logging is', 'google-analyticator'); ?>:</label>529 <th width="35%" valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_status) ?>"> 530 <?php esc_html_e('Google Analytics logging is', 'google-analyticator'); ?>:</label> 530 531 </th> 531 532 <td> 532 533 <?php 533 echo "<select name='". key_ga_status."' id='".key_ga_status."'>\n";534 535 echo "<option value='". ga_enabled."'";534 echo "<select name='".esc_attr(key_ga_status)."' id='".esc_attr(key_ga_status)."'>\n"; 535 536 echo "<option value='".esc_attr(ga_enabled)."'"; 536 537 if(get_option(key_ga_status) == ga_enabled) 537 538 echo " selected='selected'"; 538 echo ">" . __('Enabled', 'google-analyticator') . "</option>\n";539 540 echo "<option value='". ga_disabled."'";539 echo ">" . esc_html__('Enabled', 'google-analyticator') . "</option>\n"; 540 541 echo "<option value='".esc_attr(ga_disabled)."'"; 541 542 if(get_option(key_ga_status) == ga_disabled) 542 543 echo" selected='selected'"; 543 echo ">" . __('Disabled', 'google-analyticator') . "</option>\n";544 echo ">" . esc_html__('Disabled', 'google-analyticator') . "</option>\n"; 544 545 545 546 echo "</select>\n"; … … 549 550 </tr> 550 551 <tr id="ga_ajax_accounts"> 551 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_uid; ?>"><?php_e('Analytics Account', 'google-analyticator'); ?>:</label>552 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_uid); ?>"><?php esc_html_e('Analytics Account', 'google-analyticator'); ?>:</label> 552 553 </th> 553 554 <td> … … 560 561 $uids = ga_get_analytics_accounts(); 561 562 562 echo "<select name='". key_ga_uid."'> ";563 echo "<select name='".esc_attr(key_ga_uid)."'> "; 563 564 564 565 $hasSelected = false; // Will be set to true once a match is found. Cant echo selected twice. … … 566 567 foreach($uids as $id=>$domain): 567 568 568 echo '<option value="'. $id.'"';569 echo '<option value="'.esc_attr($id).'"'; 569 570 // If set in DB. 570 571 if( get_option(key_ga_uid) == $id ) { $hasSelected=true; echo ' selected="selected"'; } 571 572 // Else if the domain matches the current domain & nothing set in DB. 572 573 elseif( ( $_SERVER['HTTP_HOST'] == $domain ) && ( ! $hasSelected ) ) { $hasSelected=true; echo ' selected="selected"'; } 573 echo '>'. $domain.'</option>';574 echo '>'.esc_html($domain).'</option>'; 574 575 575 576 endforeach; … … 582 583 else: 583 584 584 echo '<input type="text" name="'. key_ga_uid.'" value="'. get_option( key_ga_uid) .'" />';585 echo '<input type="text" name="'.esc_attr(key_ga_uid).'" value="'. esc_attr(get_option( key_ga_uid )) .'" />'; 585 586 586 587 endif; 587 588 ?><br /> 588 <input type="checkbox" name="<?php echo key_ga_disable_gasites?>" id="<?php echo key_ga_disable_gasites?>"<?php if(get_option(key_ga_disable_gasites) == ga_enabled){?> checked="checked"<?php }?> /> <?php_e('Hide Google Analytics UID after saving', 'google-analyticator'); ?>589 <input type="checkbox" name="<?php echo esc_attr(key_ga_disable_gasites)?>" id="<?php echo esc_attr(key_ga_disable_gasites)?>"<?php if(get_option(key_ga_disable_gasites) == ga_enabled){?> checked="checked"<?php }?> /> <?php esc_html_e('Hide Google Analytics UID after saving', 'google-analyticator'); ?> 589 590 <?php }else{ 590 ?><?php echo get_option( 'ga_domain_name' ); ?> - To change this, you must <a href="<?php echo wp_nonce_url(admin_url('/options-general.php?page=ga_reset'), 'ga-reset'); ?>">deauthorize and reset the plugin</a>591 <input type="hidden" name="<?php echo key_ga_disable_gasites?>" value="<?php echo ga_enabled?>" /><input type="hidden" name="<?php echo key_ga_uid?>" value="<?php echo get_option(key_ga_uid)?>" />591 ?><?php echo esc_html(get_option( 'ga_domain_name' )); ?> - To change this, you must <a href="<?php echo esc_attr(wp_nonce_url(admin_url('/options-general.php?page=ga_reset'), 'ga-reset')); ?>">deauthorize and reset the plugin</a> 592 <input type="hidden" name="<?php echo esc_attr(key_ga_disable_gasites)?>" value="<?php echo esc_attr(ga_enabled)?>" /><input type="hidden" name="<?php echo esc_attr(key_ga_uid)?>" value="<?php echo esc_attr(get_option(key_ga_uid))?>" /> 592 593 <?php 593 594 }?> … … 595 596 </tr> 596 597 <tr> 597 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_analytic_snippet?>">598 <?php _e('Tracking Code', 'google-analyticator'); ?>:</label>599 </th> 600 <td><?php 601 echo "<select name='". key_ga_analytic_snippet."' id='".key_ga_analytic_snippet."'>\n";602 603 echo "<option value='". ga_disabled."'";598 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_analytic_snippet) ?>"> 599 <?php esc_html_e('Tracking Code', 'google-analyticator'); ?>:</label> 600 </th> 601 <td><?php 602 echo "<select name='".esc_attr(key_ga_analytic_snippet)."' id='".esc_attr(key_ga_analytic_snippet)."'>\n"; 603 604 echo "<option value='".esc_attr(ga_disabled)."'"; 604 605 if(get_option(key_ga_analytic_snippet) == ga_disabled) 605 606 echo" selected='selected'"; 606 echo ">" . __('Universal (analytics.js)', 'google-analyticator') . "</option>\n";607 608 echo "<option value='". ga_enabled."'";607 echo ">" . esc_html__('Universal (analytics.js)', 'google-analyticator') . "</option>\n"; 608 609 echo "<option value='".esc_attr(ga_enabled)."'"; 609 610 if(get_option(key_ga_analytic_snippet) == ga_enabled) 610 611 echo " selected='selected'"; 611 echo ">" . __('Traditional (ga.js)', 'google-analyticator') . "</option>\n";612 echo ">" . esc_html__('Traditional (ga.js)', 'google-analyticator') . "</option>\n"; 612 613 613 614 echo "</select>\n"; 614 615 ?> 615 616 <p class="setting-description"> 617 <?php // phpcs:ignore ?> 616 618 <?php _e('If you are using Universal Analytics make sure you have changed your account to a Universal Analytics property in Google Analytics. Read more about Universal Analytics <a href="https://support.google.com/analytics/answer/2817075?hl=en" target="_blank">here</a>.', 'google-analyticator'); ?> 617 619 </p> … … 619 621 </tr> 620 622 <tr> 621 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_widgets; ?>">622 <?php _e('Support us', 'google-analyticator'); ?>:</label>623 </th> 624 <td><?php 625 echo "<select name='". key_ga_show_ad."' id='".key_ga_show_ad."'>\n";623 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_widgets); ?>"> 624 <?php esc_html_e('Support us', 'google-analyticator'); ?>:</label> 625 </th> 626 <td><?php 627 echo "<select name='".esc_attr(key_ga_show_ad)."' id='".esc_attr(key_ga_show_ad)."'>\n"; 626 628 627 629 echo "<option value='1'"; 628 630 if(get_option(key_ga_show_ad) == '1') 629 631 echo " selected='selected'"; 630 echo ">" . __('Yes', 'google-analyticator') . "</option>\n";632 echo ">" . esc_html__('Yes', 'google-analyticator') . "</option>\n"; 631 633 632 634 echo "<option value='0' "; 633 635 if(get_option(key_ga_show_ad) == '0') 634 636 echo" selected='selected'"; 635 echo ">" . __('No', 'google-analyticator') . "</option>\n";637 echo ">" . esc_html__('No', 'google-analyticator') . "</option>\n"; 636 638 637 639 echo "</select>\n"; 638 640 ?> 639 641 <p class="setting-description"> 640 <?php _e('Show our link on the admin dashboard. Pretty please.', 'google-analyticator'); ?>642 <?php esc_html_e('Show our link on the admin dashboard. Pretty please.', 'google-analyticator'); ?> 641 643 </p></td> 642 644 </tr> … … 646 648 </tr> 647 649 <tr> 648 <td><input type="submit" class="button button-primary" name="info_update" value="<?php _e('Save Changes', 'google-analyticator'); ?>" /></td>650 <td><input type="submit" class="button button-primary" name="info_update" value="<?php esc_html_e('Save Changes', 'google-analyticator'); ?>" /></td> 649 651 </tr> 650 652 <tr> 651 653 <td colspan="2" style="padding-left:0"><h3> 652 <?php _e('Tracking Settings', 'google-analyticator'); ?>654 <?php esc_html_e('Tracking Settings', 'google-analyticator'); ?> 653 655 </h3></td> 654 656 </tr> 655 657 <tr> 656 658 <th valign="top" style="padding-top: 10px;"> <label> 657 <?php _e('Anonymize IP Addresses', 'google-analyticator'); ?>:</label>658 </th> 659 <td><?php 660 echo "<select name='". key_ga_annon."' id='".key_ga_annon."'>\n";659 <?php esc_html_e('Anonymize IP Addresses', 'google-analyticator'); ?>:</label> 660 </th> 661 <td><?php 662 echo "<select name='".esc_attr(key_ga_annon)."' id='".esc_attr(key_ga_annon)."'>\n"; 661 663 662 664 echo "<option value='0'"; 663 665 if(get_option(key_ga_annon) == false ) 664 666 echo " selected='selected'"; 665 echo ">" . __('No', 'google-analyticator') . "</option>\n";667 echo ">" . esc_html__('No', 'google-analyticator') . "</option>\n"; 666 668 667 669 echo "<option value='1'"; 668 670 if(get_option(key_ga_annon) == true) 669 671 echo" selected='selected'"; 670 echo ">" . __('Yes', 'google-analyticator') . "</option>\n";672 echo ">" . esc_html__('Yes', 'google-analyticator') . "</option>\n"; 671 673 672 674 echo "</select>\n"; … … 674 676 ?> 675 677 <p class="setting-description"> 676 <?php _e('By selecting "Yes", This tells Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage. Note that this will slightly reduce the accuracy of geographic reporting.', 'google-analyticator'); ?>677 </p></td> 678 </tr> 679 <tr> 680 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_admin?>">681 <?php _e('Track all logged in WordPress users', 'google-analyticator'); ?>:</label>682 </th> 683 <td><?php 684 echo "<select name='". key_ga_admin."' id='".key_ga_admin."'>\n";685 686 echo "<option value='". ga_enabled."'";678 <?php esc_html_e('By selecting "Yes", This tells Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage. Note that this will slightly reduce the accuracy of geographic reporting.', 'google-analyticator'); ?> 679 </p></td> 680 </tr> 681 <tr> 682 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_admin) ?>"> 683 <?php esc_html_e('Track all logged in WordPress users', 'google-analyticator'); ?>:</label> 684 </th> 685 <td><?php 686 echo "<select name='".esc_attr(key_ga_admin)."' id='".esc_attr(key_ga_admin)."'>\n"; 687 688 echo "<option value='".esc_attr(ga_enabled)."'"; 687 689 if(get_option(key_ga_admin) == ga_enabled) 688 690 echo " selected='selected'"; 689 echo ">" . __('Yes', 'google-analyticator') . "</option>\n";690 691 echo "<option value='". ga_disabled."'";691 echo ">" . esc_html__('Yes', 'google-analyticator') . "</option>\n"; 692 693 echo "<option value='".esc_attr(ga_disabled)."'"; 692 694 if(get_option(key_ga_admin) == ga_disabled) 693 695 echo" selected='selected'"; 694 echo ">" . __('No', 'google-analyticator') . "</option>\n";696 echo ">" . esc_html__('No', 'google-analyticator') . "</option>\n"; 695 697 696 698 echo "</select>\n"; … … 698 700 ?> 699 701 <p class="setting-description"> 700 <?php _e('Selecting "no" to this option will prevent logged in WordPress users from showing up on your Google Analytics reports. This setting will prevent yourself or other users from showing up in your Analytics reports. Use the next setting to determine what user groups to exclude.', 'google-analyticator'); ?>701 </p></td> 702 </tr> 703 <tr> 704 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_admin_role?>">705 <?php _e('User roles to not track', 'google-analyticator'); ?>:</label>702 <?php esc_html_e('Selecting "no" to this option will prevent logged in WordPress users from showing up on your Google Analytics reports. This setting will prevent yourself or other users from showing up in your Analytics reports. Use the next setting to determine what user groups to exclude.', 'google-analyticator'); ?> 703 </p></td> 704 </tr> 705 <tr> 706 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_admin_role) ?>"> 707 <?php esc_html_e('User roles to not track', 'google-analyticator'); ?>:</label> 706 708 </th> 707 709 <td><?php … … 713 715 # Loop through the roles 714 716 foreach ( $roles AS $role => $name ) { 715 echo '<input type="checkbox" value="' . $role . '" name="' . key_ga_admin_role. '[]"';717 echo '<input type="checkbox" value="' . esc_attr($role) . '" name="' . esc_attr(key_ga_admin_role) . '[]"'; 716 718 if ( in_array($role, $selected_roles) ) 717 719 echo " checked='checked'"; 718 720 $name_pos = strpos($name, '|'); 719 721 $name = ( $name_pos ) ? substr($name, 0, $name_pos) : $name; 720 echo ' /> ' . _x($name, 'User role') . '<br />';722 echo ' /> ' . esc_html($name, 'User role') . '<br />'; 721 723 } 722 724 ?> 723 725 <p class="setting-description"> 724 <?php _e('Specifies the user roles to not include in your WordPress Analytics report. If a user is logged into WordPress with one of these roles, they will not show up in your Analytics report.', 'google-analyticator'); ?>725 </p></td> 726 </tr> 727 <tr> 728 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_admin_disable?>">729 <?php _e('Method to prevent tracking', 'google-analyticator'); ?>:</label>730 </th> 731 <td><?php 732 echo "<select name='". key_ga_admin_disable."' id='".key_ga_admin_disable."'>\n";726 <?php esc_html_e('Specifies the user roles to not include in your WordPress Analytics report. If a user is logged into WordPress with one of these roles, they will not show up in your Analytics report.', 'google-analyticator'); ?> 727 </p></td> 728 </tr> 729 <tr> 730 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_admin_disable) ?>"> 731 <?php esc_html_e('Method to prevent tracking', 'google-analyticator'); ?>:</label> 732 </th> 733 <td><?php 734 echo "<select name='".esc_attr(key_ga_admin_disable)."' id='".esc_attr(key_ga_admin_disable)."'>\n"; 733 735 734 736 echo "<option value='remove'"; 735 737 if(get_option(key_ga_admin_disable) == 'remove') 736 738 echo " selected='selected'"; 737 echo ">" . __('Remove', 'google-analyticator') . "</option>\n";739 echo ">" . esc_html__('Remove', 'google-analyticator') . "</option>\n"; 738 740 739 741 echo "<option value='admin'"; 740 742 if(get_option(key_ga_admin_disable) == 'admin') 741 743 echo" selected='selected'"; 742 echo ">" . __('Use \'admin\' variable', 'google-analyticator') . "</option>\n";744 echo ">" . esc_html__('Use \'admin\' variable', 'google-analyticator') . "</option>\n"; 743 745 744 746 echo "</select>\n"; 745 747 ?> 746 <span class="ga_admin_disable_DimentionIndex_span"> <?php _e('Dimension Index', 'google-analyticator'); ?>:747 <input type="text" name="<?php echo key_ga_admin_disable_DimentionIndex?>" style="width:50px;" value="<?php echo get_option(key_ga_admin_disable_DimentionIndex)?>" class="<?php echo key_ga_admin_disable_DimentionIndex?>" id="<?php echo key_ga_admin_disable_DimentionIndex?>" />748 <span class="ga_admin_disable_DimentionIndex_span"> <?php esc_html_e('Dimension Index', 'google-analyticator'); ?>: 749 <input type="text" name="<?php echo esc_attr(key_ga_admin_disable_DimentionIndex)?>" style="width:50px;" value="<?php echo esc_attr(get_option(key_ga_admin_disable_DimentionIndex))?>" class="<?php echo esc_attr(key_ga_admin_disable_DimentionIndex)?>" id="<?php echo esc_attr(key_ga_admin_disable_DimentionIndex)?>" /> 748 750 </span> 749 751 <p class="setting-description"> 750 <?php _e('Selecting the "Remove" option will physically remove the tracking code from logged in users. Selecting the "Use \'admin\' variable" option will assign a variable called \'admin\' to logged in users. This option will allow Google Analytics\' site overlay feature to work, but you will have to manually configure Google Analytics to exclude tracking from pageviews with the \'admin\' variable.', 'google-analyticator'); ?>752 <?php esc_html_e('Selecting the "Remove" option will physically remove the tracking code from logged in users. Selecting the "Use \'admin\' variable" option will assign a variable called \'admin\' to logged in users. This option will allow Google Analytics\' site overlay feature to work, but you will have to manually configure Google Analytics to exclude tracking from pageviews with the \'admin\' variable.', 'google-analyticator'); ?> 751 753 </p></td> 752 754 </tr> 753 755 <tr> 754 756 <th valign="top" style="padding-top: 10px;"> <label> 755 <?php _e('Enable Remarketing, Demographics and Interests reports', 'google-analyticator'); ?>:</label>756 </th> 757 <td><?php 758 echo "<select name='". key_ga_remarketing."' id='".key_ga_remarketing."'>\n";757 <?php esc_html_e('Enable Remarketing, Demographics and Interests reports', 'google-analyticator'); ?>:</label> 758 </th> 759 <td><?php 760 echo "<select name='".esc_attr(key_ga_remarketing)."' id='".esc_attr(key_ga_remarketing)."'>\n"; 759 761 760 762 echo "<option value='0'"; 761 763 if(get_option(key_ga_remarketing) == '0' ) 762 764 echo" selected='selected'"; 763 echo ">" . __('No', 'google-analyticator') . "</option>\n";765 echo ">" . esc_html__('No', 'google-analyticator') . "</option>\n"; 764 766 765 767 … … 767 769 if(get_option(key_ga_remarketing) == '1' ) 768 770 echo " selected='selected'"; 769 echo ">" . __('Yes', 'google-analyticator') . "</option>\n";771 echo ">" . esc_html__('Yes', 'google-analyticator') . "</option>\n"; 770 772 771 773 … … 774 776 ?> 775 777 <p class="setting-description"> 778 <?php // phpcs:ignore ?> 776 779 <?php _e( 'In order to use remarketing, <a href="https://support.google.com/analytics/answer/2611270" target="_blank">please make sure you complete this checklist from Google</a>', 'google-analyticator'); ?> 777 780 </p> 778 781 <p class="setting-description"> 782 <?php // phpcs:ignore ?> 779 783 <?php _e( 'To use remarketing, <a href="https://support.google.com/analytics/answer/2884495" target="_blank">Edit permission</a> is required', 'google-analyticator'); ?> 780 784 </p></td> 781 785 </tr> 782 786 <tr> 783 <th valign="top" style="padding-top: 10px;"> <label><?php _e('Track WordPress Login Page', 'google-analyticator'); ?>:</label>784 </th> 785 <td><?php 786 echo "<select name='". key_ga_track_login."' id='".key_ga_track_login."'>\n";787 <th valign="top" style="padding-top: 10px;"> <label><?php esc_html_e('Track WordPress Login Page', 'google-analyticator'); ?>:</label> 788 </th> 789 <td><?php 790 echo "<select name='".esc_attr(key_ga_track_login)."' id='".esc_attr(key_ga_track_login)."'>\n"; 787 791 788 792 echo "<option value='1'"; 789 793 if(get_option(key_ga_track_login) == '1' ) 790 794 echo " selected='selected'"; 791 echo ">" . __('Yes', 'google-analyticator') . "</option>\n";795 echo ">" . esc_html__('Yes', 'google-analyticator') . "</option>\n"; 792 796 793 797 echo "<option value='0'"; 794 798 if(get_option(key_ga_track_login) == '0' ) 795 799 echo" selected='selected'"; 796 echo ">" . __('No', 'google-analyticator') . "</option>\n";800 echo ">" . esc_html__('No', 'google-analyticator') . "</option>\n"; 797 801 798 802 echo "</select>\n"; … … 800 804 ?> 801 805 <p class="setting-description"> 802 <?php _e( 'This will track all access to wp-login.php', 'google-analyticator'); ?>803 </p></td> 804 </tr> 805 <tr> 806 <td colspan="2" style="padding-left:0"><h3><?php _e('Link Tracking Settings', 'google-analyticator'); ?></h3></td>807 </tr> 808 <tr> 809 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_outbound?>">810 <?php _e('Outbound link tracking', 'google-analyticator'); ?>:</label>811 </th> 812 <td><?php 813 echo "<select name='". key_ga_outbound."' id='".key_ga_outbound."'>\n";814 815 echo "<option value='". ga_enabled."'";806 <?php esc_html_e( 'This will track all access to wp-login.php', 'google-analyticator'); ?> 807 </p></td> 808 </tr> 809 <tr> 810 <td colspan="2" style="padding-left:0"><h3><?php esc_html_e('Link Tracking Settings', 'google-analyticator'); ?></h3></td> 811 </tr> 812 <tr> 813 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_outbound) ?>"> 814 <?php esc_html_e('Outbound link tracking', 'google-analyticator'); ?>:</label> 815 </th> 816 <td><?php 817 echo "<select name='".esc_attr(key_ga_outbound)."' id='".esc_attr(key_ga_outbound)."'>\n"; 818 819 echo "<option value='".esc_attr(ga_enabled)."'"; 816 820 if(get_option(key_ga_outbound) == ga_enabled) 817 821 echo " selected='selected'"; 818 echo ">" . __('Enabled', 'google-analyticator') . "</option>\n";819 820 echo "<option value='". ga_disabled."'";822 echo ">" . esc_html__('Enabled', 'google-analyticator') . "</option>\n"; 823 824 echo "<option value='".esc_attr(ga_disabled)."'"; 821 825 if(get_option(key_ga_outbound) == ga_disabled) 822 826 echo" selected='selected'"; 823 echo ">" . __('Disabled', 'google-analyticator') . "</option>\n";827 echo ">" . esc_html__('Disabled', 'google-analyticator') . "</option>\n"; 824 828 825 829 echo "</select>\n"; 826 830 ?> 827 831 <p class="setting-description"> 828 <?php _e('Disabling this option will turn off the tracking of outbound links. It\'s recommended not to disable this option unless you\'re a privacy advocate (now why would you be using Google Analytics in the first place?) or it\'s causing some kind of weird issue.', 'google-analyticator'); ?>829 </p></td> 830 </tr> 831 <tr> 832 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_event?>">833 <?php _e('Event tracking', 'google-analyticator'); ?>:</label>834 </th> 835 <td><?php 836 echo "<select name='". key_ga_event."' id='".key_ga_event."'>\n";837 838 echo "<option value='". ga_enabled."'";832 <?php esc_html_e('Disabling this option will turn off the tracking of outbound links. It\'s recommended not to disable this option unless you\'re a privacy advocate (now why would you be using Google Analytics in the first place?) or it\'s causing some kind of weird issue.', 'google-analyticator'); ?> 833 </p></td> 834 </tr> 835 <tr> 836 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_event) ?>"> 837 <?php esc_html_e('Event tracking', 'google-analyticator'); ?>:</label> 838 </th> 839 <td><?php 840 echo "<select name='".esc_attr(key_ga_event)."' id='".esc_attr(key_ga_event)."'>\n"; 841 842 echo "<option value='".esc_attr(ga_enabled)."'"; 839 843 if(get_option(key_ga_event) == ga_enabled) 840 844 echo " selected='selected'"; 841 echo ">" . __('Enabled', 'google-analyticator') . "</option>\n";842 843 echo "<option value='". ga_disabled."'";845 echo ">" . esc_html__('Enabled', 'google-analyticator') . "</option>\n"; 846 847 echo "<option value='".esc_attr(ga_disabled)."'"; 844 848 if(get_option(key_ga_event) == ga_disabled) 845 849 echo" selected='selected'"; 846 echo ">" . __('Disabled', 'google-analyticator') . "</option>\n";850 echo ">" . esc_html__('Disabled', 'google-analyticator') . "</option>\n"; 847 851 848 852 echo "</select>\n"; 849 853 ?> 850 854 <p class="setting-description"> 855 <?php // phpcs:ignore ?> 851 856 <?php _e('Enabling this option will treat outbound links and downloads as events instead of pageviews. Since the introduction of <a href="https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide">event tracking in Analytics</a>, this is the recommended way to track these types of actions. Only disable this option if you must use the old pageview tracking method.', 'google-analyticator'); ?> 852 857 </p></td> 853 858 </tr> 854 859 <tr> 855 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_enhanced_link_attr?>">856 <?php _e('Enhanced Link Attribution', 'google-analyticator'); ?>:</label>857 </th> 858 <td><?php 859 echo "<select name='". key_ga_enhanced_link_attr."' id='".key_ga_enhanced_link_attr."'>\n";860 861 echo "<option value='". ga_enabled."'";860 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_enhanced_link_attr) ?>"> 861 <?php esc_html_e('Enhanced Link Attribution', 'google-analyticator'); ?>:</label> 862 </th> 863 <td><?php 864 echo "<select name='".esc_attr(key_ga_enhanced_link_attr)."' id='".esc_attr(key_ga_enhanced_link_attr)."'>\n"; 865 866 echo "<option value='".esc_attr(ga_enabled)."'"; 862 867 if(get_option(key_ga_enhanced_link_attr) == ga_enabled) 863 868 echo " selected='selected'"; 864 echo ">" . __('Enabled', 'google-analyticator') . "</option>\n";865 866 echo "<option value='". ga_disabled."'";869 echo ">" . esc_html__('Enabled', 'google-analyticator') . "</option>\n"; 870 871 echo "<option value='".esc_attr(ga_disabled)."'"; 867 872 if(get_option(key_ga_enhanced_link_attr) == ga_disabled ) 868 873 echo " selected='selected'"; 869 echo ">" . __('Disabled', 'google-analyticator') . "</option>\n";874 echo ">" . esc_html__('Disabled', 'google-analyticator') . "</option>\n"; 870 875 871 876 echo "</select>\n"; 872 877 ?> 873 878 <p class="setting-description"> 879 <?php // phpcs:ignore ?> 874 880 <?php _e('You can tag your pages to implement an enhanced link-tracking functionality by enabling this option. <a href="https://support.google.com/analytics/answer/2558867?hl=en" target="_blank">learn more</a>', 'google-analyticator'); ?> 875 881 </p></td> 876 882 </tr> 877 883 <tr> 878 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_downloads; ?>"><?php_e('Download extensions to track', 'google-analyticator'); ?>:</label>884 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_downloads); ?>"><?php esc_html_e('Download extensions to track', 'google-analyticator'); ?>:</label> 879 885 </th> 880 886 <td><?php 881 887 echo "<input type='text' size='50' "; 882 echo "name='".key_ga_downloads."' "; 883 echo "id='".key_ga_downloads."' "; 884 echo "value='".wp_filter_kses(get_option(key_ga_downloads))."' />\n"; 885 ?> 886 <p class="setting-description"> 888 echo "name='".esc_attr(key_ga_downloads)."' "; 889 echo "id='".esc_attr(key_ga_downloads)."' "; 890 echo "value='".esc_attr(wp_filter_kses(get_option(key_ga_downloads)))."' />\n"; 891 ?> 892 <p class="setting-description"> 893 <?php // phpcs:ignore ?> 887 894 <?php _e('Enter any extensions of files you would like to be tracked as a download. For example to track all MP3s and PDFs enter <strong>mp3,pdf</strong>. <em>Outbound link tracking must be enabled for downloads to be tracked.</em>', 'google-analyticator'); ?> 888 895 </p></td> 889 896 </tr> 890 897 <tr> 891 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_outbound_prefix; ?>">892 <?php _e('Prefix external links with', 'google-analyticator'); ?>:</label>898 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_outbound_prefix); ?>"> 899 <?php esc_html_e('Prefix external links with', 'google-analyticator'); ?>:</label> 893 900 </th> 894 901 <td><?php 895 902 echo "<input type='text' size='50' "; 896 echo "name='". key_ga_outbound_prefix."' ";897 echo "id='". key_ga_outbound_prefix."' ";898 echo "value='". stripslashes( wp_filter_kses(get_option(key_ga_outbound_prefix)))."' />\n";899 ?> 900 <p class="setting-description"> 901 <?php _e('Enter a name for the section tracked external links will appear under. This option has no effect if event tracking is enabled.', 'google-analyticator'); ?>903 echo "name='".esc_attr(key_ga_outbound_prefix)."' "; 904 echo "id='".esc_attr(key_ga_outbound_prefix)."' "; 905 echo "value='". esc_attr( wp_filter_kses(get_option(key_ga_outbound_prefix)))."' />\n"; 906 ?> 907 <p class="setting-description"> 908 <?php esc_html_e('Enter a name for the section tracked external links will appear under. This option has no effect if event tracking is enabled.', 'google-analyticator'); ?> 902 909 </em></p></td> 903 910 </tr> 904 911 <tr> 905 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_downloads_prefix; ?>">906 <?php _e('Prefix download links with', 'google-analyticator'); ?>:</label>912 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_downloads_prefix); ?>"> 913 <?php esc_html_e('Prefix download links with', 'google-analyticator'); ?>:</label> 907 914 </th> 908 915 <td><?php 909 916 echo "<input type='text' size='50' "; 910 echo "name='". key_ga_downloads_prefix."' ";911 echo "id='". key_ga_downloads_prefix."' ";912 echo "value='". stripslashes(wp_filter_kses ( get_option(key_ga_downloads_prefix) ))."' />\n";913 ?> 914 <p class="setting-description"> 915 <?php _e('Enter a name for the section tracked download links will appear under. This option has no effect if event tracking is enabled.', 'google-analyticator'); ?>917 echo "name='".esc_attr(key_ga_downloads_prefix)."' "; 918 echo "id='".esc_attr(key_ga_downloads_prefix)."' "; 919 echo "value='".esc_attr(wp_filter_kses ( get_option(key_ga_downloads_prefix) ))."' />\n"; 920 ?> 921 <p class="setting-description"> 922 <?php esc_html_e('Enter a name for the section tracked download links will appear under. This option has no effect if event tracking is enabled.', 'google-analyticator'); ?> 916 923 </em></p></td> 917 924 </tr> 918 925 <tr> 919 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_adsense; ?>">920 <?php _e('Google Adsense ID', 'google-analyticator'); ?>:</label>926 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_adsense); ?>"> 927 <?php esc_html_e('Google Adsense ID', 'google-analyticator'); ?>:</label> 921 928 </th> 922 929 <td><?php 923 930 echo "<input type='text' size='50' "; 924 echo "name='". key_ga_adsense."' ";925 echo "id='". key_ga_adsense."' ";926 echo "value='". get_option(key_ga_adsense)."' />\n";927 ?> 928 <p class="setting-description"> 929 <?php _e('Enter your Google Adsense ID assigned by Google Analytics in this box. This enables Analytics tracking of Adsense information if your Adsense and Analytics accounts are linked.', 'google-analyticator'); ?>930 </p></td> 931 </tr> 932 <tr> 933 <td colspan="2" style="padding-left:0"><h3><?php _e('Additional Tracking Code', 'google-analyticator'); ?></h3></td>934 </tr> 935 <tr> 936 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_extra; ?>">937 <?php _e('Additional tracking code', 'google-analyticator'); ?>938 <br />(<?php _e('before tracker initialization', 'google-analyticator'); ?>):</label>931 echo "name='".esc_attr(key_ga_adsense)."' "; 932 echo "id='".esc_attr(key_ga_adsense)."' "; 933 echo "value='".esc_attr(get_option(key_ga_adsense))."' />\n"; 934 ?> 935 <p class="setting-description"> 936 <?php esc_html_e('Enter your Google Adsense ID assigned by Google Analytics in this box. This enables Analytics tracking of Adsense information if your Adsense and Analytics accounts are linked.', 'google-analyticator'); ?> 937 </p></td> 938 </tr> 939 <tr> 940 <td colspan="2" style="padding-left:0"><h3><?php esc_html_e('Additional Tracking Code', 'google-analyticator'); ?></h3></td> 941 </tr> 942 <tr> 943 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_extra); ?>"> 944 <?php esc_html_e('Additional tracking code', 'google-analyticator'); ?> 945 <br />(<?php esc_html_e('before tracker initialization', 'google-analyticator'); ?>):</label> 939 946 </th> 940 947 <td><?php 941 948 echo "<textarea cols='50' rows='8' "; 942 echo "name='".key_ga_extra."' "; 943 echo "id='".key_ga_extra."'>"; 944 echo stripslashes(get_option(key_ga_extra))."</textarea>\n"; 945 ?> 946 <p class="setting-description"> 949 echo "name='".esc_attr(key_ga_extra)."' "; 950 echo "id='".esc_attr(key_ga_extra)."'>"; 951 echo esc_textarea(get_option(key_ga_extra))."</textarea>\n"; 952 ?> 953 <p class="setting-description"> 954 <?php // phpcs:ignore ?> 947 955 <?php _e('Enter any additional lines of tracking code that you would like to include in the Google Analytics tracking script. The code in this section will be displayed <strong>before</strong> the Google Analytics tracker is initialized.', 'google-analyticator'); ?> 948 956 </p></td> 949 957 </tr> 950 958 <tr> 951 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_extra_after; ?>">952 <?php _e('Additional tracking code', 'google-analyticator'); ?>959 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_extra_after); ?>"> 960 <?php esc_html_e('Additional tracking code', 'google-analyticator'); ?> 953 961 <br /> 954 (<?php _e('after tracker initialization', 'google-analyticator'); ?>):</label>962 (<?php esc_html_e('after tracker initialization', 'google-analyticator'); ?>):</label> 955 963 </th> 956 964 <td><?php 957 965 echo "<textarea cols='50' rows='8' "; 958 echo "name='".key_ga_extra_after."' "; 959 echo "id='".key_ga_extra_after."'>"; 960 echo stripslashes(get_option(key_ga_extra_after))."</textarea>\n"; 961 ?> 962 <p class="setting-description"> 966 echo "name='".esc_attr(key_ga_extra_after)."' "; 967 echo "id='".esc_attr(key_ga_extra_after)."'>"; 968 echo esc_textarea(get_option(key_ga_extra_after))."</textarea>\n"; 969 ?> 970 <p class="setting-description"> 971 <?php // phpcs:ignore ?> 963 972 <?php _e('Enter any additional lines of tracking code that you would like to include in the Google Analytics tracking script. The code in this section will be displayed <strong>after</strong> the Google Analytics tracker is initialized.', 'google-analyticator'); ?> 964 973 </p></td> 965 974 </tr> 966 975 <tr> 967 <td colspan="2" style="padding-left:0"><h3><?php _e('Admin Dashboard Widgets', 'google-analyticator'); ?></h3>976 <td colspan="2" style="padding-left:0"><h3><?php esc_html_e('Admin Dashboard Widgets', 'google-analyticator'); ?></h3> 968 977 <?php if(!$useAuth): ?> 969 978 <div style="margin:10px auto; border:3px #f00 solid; background-color:#fdd; color:#000; padding:10px; text-align:center;"> 970 <?php _e('You have not authenticated with Google - you cannot use dashboard widgets! Reset the plugin to authenticate..', 'google-analyticator'); ?>979 <?php esc_html_e('You have not authenticated with Google - you cannot use dashboard widgets! Reset the plugin to authenticate..', 'google-analyticator'); ?> 971 980 </div> 972 981 <?php endif;?></td> 973 982 </tr> 974 983 <tr<?php if(!$useAuth){echo ' style="display:none"';}?>> 975 <th valign="top" style="padding-top: 10px;"><label for="<?php echo key_ga_widgets; ?>">976 <?php _e('Include widgets', 'google-analyticator'); ?>:</label></th>977 <td><?php 978 echo "<select name='". key_ga_widgets."' id='".key_ga_widgets."'>\n";979 980 echo "<option value='". ga_enabled."'";984 <th valign="top" style="padding-top: 10px;"><label for="<?php echo esc_attr(key_ga_widgets); ?>"> 985 <?php esc_html_e('Include widgets', 'google-analyticator'); ?>:</label></th> 986 <td><?php 987 echo "<select name='".esc_attr(key_ga_widgets)."' id='".esc_attr(key_ga_widgets)."'>\n"; 988 989 echo "<option value='".esc_attr(ga_enabled)."'"; 981 990 if(get_option(key_ga_widgets) == ga_enabled) 982 991 echo " selected='selected'"; 983 echo ">" . __('Enabled', 'google-analyticator') . "</option>\n";984 985 echo "<option value='". ga_disabled."'";992 echo ">" . esc_html__('Enabled', 'google-analyticator') . "</option>\n"; 993 994 echo "<option value='".esc_attr(ga_disabled)."'"; 986 995 if(get_option(key_ga_widgets) == ga_disabled) 987 996 echo" selected='selected'"; 988 echo ">" . __('Disabled', 'google-analyticator') . "</option>\n";997 echo ">" . esc_html__('Disabled', 'google-analyticator') . "</option>\n"; 989 998 990 999 echo "</select>\n"; 991 1000 ?> 992 1001 <p class="setting-description"> 993 <?php _e('Disabling this option will completely remove the Dashboard Summary widget and the theme Stats widget. Use this option if you would prefer to not see the widgets.', 'google-analyticator'); ?>1002 <?php esc_html_e('Disabling this option will completely remove the Dashboard Summary widget and the theme Stats widget. Use this option if you would prefer to not see the widgets.', 'google-analyticator'); ?> 994 1003 </p></td> 995 1004 </tr> 996 1005 <tr<?php if(!$useAuth){echo ' style="display:none"';}?>> 997 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo key_ga_dashboard_role?>">998 <?php _e('User roles that can see the dashboard widget', 'google-analyticator'); ?>:</label>1006 <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_dashboard_role) ?>"> 1007 <?php esc_html_e('User roles that can see the dashboard widget', 'google-analyticator'); ?>:</label> 999 1008 </th> 1000 1009 <td><?php … … 1006 1015 # Loop through the roles 1007 1016 foreach ( $roles AS $role => $name ) { 1008 echo '<input type="checkbox" value="' . $role . '" name="' . key_ga_dashboard_role. '[]"';1017 echo '<input type="checkbox" value="' . esc_attr($role) . '" name="' . esc_attr(key_ga_dashboard_role) . '[]"'; 1009 1018 if ( in_array($role, $selected_roles) ) 1010 1019 echo " checked='checked'"; 1011 1020 $name_pos = strpos($name, '|'); 1012 1021 $name = ( $name_pos ) ? substr($name, 0, $name_pos) : $name; 1013 echo ' /> ' . _x($name, 'User role') . '<br />';1022 echo ' /> ' . esc_html($name, 'User role') . '<br />'; 1014 1023 } 1015 1024 ?> 1016 1025 <p class="setting-description"> 1017 <?php _e('Specifies the user roles that can see the dashboard widget. If a user is not in one of these role groups, they will not see the dashboard widget.', 'google-analyticator'); ?>1026 <?php esc_html_e('Specifies the user roles that can see the dashboard widget. If a user is not in one of these role groups, they will not see the dashboard widget.', 'google-analyticator'); ?> 1018 1027 </p></td> 1019 1028 </tr> … … 1021 1030 </table> 1022 1031 <p class="submit"> 1023 <input type="submit" class="button button-primary" name="info_update" value="<?php _e('Save Changes', 'google-analyticator'); ?>" />1032 <input type="submit" class="button button-primary" name="info_update" value="<?php esc_attr_e('Save Changes', 'google-analyticator'); ?>" /> 1024 1033 </p> 1025 <a href="<?php echo ga_analyticator_setting_url(). '&pageaction=ga_clear_cache' ?>"><?php _e('Clear Analyticator Cache', 'google-analyticator'); ?></a> | <a href="<?php echo wp_nonce_url( admin_url('/options-general.php?page=ga_reset'), 'ga-reset'); ?>">1026 <?php _e('Deauthorize & Reset Google Analyticator.', 'google-analyticator'); ?></a>1034 <a href="<?php echo esc_url(ga_analyticator_setting_url()). '&pageaction=ga_clear_cache' ?>"><?php esc_html_e('Clear Analyticator Cache', 'google-analyticator'); ?></a> | <a href="<?php echo esc_url(wp_nonce_url( admin_url('/options-general.php?page=ga_reset'), 'ga-reset')); ?>"> 1035 <?php esc_html_e('Deauthorize & Reset Google Analyticator.', 'google-analyticator'); ?></a> 1027 1036 </form> 1028 1037 … … 1144 1153 { 1145 1154 # Add the notice that Google Analyticator tracking is enabled 1146 echo "<!-- Google Analytics Tracking by Google Analyticator " . GOOGLE_ANALYTICATOR_VERSION. " -->\n";1155 echo "<!-- Google Analytics Tracking by Google Analyticator " . esc_html(GOOGLE_ANALYTICATOR_VERSION) . " -->\n"; 1147 1156 1148 1157 # Add the Adsense data if specified 1149 1158 if ( get_option(key_ga_adsense) != '' ) 1150 echo '<script type="text/javascript">window.google_analytics_uacct = "' . get_option(key_ga_adsense) . "\";</script>\n";1159 echo '<script type="text/javascript">window.google_analytics_uacct = "' . esc_attr(get_option(key_ga_adsense)) . "\";</script>\n"; 1151 1160 1152 1161 # Include the file types to track … … 1165 1174 ?> 1166 1175 <script type="text/javascript"> 1167 var analyticsFileTypes = [<?php echo strtolower($ext); ?>];1176 var analyticsFileTypes = [<?php echo esc_js($ext ? '' : strtolower($ext) ); ?>]; 1168 1177 <?php if ( $event_tracking != 'enabled' ) { ?> 1169 var analyticsOutboundPrefix = '/<?php echo $outbound_prefix; ?>/';1170 var analyticsDownloadsPrefix = '/<?php echo $downloads_prefix; ?>/';1178 var analyticsOutboundPrefix = '/<?php echo esc_js($outbound_prefix); ?>/'; 1179 var analyticsDownloadsPrefix = '/<?php echo esc_js($downloads_prefix); ?>/'; 1171 1180 <?php } ?> 1172 var analyticsSnippet = '<?php echo $jsanalytic_snippet; ?>';1173 var analyticsEventTracking = '<?php echo $event_tracking; ?>';1181 var analyticsSnippet = '<?php echo esc_js($jsanalytic_snippet); ?>'; 1182 var analyticsEventTracking = '<?php echo esc_js($event_tracking); ?>'; 1174 1183 </script> 1175 1184 <?php … … 1183 1192 _gaq.push(['_require', 'inpage_linkid', pluginUrl]); 1184 1193 <?php endif; ?> 1185 _gaq.push(['_setAccount', '<?php echo $uid; ?>']);1194 _gaq.push(['_setAccount', '<?php echo esc_js($uid); ?>']); 1186 1195 _gaq.push(['_addDevId', 'i9k95']); // Google Analyticator App ID with Google 1187 1196 <?php if ($need_to_annon == '1' ): ?> … … 1193 1202 do_action('google_analyticator_extra_js_before'); 1194 1203 if ( '' != $extra ) 1195 echo " $extra\n";1204 echo esc_js(" $extra\n"); 1196 1205 1197 1206 # Add the track pageview function … … 1205 1214 do_action('google_analyticator_extra_js_after'); 1206 1215 if ( '' != $extra_after ) 1207 echo " $extra_after\n";1216 echo esc_js(" $extra_after\n"); 1208 1217 1209 1218 # Add the final section of the tracking code … … 1226 1235 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 1227 1236 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 1228 ga('create', '<?php echo $uid; ?>', 'auto');1237 ga('create', '<?php echo esc_js($uid); ?>', 'auto'); 1229 1238 <?php if(get_option(key_ga_enhanced_link_attr) == ga_enabled): ?> 1230 1239 ga('require', 'linkid', 'linkid.js'); … … 1240 1249 # Add any tracking code before the trackPageview 1241 1250 do_action('google_analyticator_extra_js_before'); 1242 if ( '' != $extra ) echo " $extra\n";1251 if ( '' != $extra ) echo esc_js(" $extra\n"); 1243 1252 ?> 1244 1253 <?php 1245 1254 $dimentionKeyVal = get_option(key_ga_admin_disable_DimentionIndex); 1246 1255 if ( ( get_option(key_ga_admin_disable) == "admin" ) && ( ga_current_user_is(get_option(key_ga_admin_role)) ) && $dimentionKeyVal ) 1247 echo " ga('set', 'dimension". $dimentionKeyVal ."', 'admin');\n";1256 echo esc_js(" ga('set', 'dimension". $dimentionKeyVal ."', 'admin');\n"); 1248 1257 ?> 1249 1258 ga('send', 'pageview'); … … 1252 1261 do_action('google_analyticator_extra_js_after'); 1253 1262 if ( '' != $extra_after ) 1254 echo " $extra_after\n";1263 echo esc_js(" $extra_after\n"); 1255 1264 }?> 1256 1265 </script> … … 1259 1268 } else { 1260 1269 # Add the notice that Google Analyticator tracking is enabled 1261 echo "<!-- Google Analytics Tracking by Google Analyticator " . GOOGLE_ANALYTICATOR_VERSION. ": http://wordpress.org/plugins/google-analyticator/ -->\n";1262 echo " <!-- " . __('Tracking code is hidden, since the settings specify not to track admins. Tracking is occurring for non-admins.', 'google-analyticator') . " -->\n";1270 echo "<!-- Google Analytics Tracking by Google Analyticator " . esc_html(GOOGLE_ANALYTICATOR_VERSION) . ": http://wordpress.org/plugins/google-analyticator/ -->\n"; 1271 echo " <!-- " . esc_html__('Tracking code is hidden, since the settings specify not to track admins. Tracking is occurring for non-admins.', 'google-analyticator') . " -->\n"; 1263 1272 } 1264 1273 } … … 1410 1419 </style> 1411 1420 <div class="updated" id="ga_analyticator_global_notification" style="border:3px solid #317A96;position:relative;background:##3c9cc2;background-color:#3c9cc2;color:#ffffff;height:70px;"> 1412 <a class="notice-dismiss" href="<?php echo admin_url('admin.php?page=google-analyticator&ga_analyticator_global_notification=0'); ?>" style="right:165px;top:0;"></a>1413 <a href="<?php echo admin_url('admin.php?page=google-analyticator&ga_analyticator_global_notification=0'); ?>" style="position:absolute;top:9px;right:15px;color:#ffffff;">Dismiss and go to settings</a>1421 <a class="notice-dismiss" href="<?php echo esc_url(admin_url('admin.php?page=google-analyticator&ga_analyticator_global_notification=0')); ?>" style="right:165px;top:0;"></a> 1422 <a href="<?php echo esc_url(admin_url('admin.php?page=google-analyticator&ga_analyticator_global_notification=0')); ?>" style="position:absolute;top:9px;right:15px;color:#ffffff;">Dismiss and go to settings</a> 1414 1423 <p style="font-size:16px;line-height:50px;"> 1415 <?php _e('Grow your site faster!'); ?> <a style="background-color: #6267BE;border-color: #3C3F76;" href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox button button-primary">Get SumoMe WordPress Plugin</a>1424 <?php esc_html('Grow your site faster!'); ?> <a style="background-color: #6267BE;border-color: #3C3F76;" href="<?php echo esc_url(admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500')); ?>" class="thickbox button button-primary">Get SumoMe WordPress Plugin</a> 1416 1425 </p> 1417 1426 </div> -
google-analyticator/trunk/readme.txt
r2839517 r2841294 4 4 Requires at least: 3.2 5 5 Tested up to: 6.1.1 6 Stable tag: 6.5. 66 Stable tag: 6.5.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 73 73 74 74 == Changelog == 75 = 6.5.7 = 76 * Add some data escaping 77 75 78 = 6.5.6 = 76 79 * Fix deauthorize link nonce.
Note: See TracChangeset
for help on using the changeset viewer.