/** * Config * * @return Plugin config array */ public function config() { if (!empty($this->config)) { return $this->config; } $this->config = plugin_load_config(self::_NAMESPACE); }
<?php /** * Load Config * * Load the config early so we can * use it below. */ $_ce_config = plugin_load_config('cms-editor'); /** * Initiate the Editor * This only happens if the current * user is logged in. */ if (is_loggedin() && in_array($path, $_ce_config['pages'])) { # Stylesheets $_config['stylesheets'] = array_merge($_config['stylesheets'], $_ce_config['assets']['stylesheets']); # Javascript $_config['scripts'] = array_merge($_config['scripts'], $_ce_config['assets']['scripts']); }
<?php /** * @package Content Creator Kit * * A collection of filters and * functions for creating * content. */ # Deny direct access if (!isset($_config)) { exit; } # Load Config $_cck_config = plugin_load_config('cck'); # Check Medoo class exists if (!class_exists('medoo')) { throw new Exception('Medoo is required for CCK'); } # Load Content Types $_cck_types = cck_get_content_types(); # Load Classes & Functions require_once __DIR__ . '/lib.php'; # Create Database Instance if (isset($db) && $db instanceof medoo) { $_cck_config['db'] = $db; } else { $_cck_config['db'] = new medoo(array('database_type' => 'mysql', 'database_name' => 'cck_db', 'server' => '127.0.0.1', 'username' => 'root', 'password' => 'root', 'charset' => 'utf8', 'prefix' => 'cck_')); } # Define custom controller # and theme directories.