Changeset 1355192
- Timestamp:
- 02/21/2016 01:55:24 PM (10 years ago)
- Location:
- wp-mystat
- Files:
-
- 2 edited
-
tags/3.4/driver/wordpress.class.php (modified) (4 diffs)
-
trunk/driver/wordpress.class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-mystat/tags/3.4/driver/wordpress.class.php
r1354745 r1355192 425 425 ############################################################## 426 426 427 public function getCacheDir(){427 public static function getCacheDir(){ 428 428 // $dir = plugins_url('',dirname(__FILE__)); 429 429 // $dir = preg_split('/\//',trim($dir)); … … 993 993 994 994 function widgetRegister1() { 995 register_widget(' widgetPlugin1');995 register_widget('mystat_widgetPlugin1'); 996 996 } 997 997 … … 1144 1144 1145 1145 1146 class widgetPlugin1 extends WP_Widget{1146 class mystat_widgetPlugin1 extends WP_Widget{ 1147 1147 1148 1148 function __construct() { … … 1291 1291 require_once(dirname(__FILE__).'/../lib/country.class.php'); 1292 1292 $cn = new mystat_country(); 1293 $cn->setCacheDir( $this->getCacheDir());1293 $cn->setCacheDir(mystat_wordpress::getCacheDir()); 1294 1294 foreach($country as $k=>$v){ 1295 1295 $ret[] = Array($k,$cn->getCountryByCode($k,strtoupper(substr(get_locale(),0,2))),$v); -
wp-mystat/trunk/driver/wordpress.class.php
r1354745 r1355192 425 425 ############################################################## 426 426 427 public function getCacheDir(){427 public static function getCacheDir(){ 428 428 // $dir = plugins_url('',dirname(__FILE__)); 429 429 // $dir = preg_split('/\//',trim($dir)); … … 993 993 994 994 function widgetRegister1() { 995 register_widget(' widgetPlugin1');995 register_widget('mystat_widgetPlugin1'); 996 996 } 997 997 … … 1144 1144 1145 1145 1146 class widgetPlugin1 extends WP_Widget{1146 class mystat_widgetPlugin1 extends WP_Widget{ 1147 1147 1148 1148 function __construct() { … … 1291 1291 require_once(dirname(__FILE__).'/../lib/country.class.php'); 1292 1292 $cn = new mystat_country(); 1293 $cn->setCacheDir( $this->getCacheDir());1293 $cn->setCacheDir(mystat_wordpress::getCacheDir()); 1294 1294 foreach($country as $k=>$v){ 1295 1295 $ret[] = Array($k,$cn->getCountryByCode($k,strtoupper(substr(get_locale(),0,2))),$v);
Note: See TracChangeset
for help on using the changeset viewer.