Plugin Directory

Changeset 200948

Timestamp:
02/02/2010 04:14:56 AM (15 years ago)
Author:
ShaneF
Message:

new localization strings

Location:
woopra/trunk
Files:
2 edited

Legend:

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

    r200933 r200948  
    1010 */
    1111class WoopraFrontend extends Woopra {
     12
     13
     14
     15
     16
     17
     18
    1219   
    1320    /**
     
    7279        //  Set jQuery Options
    7380        if ( $this->get_option('use_subdomain') )
    74             $_woopra_localize[] = array('rootDomain'    =>  $this->get_option('sub_domain')     );
     81            $)       );
    7582       
    7683        if ( $this->get_option('use_timeout') )
    77             $_woopra_localize[] = array('setTimeoutValue'   =>  ($this->get_option('timeout')*1000) );
     84            $this->create_localize( array('setTimeoutValue' =>  ($this->get_option('timeout')*1000) )       );
     85       
     86        //  For showing in the Woopra Desktop Application
     87        $this->create_localize( array('name'        =>  __('Name'))     );
     88        $this->create_localize( array('email'       =>  __('Email'))    );
    7889       
    7990        //  Output jQuery Options
    80         wp_localize_script( 'woopra-tracking', 'woopraFrontL10n', $_woopra_localize );
     91        wp_localize_script( 'woopra-tracking', 'woopraFrontL10n', $this->local );
     92    }
     93   
     94    /**
     95     * Create the localized array string.
     96     * @since 1.5.0
     97     * @param $array
     98     * @return none
     99     */
     100    function create_localize($array) {
     101        $this->local = array_merge($array , $this->local );
    81102    }
    82103   
  • woopra/trunk/js/jquery.tracking.js

    r200932 r200948  
    5757  $.trackWoopra = function(woopra_data) {
    5858        var script;
    59         var woopraFrontL10n;
    6059        var src  = 'http://static.woopra.com/js/woopra.v2.js';
    6160       
     
    7271                    }
    7372                }
    74                 woopraTracker.addVisitorProperty('name', woopra_data.name );
    75                 woopraTracker.addVisitorProperty('email', woopra_data.email );
    76                 woopraTracker.addVisitorProperty('avatar', woopra_data.avatar );
     73                woopraTracker.addVisitorProperty(, woopra_data.name );
     74                woopraTracker.addVisitorProperty(, woopra_data.email );
     75                woopraTracker.addVisitorProperty('avatar', woopra_data.avatar );
    7776                woopraTracker.track();
    7877                debug('Woopra is loaded.');
Note: See TracChangeset for help on using the changeset viewer.