- Timestamp:
- 11/27/2011 10:44:21 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/wp/transposh_widget.php
r683 r684 164 164 foreach ($activewidgets as $key => $v) { 165 165 $class = $this->load_widget($key); 166 if (class_exists($class)) 167 $class::tp_widget_css($key, $this->transposh->transposh_plugin_dir, $this->transposh->transposh_plugin_url); 166 if (class_exists($class)) { 167 $tmpclass = new $class; 168 $tmpclass->tp_widget_css($key, $this->transposh->transposh_plugin_dir, $this->transposh->transposh_plugin_url); 169 } 168 170 } 169 171 logger('Added transposh_widget_css', 4); … … 185 187 foreach ($activewidgets as $key => $v) { 186 188 $class = $this->load_widget($key); 187 if (class_exists($class)) 188 $class::tp_widget_js($key, $this->transposh->transposh_plugin_dir, $this->transposh->transposh_plugin_url); 189 if (class_exists($class)) { 190 $tmpclass = new $class; 191 $tmpclass->tp_widget_js($key, $this->transposh->transposh_plugin_dir, $this->transposh->transposh_plugin_url); 192 } 189 193 } 190 194 logger('Added transposh_widget_js', 4); … … 245 249 $class = $this->load_widget($instance['widget_file']); 246 250 if (!class_exists($class)) { 247 echo __('Transposh subwidget was not loaded correctly') .": $class";251 echo __('Transposh subwidget was not loaded correctly') . ": $class"; 248 252 } 249 253 … … 265 269 266 270 // actually run the external widget code 267 $class::tp_widget_do($widget_args); 268 271 //if (version_compare(PHP_VERSION, '5.3.0','gt')) { (for the future) 272 // $class::tp_widget_do($widget_args); 273 //} else { 274 $tmpclass = new $class; 275 $tmpclass->tp_widget_do($widget_args); 276 //} 269 277 //at least one language showing - add the edit box if applicable 270 278 if (!empty($widget_args)) {
Note: See TracChangeset
for help on using the changeset viewer.
