Plugin Directory

Changeset 201033

Timestamp:
02/02/2010 01:30:13 PM (15 years ago)
Author:
ShaneF
Message:

subdomain jQuery fix, added soap test when viewing analytics page.

Location:
woopra/trunk/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • woopra/trunk/inc/admin.php

    r200971 r201033  
    535535            <th scope="row"><?php _e('Sub Domains', 'woopra') ?></th>
    536536            <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>
    538538            </td>
    539539        </tr>
     
    580580     */
    581581    function content_page() {
    582         $WoopraAnalytics = new WoopraAnalytics();
     582        $_woopra_tests = $this->init_test();       
     583        $WoopraAnalytics = new WoopraAnalytics($_woopra_tests);
    583584        unset($WoopraAnalytics);
    584585    }
  • woopra/trunk/inc/analytics.php

    r200971 r201033  
    1111 */
    1212class 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       
    2114    /**
    2215     * Display a notice telling the user to fill in their Woopra details
    2316     * @since 1.4.1
    24      * @param object $item
     17     * @param mixed $item
     18     * @param string $item
    2519     * @return none
    2620     */
    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       
    2929        echo $message[$item];
    3030    }
     
    4545     * @constructor
    4646     */
    47     function __construct() {
     47    function __construct() {
    4848        WoopraAdmin::__construct();
    4949        Woopra::__construct();
    5050                   
    5151        //  Load the API key into this Class
    52         $this->api_key = $this->get_option('api_key');
     52        $api_key = $this->get_option('api_key');
    5353       
    5454        ?>
     
    5858        <?php
    5959       
    60         if (empty($this->api_key)) {
     60        if (empty($api_key)) {
    6161            $this->analytics_warn(0);
     62
     63
    6264        } else {
    6365            /** HTML CODE START **/
Note: See TracChangeset for help on using the changeset viewer.