Changeset 201033
- Timestamp:
- 02/02/2010 01:30:13 PM (15 years ago)
- Location:
- woopra/trunk/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
woopra/trunk/inc/admin.php
r200971 r201033 535 535 <th scope="row"><?php _e('Sub Domains', 'woopra') ?></th> 536 536 <td> 537 <input type="checkbox" value="1"<?php checked('1', $this->get_option('use_subdomain')); ?> id="use_subdomain" name=" use_subdomain"/> <label for="use_subdomain"><?php _e("Track Sub Domains"); ?></label><br /><small><?php printf( __('Enabled this if you want to track subdomains. Note: You must have an account that allows subdomain tracking. Please refer to the <a href="%s">account information</a> page for more information.', 'woopra'), 'https://www.woopra.com/members/'); ?></small>537 <input type="checkbox" value="1"<?php checked('1', $this->get_option('use_subdomain')); ?> id="use_subdomain" name=""/> <label for="use_subdomain"><?php _e("Track Sub Domains"); ?></label><br /><small><?php printf( __('Enabled this if you want to track subdomains. Note: You must have an account that allows subdomain tracking. Please refer to the <a href="%s">account information</a> page for more information.', 'woopra'), 'https://www.woopra.com/members/'); ?></small> 538 538 </td> 539 539 </tr> … … 580 580 */ 581 581 function content_page() { 582 $WoopraAnalytics = new WoopraAnalytics(); 582 $_woopra_tests = $this->init_test(); 583 $WoopraAnalytics = new WoopraAnalytics($_woopra_tests); 583 584 unset($WoopraAnalytics); 584 585 } -
woopra/trunk/inc/analytics.php
r200971 r201033 11 11 */ 12 12 class WoopraAnalytics extends WoopraAdmin { 13 14 /** 15 * Your Site API Key 16 * @since 1.4.1 17 * @var string 18 */ 19 var $api_key; 20 13 21 14 /** 22 15 * Display a notice telling the user to fill in their Woopra details 23 16 * @since 1.4.1 24 * @param object $item 17 * @param mixed $item 18 * @param string $item 25 19 * @return none 26 20 */ 27 function analytics_warn($item) { 28 $message[0] = '<div class="error"><p>' . sprintf( __( 'You must fill in your API Key in order to view Analytics. Please fill it out on the <a href="%s">settings page</a> in order for you to view your analytics.', 'woopra' ), admin_url('options-general.php?page=woopra') ) . "</p></div>\n"; 21 function analytics_warn($item, $custom = '') { 22 if ($item == false) { 23 echo '<div class="error"><p>' . $custom[0] . "</p></div>\n"; 24 return; 25 } else { 26 $message[0] = '<div class="error"><p>' . sprintf( __( 'You must fill in your API Key in order to view Analytics. Please fill it out on the <a href="%s">settings page</a> in order for you to view your analytics.', 'woopra' ), admin_url('options-general.php?page=woopra') ) . "</p></div>\n"; 27 } 28 29 29 echo $message[$item]; 30 30 } … … 45 45 * @constructor 46 46 */ 47 function __construct( ) {47 function __construct() { 48 48 WoopraAdmin::__construct(); 49 49 Woopra::__construct(); 50 50 51 51 // Load the API key into this Class 52 $ this->api_key = $this->get_option('api_key');52 $api_key = $this->get_option('api_key'); 53 53 54 54 ?> … … 58 58 <?php 59 59 60 if (empty($ this->api_key)) {60 if (empty($api_key)) { 61 61 $this->analytics_warn(0); 62 63 62 64 } else { 63 65 /** HTML CODE START **/
Note: See TracChangeset
for help on using the changeset viewer.