Ignore:
Timestamp:
08/23/2010 03:25:08 AM (21 months ago)
Author:
ofer
Message:

Try to avoid some php notices and add some minor improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WordPress/plugin/transposh/wp/transposh_widget.php

    r500 r512  
    8686 
    8787        // Register widget 
    88         register_sidebar_widget(array('Transposh', 'widgets'), array(&$this, 'transposh_widget')); 
     88        wp_register_sidebar_widget('Transposh','Transposh', array(&$this, 'transposh_widget'), array( 'description' => __('Transposh language selection widget') )); 
    8989 
    9090        // Register widget control 
    91         register_widget_control("Transposh", array(&$this, 'transposh_widget_control')); 
     91        wp_register_widget_control('Transposh','Transposh', array(&$this, 'transposh_widget_control')); 
    9292 
    9393        // Register callback for widget's css and js 
     
    120120        $this->load_widget(); 
    121121 
    122         if (function_exists(tp_widget_css)) { 
     122        if (function_exists('tp_widget_css')) { 
    123123            tp_widget_css(); 
    124124        } else { 
     
    138138        $this->load_widget(); 
    139139 
    140         if (function_exists(tp_widget_js)) { 
     140        if (function_exists('tp_widget_js')) { 
    141141            tp_widget_js(); 
    142142        } else { 
     
    158158        // hmmm, this should actually prepare all vars needed, include the correct widget and send the vars to that function, 
    159159        $calc_url = false; // By default, avoid calculating the urls 
    160         if (function_exists(tp_widget_needs_post_url)) 
     160        if (function_exists('tp_widget_needs_post_url')) 
    161161                $calc_url = tp_widget_needs_post_url(); 
    162162 
Note: See TracChangeset for help on using the changeset viewer.