Config::$shortcodes = array('CallToActionSC', 'SectionSC', 'MapSearchSC', 'CalloutSC', 'IconLinkSC', 'RowSC', 'ColumnSC', 'AcademicCalendarSC'); Config::$links = array(array('rel' => 'shortcut icon', 'href' => THEME_IMG_URL . '/favicon.ico'), array('rel' => 'alternate', 'type' => 'application/rss+xml', 'href' => get_bloginfo('rss_url'))); Config::$styles = array(array('name' => 'webcom-admin', 'admin' => True, 'src' => THEME_CSS_URL . '/admin.min.css'), THEME_CSS_URL . '/style.min.css'); if (get_theme_mod_or_default('cloud_typography_key')) { Config::$styles[] = array('name' => 'font-cloudtypography', 'src' => get_theme_mod_or_default('cloud_typography_key')); } Config::$scripts = array(array('name' => 'admin-script', 'admin' => True, 'src' => THEME_JS_URL . '/admin.min.js'), array('name' => 'ucfhb-script', 'src' => '//universityheader.ucf.edu/bar/js/university-header.js?use-1200-breakpoint=1'), array('name' => 'theme-script', 'src' => THEME_JS_URL . '/script.min.js')); Config::$metas = array(array('charset' => 'utf-8'), array('http-equiv' => 'X-UA-Compatible', 'content' => 'IE=Edge'), array('name' => 'viewport', 'content' => 'width=device-width, initial-scale=1.0')); if (get_theme_mod_or_default('gw_verify')) { Config::$metas[] = array('name' => 'google-site-verification', 'content' => htmlentities(get_theme_mod_or_default('gw_verify'))); } /** * Define customizer setting defaults here to make them accessible when calling * get_theme_mod()/get_theme_mod_or_default(). **/ Config::$setting_defaults = array('events_max_items' => 4, 'events_url' => 'http://events.ucf.edu/feed.rss', 'news_max_items' => 2, 'news_url' => 'http://today.ucf.edu/feed/', 'enable_google' => 1, 'search_per_page' => 10, 'cloud_typography_key' => '//cloud.typography.com/730568/675644/css/fonts.css', 'weather_feed_url' => 'http://weather.smca.ucf.edu/', 'map_search_url' => 'http://map.ucf.edu/'); /** * Configure the WP Customizer with panels, sections, settings and * controls. * * Serves as a replacement for Config::$theme_options in this theme. * * NOTE: Panel and Section IDs should be prefixed with THEME_CUSTOMIZER_PREFIX * to avoid conflicts with plugins that may add their own panels/sections to * the Customizer. * * See developer docs for more info: * https://developer.wordpress.org/themes/advanced-topics/customizer-api/ **/ function define_customizer_panels($wp_customize) {
})); } add_action('customizer_register', 'define_customizer_panels'); function define_customizer_sections($wp_customize) { // Home Page section $wp_customize->add_section(THEME_CUSTOMIZER_PREFIX . 'homepage', array('title' => __('Home Page'), 'panel' => THEME_CUSTOMIZER_PREFIX / 'home')); // Header section $wp_customize->add_section(THEME_CUSTOMIZER_PREFIX . 'header', array('title' => __('Header'))); // Footer section $wp_customize->add_section(THEME_CUSTOMIZER_PREFIX . 'footer', array('title' => __('Footer'))); // Social Section $wp_customize->add_section(THEME_CUSTOMIZER_PREFIX . 'social', array('title' => __('Social'))); } add_action('customize_register', 'define_customizer_sections'); Config::$setting_defaults = array('footer_address' => '1525 South State Road 15-A<br>DeLand, FL 32720', 'footer_phone' => '386-734-5380'); function get_setting_default($setting, $fallback = null) { return isset(Config::$setting_defaults[$setting]) ? Config::$setting_defaults[$setting] : $fallback; } function define_customizer_fields($wp_customize) { // Home Page Features $wp_customize->add_setting('homepage_title'); $wp_customize->add_control('homepage_title', array('type' => 'text', 'label' => 'Home Page Title', 'description' => 'The title that will appear above the text on the home page.', 'section' => THEME_CUSTOMIZER_PREFIX . 'homepage')); $wp_customize->add_setting('homepage_content'); $wp_customize->add_control('homepage_content', array('type' => 'textarea', 'label' => 'Home Page Content', 'description' => 'The text that will appear on the home page.', 'section' => THEME_CUSTOMIZER_PREFIX . 'homepage')); // Header $wp_customize->add_setting('header_image'); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'header_image', array('label' => __('Header Image'), 'description' => __('The image that will appear in the header on every page'), 'section' => THEME_CUSTOMIZER_PREFIX . 'header', 'settings' => 'header_image'))); // Footer