/** * Returns the singleton instance of the Dynamic_Content_Builder * * @return Dynamic_Content_Builder */ public static function GetInstance() { if (!isset(self::$instance)) { self::$instance = new Dynamic_Content_Builder(); } return self::$instance; }
trigger_error('CMS Press requires WP version 2.9 or higher', E_USER_NOTICE); return; } define('CP_BASE_DIR', dirname(__FILE__)); define('CP_BASE_URL', str_replace(str_replace('\\', '/', ABSPATH), site_url() . '/', str_replace('\\', '/', dirname(__FILE__)))); require_once CP_BASE_DIR . '/cp-custom-content/legacy/legacy.php'; /** * Core files */ require_once CP_BASE_DIR . '/cp-custom-content/cp-custom-content-core.php'; require_once CP_BASE_DIR . '/cp-custom-taxonomy/cp-custom-taxonomy-core.php'; CP_Custom_Content_Core::Initialize(); CP_Custom_Taxonomy_Core::Initialize(); /** * Add dynamic content type handler(s) */ require_once CP_BASE_DIR . '/child-plugins/dynamic/dynamic-content.php'; Dynamic_Content_Builder::Initialize(); require_once CP_BASE_DIR . '/child-plugins/dynamic/dynamic-taxonomies.php'; Dynamic_Taxonomy_Builder::Initialize(); function on_cmspress_activation() { $role = get_role('administrator'); if (!$role->has_cap('manage_content_types')) { $role->add_cap('manage_content_types'); } if (!$role->has_cap('manage_taxonomies')) { $role->add_cap('manage_taxonomies'); } } register_activation_hook(basename(dirname(__FILE__)) . '/' . basename(__FILE__), 'on_cmspress_activation');