Example #1
0
define('THEME_CSS_URL', THEME_STATIC_URL . '/css');
define('THEME_DATA_URL', THEME_STATIC_URL . '/data');
define('GA_ACCOUNT', get_theme_mod_or_default('ga_account'));
define('CB_UID', get_theme_mod_or_default('cb_uid'));
define('CB_DOMAIN', get_theme_mod_or_default('cb_domain'));
define('THEME_CUSTOMIZER_PREFIX', 'ucfgeneric_');
// a unique prefix for panel/section IDs
date_default_timezone_set('EST');
/**
 * Set config values including meta tags, registered custom post types, styles,
 * scripts, and any other statically defined assets that belong in the Config
 * object.
 **/
Config::$custom_post_types = array('Page', 'Post', 'IconLink', 'Post', 'Spotlight', 'Section');
Config::$custom_taxonomies = array();
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/');
Example #2
0
    $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
    $wp_customize->add_setting('footer_address', array('default' => get_setting_default('footer_address')));
    $wp_customize->add_control('footer_address', array('type' => 'textarea', 'label' => 'Footer Address', 'description' => 'Defines the address in the footer', 'section' => THEME_CUSTOMIZER_PREFIX . 'footer'));
    $wp_customize->add_setting('footer_phone', array('default' => get_setting_default('footer_phone')));
    $wp_customize->add_control('footer_phone', array('type' => 'text', 'label' => 'Footer Phone', 'description' => 'Defines the phone in the footer', 'section' => THEME_CUSTOMIZER_PREFIX . 'footer'));
    $wp_customize->add_setting('footer_contact_page');
    $wp_customize->add_control('footer_contact_page', array('type' => 'dropdown-pages', 'label' => 'Footer Contact Page', 'description' => 'Defines the contact page link in the footer', 'section' => THEME_CUSTOMIZER_PREFIX . 'footer'));
    $wp_customize->add_setting('footer_menu', array('default' => 'social-menu'));
    $wp_customize->add_control('footer_menu', array('type' => 'select', 'label' => __('Footer Menu'), 'description' => __('Defines the menu to use in the footer.'), 'section' => THEME_CUSTOMIZER_PREFIX . 'footer', 'choices' => array('header-menu' => __('Header Menu'), 'footer-menu' => __('Footer Menu'), 'social-menu' => __('Social Menu'))));
    // Social
    $wp_customize->add_setting('googleplus_url');
    $wp_customize->add_control('googleplus_url', array('type' => 'url', 'label' => __('Google+ Url'), 'section' => THEME_CUSTOMIZER_PREFIX . 'social'));
    $wp_customize->add_setting('twitter_url');
    $wp_customize->add_control('twitter_url', array('type' => 'url', 'label' => __('Twitter Url'), 'section' => THEME_CUSTOMIZER_PREFIX . 'social'));
    $wp_customize->add_setting('facebook_url');
    $wp_customize->add_control('facebook_url', array('type' => 'url', 'label' => __('Facebook Url'), 'section' => THEME_CUSTOMIZER_PREFIX . 'social'));
    $wp_customize->add_setting('instagram_url');
    $wp_customize->add_control('instagram_url', array('type' => 'url', 'label' => __('Instagram Url'), 'section' => THEME_CUSTOMIZER_PREFIX . 'social'));
    $wp_customize->add_setting('youtube_url');
    $wp_customize->add_control('youtube_url', array('type' => 'url', 'label' => __('YouTube Url'), 'section' => THEME_CUSTOMIZER_PREFIX . 'social'));
}
add_action('customize_register', 'define_customizer_fields');
Config::$custom_post_types = array('Event');
Config::$shortcodes = array('IconButton');