コード例 #1
0
 /**
  * Create the details divs for the SLP themes.
  *
  * @param mixed[] $themeArray
  * @return string the div HTML
  */
 private function setup_ThemeDetails($themeArray)
 {
     $this->parent->debugMP('wpcsl.main', 'msg', 'PluginTheme::' . __FUNCTION__);
     $HTML = '';
     $newDetails = false;
     // Get an array of metadata for each theme present.
     //
     $this->themeDetails = get_option($this->prefix . '-theme_details');
     // Check all our themes for details
     //
     foreach ($themeArray as $label => $theme_slug) {
         // No details? Read from the CSS File.
         //
         if (!isset($this->themeDetails[$theme_slug]) || empty($this->themeDetails[$theme_slug]) || !isset($this->themeDetails[$theme_slug]['label']) || empty($this->themeDetails[$theme_slug]['label'])) {
             $themeData = $this->get_ThemeInfo($this->css_dir . $theme_slug . '.css');
             $themeData['fqfname'] = $this->css_dir . $theme_slug . '.css';
             $this->themeDetails[$theme_slug] = $themeData;
             $newDetails = true;
         }
         $this->current_slug = $theme_slug;
         $HTML .= $this->createstring_ThemeDetails();
     }
     // If we read new details, go save to disk.
     //
     if ($newDetails) {
         update_option($this->prefix . '-theme_details', $this->themeDetails);
     }
     return $HTML;
 }
コード例 #2
0
ファイル: class.helper.php プロジェクト: hoonio/PhoneAfrika
 /**
  * Do not use, deprecated.
  *
  * @deprecated 4.0
  */
 function create_SimpleMessage()
 {
     if (!$this->depnotice_create_SimpleMessage) {
         $this->parent->notifications->add_notice(9, $this->parent->createstring_Deprecated(__FUNCTION__));
         $this->parent->notifications->display();
         $this->depnotice_create_SimpleMessage = true;
     }
 }
コード例 #3
0
ファイル: class.themes.php プロジェクト: hoonio/PhoneAfrika
 /**
  * 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)));
     }
 }
コード例 #4
0
 /**
  * Call parent DebugMP only if parent has been set.
  * 
  *
  * @param string $panel - panel name
  * @param string $type - what type of debugging (msg = simple string, pr = print_r of variable)
  * @param string $header - the header
  * @param string $message - what you want to say
  * @param string $file - file of the call (__FILE__)
  * @param int $line - line number of the call (__LINE__)
  * @param boolean $notime - show time? default true = yes.
  * @return null
  */
 function debugMP($panel = 'main', $type = 'msg', $header = 'wpCSL DMP', $message = '', $file = null, $line = null, $notime = false)
 {
     if (is_object($this->parent)) {
         $this->parent->debugMP($panel, $type, $header, $message, $file, $line, $notime);
     }
 }
コード例 #5
0
ファイル: class.slplus.php プロジェクト: hoonio/PhoneAfrika
 /**
  * Initialize a new SLPlus Object
  *
  * @param mixed[] $params - a named array of the plugin options for wpCSL.
  */
 public function __construct($params)
 {
     $this->url = plugins_url('', __FILE__);
     $this->dir = plugin_dir_path(__FILE__);
     $this->slug = plugin_basename(__FILE__);
     parent::__construct($params);
     $this->initDB();
     $this->currentLocation = new SLPlus_Location(array('plugin' => $this));
     $this->themes->css_dir = SLPLUS_PLUGINDIR . 'css/';
     $this->initOptions();
     $this->initData();
     // HOOK: slp_invoation_complete
     do_action('slp_invocation_complete');
 }
コード例 #6
0
 /**
  * Initialize a new SLPlus Object
  *
  * @param mixed[] $params - a named array of the plugin options for wpCSL.
  */
 public function __construct($params)
 {
     // Hook up the Activation class
     //
     if (class_exists('SLPlus_Activation') == false) {
         require_once SLPLUS_PLUGINDIR . 'include/class.activation.php';
     }
     $this->url = plugins_url('', __FILE__);
     $this->dir = plugin_dir_path(__FILE__);
     $this->slug = plugin_basename(__FILE__);
     parent::__construct($params);
     $this->initDB();
     // Hook up the Locations class
     //
     if (class_exists('SLPlus_Location') == false) {
         require_once SLPLUS_PLUGINDIR . 'include/class.location.php';
     }
     $this->currentLocation = new SLPlus_Location(array('slplus' => $this));
     $this->themes->css_dir = SLPLUS_PLUGINDIR . 'css/';
     $this->initOptions();
     $this->initData();
     // HOOK: slp_invocation_complete
     do_action('slp_invocation_complete');
 }