示例#1
0
 /**
  * Theme constructor.
  * 
  * @param mixed[] $params named array of properties
  */
 function __construct($params)
 {
     // Properties with default values
     //
     $this->css_dir = 'css/';
     foreach ($params as $name => $value) {
         $this->{$name} = $value;
     }
     // Remember the base directory path, then
     // Append plugin path to the directories
     //
     $this->css_url = $this->plugin_url . '/' . $this->css_dir;
     $this->css_dir = $this->plugin_path . $this->css_dir;
     // Load Up Admin Class As Needed
     //
     if ($this->parent->check_IsOurAdminPage()) {
         require_once 'class.themes.admin.php';
         $this->admin = new PluginThemeAdmin(array_merge($params, array('css_dir' => $this->css_dir, 'css_url' => $this->css_url)));
     }
 }