false,'width' => 1600, 'height' => 500, 'flex-width' => true, 'flex-height' => true)); add_theme_support('custom-background', apply_filters('cpotheme_background_args', array('default-color' => 'ffffff'))); add_theme_support('automatic-feed-links'); add_theme_support('woocommerce'); add_theme_support('bbpress'); add_post_type_support('page', 'excerpt'); //Set content width for embeds global $content_width; if(!isset($content_width)) $content_width = 640; //Load translation text domain and make translation available $languages_path = get_template_directory().'/core/languages'; if(defined('CPO_CORELITE')) $languages_path = CPO_CORELITE.'/languages'; load_theme_textdomain('cpocore', $languages_path); $locale = get_locale(); $locale_file = get_template_directory()."/languages/$locale.php"; if(is_readable($locale_file)) require_once($locale_file); } } //Add Public scripts if(!function_exists('cpotheme_scripts_front')){ add_action('wp_enqueue_scripts', 'cpotheme_scripts_front'); function cpotheme_scripts_front( ){ $scripts_theme_path = get_template_directory_uri().'/scripts/'; $scripts_path = get_template_directory_uri().'/core/scripts/'; if(defined('CPO_CORELITE_URL')) $scripts_path = CPO_CORELITE_URL.'/scripts/'; //Enqueue necessary scripts already in the WordPress core //wp_enqueue_script('jquery-ui-core'); if(is_singular() && get_option('thread_comments')) wp_enqueue_script('comment-reply'); wp_enqueue_script('cpotheme_html5', $scripts_path.'html5.js'); //Register custom scripts for later enqueuing wp_enqueue_script('cpotheme_core', $scripts_path.'core.js', array(), false, true); wp_register_script('cpotheme_cycle', $scripts_path.'jquery-cycle2.js', array('jquery'), false, true); wp_register_script('cpotheme-magnific', $scripts_path.'jquery-magnific.js', array('jquery'), false, true); } } //Add Admin scripts if(!function_exists('cpotheme_scripts_back')){ add_action('admin_enqueue_scripts', 'cpotheme_scripts_back'); function cpotheme_scripts_back(){ $screen = get_current_screen(); $scripts_theme_path = get_template_directory_uri().'/scripts/'; $scripts_path = get_template_directory_uri().'/core/scripts/'; if(defined('CPO_CORELITE_URL')) $scripts_path = CPO_CORELITE_URL.'/scripts/'; //Common scripts wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-widget'); wp_enqueue_script('jquery-ui-datepicker'); wp_enqueue_script('jquery-effects-core'); wp_enqueue_script('jquery-effects-fade'); wp_enqueue_script('thickbox'); wp_enqueue_script('media-upload'); wp_enqueue_script('wp-color-picker'); wp_enqueue_script('cpotheme_customizer', $scripts_path.'customizer.js'); wp_enqueue_script('cpotheme_script_admin', $scripts_path.'admin.js'); if(defined('CPOTHEME_USE_PORTFOLIO') && CPOTHEME_USE_PORTFOLIO == true && $screen->post_type == 'cpo_portfolio'){ wp_enqueue_script('cpotheme_script_gallery', $scripts_path.'gallery.js'); } } } //Add public stylesheets if(!function_exists('cpotheme_add_styles')){ add_action('wp_enqueue_scripts', 'cpotheme_add_styles'); function cpotheme_add_styles(){ $stylesheets_path = get_template_directory_uri().'/core/css/'; if(defined('CPO_CORELITE_URL')) $stylesheets_path = CPO_CORELITE_URL.'/css/'; //Common styles wp_enqueue_style('cpotheme-base', $stylesheets_path.'base.css'); wp_register_style('cpotheme-magnific', $stylesheets_path.'magnific.css'); wp_enqueue_style('cpotheme-main', get_bloginfo('stylesheet_url')); //Font Libraries wp_register_style('cpotheme-fontawesome', $stylesheets_path.'icon-fontawesome.css'); } } //Add admin stylesheets if(!function_exists('cpotheme_add_admin_styles')){ add_action('admin_print_styles', 'cpotheme_add_admin_styles'); function cpotheme_add_admin_styles(){ $stylesheets_path = get_template_directory_uri().'/core/css/'; if(defined('CPO_CORELITE_URL')) $stylesheets_path = CPO_CORELITE_URL.'/css/'; wp_enqueue_style('wp-color-picker'); wp_enqueue_style('cpotheme_admin', $stylesheets_path.'admin.css'); wp_enqueue_style('thickbox'); wp_enqueue_style('cpotheme-fontawesome', $stylesheets_path.'icon-fontawesome.css'); } } //Add all Core components $core_path = get_template_directory().'/core/'; if(defined('CPO_CORELITE')) $core_path = CPO_CORELITE; //Classes require_once($core_path.'classes/class_customizer.php'); require_once($core_path.'classes/class_menu.php'); //Main Components require_once($core_path.'admin.php'); require_once($core_path.'functions.php'); require_once($core_path.'markup.php'); require_once($core_path.'filters.php'); require_once($core_path.'meta.php'); require_once($core_path.'metaboxes.php'); require_once($core_path.'gallery.php'); require_once($core_path.'forms.php'); require_once($core_path.'taxonomy.php'); require_once($core_path.'icons.php'); require_once($core_path.'layout.php'); require_once($core_path.'woocommerce.php'); require_once($core_path.'menus.php'); require_once($core_path.'customizer.php'); //Metadata require_once($core_path.'metadata/data_general.php'); require_once($core_path.'metadata/data_icons.php'); require_once($core_path.'metadata/data_metaboxes.php'); require_once($core_path.'metadata/data_customizer.php');