constants($options); // Add WordPress default add_theme_support add_action('after_setup_theme', array(&$this, 'theme_support')); // Add localization support add_action('init', array(&$this, 'language')); // Load Ilmenite functions $this->functions(); // Load Ilmenite shortcodes $this->shortcodes(); // Load custom dashboard widgets $this->dashboard_widgets(); // Load custom widgets add_action('widgets_init', array(&$this, 'widgets')); // Load Ilmenite admin files $this->admin(); // Load various fixes require_once(THEME_FIXES . '/general_fixes.php'); // } /** * Defines constants: paths etc. for use in the theme * * @since Ilmenite 1.0 **/ function constants($options) { // Theme Constants define('THEME_NAME', $options['theme_name']); // Name of the theme define('THEME_SLUG', $options['theme_slug']); // Slug of the theme // Theme Main Directory Constants define('THEME_DIR', get_stylesheet_directory()); // Path to theme directory define('THEME_URI', get_stylesheet_directory_uri()); // URI to theme directory // Framework Constants define('THEME_FRAMEWORK', THEME_DIR . '/framework'); // Path to framework folder define('THEME_ADMIN', THEME_FRAMEWORK . '/admin'); // Path to framework admin folder define('THEME_ADMIN_URI', THEME_URI . '/framework/admin'); // URI to framework admin folder // Constants for Sub-folders in the framework folder define('THEME_WIDGETS', THEME_FRAMEWORK . '/widgets'); // Path to custom widgets define('THEME_DASHBOARD_WIDGETS', THEME_FRAMEWORK . '/dashboard-widgets'); // Path to custom dashboard widgets define('THEME_FUNCTIONS', THEME_FRAMEWORK . '/functions'); // Path to theme functions define('THEME_SHORTCODES', THEME_FRAMEWORK . '/shortcodes'); // Path to shortcodes define('THEME_FIXES', THEME_FRAMEWORK . '/fixes'); // Path to fixes // Constants for Theme Admin Panel define('THEME_ADMIN_METABOXES', THEME_ADMIN . '/metaboxes'); // Path to metaboxes define('THEME_ADMIN_DOCS', THEME_ADMIN . '/docs'); // Path to theme docs define('THEME_ADMIN_OPTIONS', THEME_ADMIN . '/options'); // Path to theme options files define('THEME_ADMIN_FUNCTIONS', THEME_ADMIN . '/functions'); // Path to theme admin functions define('THEME_ADMIN_ASSETS_URI', THEME_ADMIN . '/assets'); // Path to admin panel assets // Theme Style Constants define('THEME_INCLUDES', THEME_URI . '/inc'); // URI to theme inc folder define('THEME_IMAGES', THEME_URI . '/images'); // URI to theme images folder define('THEME_CSS', THEME_URI . '/css'); // URI to css folder define('THEME_JS', THEME_URI . '/js'); // URI to javascripts folder } /** * Add theme support for: add_theme_support variables * Also registers default sidebar * * @since Ilmenite 1.0 **/ function theme_support() { if(function_exists('add_theme_support')) { // Post thumbnails are added. If they are not used in a theme, // they can be disabled from the functions.php again add_theme_support('post-thumbnails'); // Enable Built-in Navigation menus add_theme_support('menus'); // Register one default navigation menu register_nav_menus(array( 'primary-menu' => __(THEME_NAME . ' Navigation', 'ilmenite_admin'), )); // Adds post and comment RSS feeds into the
auomatically add_theme_support('automatic-feed-links'); // Add support for custom editor style add_editor_style(); // Add support for custom backgrounds add_custom_background(); } if(function_exists('register_sidebar')) { // Sets up a default sidebar. // Other sidebars should be registered in the functions.php file register_sidebar(array( 'id' => 'sidebar', 'name' => 'Sidebar', 'before_widget' => ' ', 'before_title' => '