Example #1
0
 * Slug of the current Pegasus Magazine issue term in the 
 * issues taxonomy
 */
define('CURRENT_ISSUE_TERM_SLUG', '2012-fall');
/* 
 * Slug of the current Pegasus Magazine Issue post type
 */
define('CURRENT_ISSUE_SLUG', 'fall-2012');
/**
 * 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', 'AlumniNote', 'Story', 'Issue');
Config::$custom_taxonomies = array('Issues');
Config::$body_classes = array();
/**
 * Configure theme settings, see abstract class Field's descendants for
 * available fields. -- functions/base.php
 **/
Config::$theme_settings = array('Analytics' => array(new TextField(array('name' => 'Google WebMaster Verification', 'id' => THEME_OPTIONS_NAME . '[gw_verify]', 'description' => 'Example: <em>9Wsa3fspoaoRE8zx8COo48-GCMdi5Kd-1qFpQTTXSIw</em>', 'default' => null, 'value' => $theme_options['gw_verify'])), new TextField(array('name' => 'Yahoo! Site Explorer', 'id' => THEME_OPTIONS_NAME . '[yw_verify]', 'description' => 'Example: <em>3236dee82aabe064</em>', 'default' => null, 'value' => $theme_options['yw_verify'])), new TextField(array('name' => 'Bing Webmaster Center', 'id' => THEME_OPTIONS_NAME . '[bw_verify]', 'description' => 'Example: <em>12C1203B5086AECE94EB3A3D9830B2E</em>', 'default' => null, 'value' => $theme_options['bw_verify'])), new TextField(array('name' => 'Google Analytics Account', 'id' => THEME_OPTIONS_NAME . '[ga_account]', 'description' => 'Example: <em>UA-9876543-21</em>. Leave blank for development.', 'default' => null, 'value' => $theme_options['ga_account'])), new TextField(array('name' => 'Chartbeat UID', 'id' => THEME_OPTIONS_NAME . '[cb_uid]', 'description' => 'Example: <em>1842</em>', 'default' => null, 'value' => $theme_options['cb_uid'])), new TextField(array('name' => 'Chartbeat Domain', 'id' => THEME_OPTIONS_NAME . '[cb_domain]', 'description' => 'Example: <em>some.domain.com</em>', 'default' => null, 'value' => $theme_options['cb_domain']))), 'Search' => array(new RadioField(array('name' => 'Enable Google Search', 'id' => THEME_OPTIONS_NAME . '[enable_google]', 'description' => 'Enable to use the google search appliance to power the search functionality.', 'default' => 1, 'choices' => array('On' => 1, 'Off' => 0), 'value' => $theme_options['enable_google'])), new TextField(array('name' => 'Search Domain', 'id' => THEME_OPTIONS_NAME . '[search_domain]', 'description' => 'Domain to use for the built-in google search.  Useful for development or if the site needs to search a domain other than the one it occupies. Example: <em>some.domain.com</em>', 'default' => null, 'value' => $theme_options['search_domain'])), new TextField(array('name' => 'Search Results Per Page', 'id' => THEME_OPTIONS_NAME . '[search_per_page]', 'description' => 'Number of search results to show per page of results', 'default' => 10, 'value' => $theme_options['search_per_page']))), 'Site' => array(new SelectField(array('name' => 'Featured Front Page Story', 'id' => THEME_OPTIONS_NAME . '[front_page_story]', 'description' => 'This story will be excluded from the front page\'s footer navigation.', 'value' => $theme_options['front_page_story'], 'default' => '', 'choices' => get_front_page_story_choices()))), 'Social' => array(new RadioField(array('name' => 'Enable OpenGraph', 'id' => THEME_OPTIONS_NAME . '[enable_og]', 'description' => 'Turn on the opengraph meta information used by Facebook.', 'default' => 1, 'choices' => array('On' => 1, 'Off' => 0), 'value' => $theme_options['enable_og'])), new TextField(array('name' => 'Facebook Admins', 'id' => THEME_OPTIONS_NAME . '[fb_admins]', 'description' => 'Comma seperated facebook usernames or user ids of those responsible for administrating any facebook pages created from pages on this site. Example: <em>592952074, abe.lincoln</em>', 'default' => null, 'value' => $theme_options['fb_admins'])), new TextField(array('name' => 'Facebook URL', 'id' => THEME_OPTIONS_NAME . '[facebook_url]', 'description' => 'URL to the facebook page you would like to direct visitors to.  Example: <em>https://www.facebook.com/CSBrisketBus</em>', 'default' => null, 'value' => $theme_options['facebook_url'])), new TextField(array('name' => 'Twitter URL', 'id' => THEME_OPTIONS_NAME . '[twitter_url]', 'description' => 'URL to the twitter user account you would like to direct visitors to.  Example: <em>http://twitter.com/csbrisketbus</em>', 'value' => $theme_options['twitter_url'])), new RadioField(array('name' => 'Enable Flickr', 'id' => THEME_OPTIONS_NAME . '[enable_flickr]', 'description' => 'Automatically display flickr images throughout the site', 'default' => 1, 'choices' => array('On' => 1, 'Off' => 0), 'value' => $theme_options['enable_flickr'])), new TextField(array('name' => 'Flickr Photostream ID', 'id' => THEME_OPTIONS_NAME . '[flickr_id]', 'description' => 'ID of the flickr photostream you would like to show pictures from.  Example: <em>65412398@N05</em>', 'default' => '36226710@N08', 'value' => $theme_options['flickr_id'])), new SelectField(array('name' => 'Flickr Max Images', 'id' => THEME_OPTIONS_NAME . '[flickr_max_items]', 'description' => 'Maximum number of flickr images to display', 'value' => $theme_options['flickr_max_items'], 'default' => 12, 'choices' => array('6' => 6, '12' => 12, '18' => 18)))), 'Devices' => array(new TextField(array('name' => 'iTunes Store iPad App URL', 'id' => THEME_OPTIONS_NAME . '[ipad_app_url]', 'description' => 'URL of the Pegasus Magazine iPad app in the iTunes store. Used for the iPad modal. The modal and footer link will not be displayed if this field is blank.', 'default' => '', 'value' => $theme_options['ipad_app_url']))), 'Styles' => array(new RadioField(array('name' => 'Enable Responsiveness', 'id' => THEME_OPTIONS_NAME . '[bootstrap_enable_responsive]', 'description' => 'Turn on responsive styles provided by the Twitter Bootstrap framework.  This setting should be decided upon before building out subpages, etc. to ensure content is designed to shrink down appropriately.  Turning this off will enable the single 940px-wide Bootstrap layout.', 'default' => 1, 'choices' => array('On' => 1, 'Off' => 0), 'value' => $theme_options['bootstrap_enable_responsive']))));
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('admin' => True, 'src' => THEME_CSS_URL . '/admin.css'), THEME_STATIC_URL . '/bootstrap/css/bootstrap.css');
if ($theme_options['bootstrap_enable_responsive'] == 1) {
    array_push(Config::$styles, THEME_STATIC_URL . '/bootstrap/css/bootstrap-responsive.css');
}
array_push(Config::$styles, plugins_url('gravityforms/css/forms.css'), get_bloginfo('stylesheet_url'));
if ($theme_options['bootstrap_enable_responsive'] == 1) {
    array_push(Config::$styles, THEME_URL . '/style-responsive.css');
}
Config::$scripts = array(array('admin' => True, 'src' => THEME_JS_URL . '/admin.js'), THEME_STATIC_URL . '/bootstrap/js/bootstrap.js', THEME_STATIC_URL . '/js/jquery.cookie.js', array('name' => 'base-script', 'src' => THEME_JS_URL . '/webcom-base.js'), array('name' => 'theme-script', 'src' => THEME_JS_URL . '/script.js'), array('name' => 'rgraph-effects', 'src' => THEME_JS_URL . '/rgraph/RGraph.common.effects.js'), array('name' => 'rgraph-core', 'src' => THEME_JS_URL . '/rgraph/RGraph.common.core.js'), array('name' => 'rgraph-tooltips', 'src' => THEME_JS_URL . '/rgraph/RGraph.common.tooltips.js'), array('name' => 'rgraph-key', 'src' => THEME_JS_URL . '/rgraph/RGraph.common.key.js'), array('name' => 'rgraph-dynamic', 'src' => THEME_JS_URL . '/rgraph/RGraph.common.dynamic.js'), array('name' => 'rgraph-line', 'src' => THEME_JS_URL . '/rgraph/RGraph.line.js'), array('name' => 'inview', 'src' => THEME_JS_URL . '/inview.js'));
define('THEME_CSS_URL', THEME_STATIC_URL . '/css');
define('THEME_OPTIONS_GROUP', 'settings');
define('THEME_OPTIONS_NAME', 'theme');
define('THEME_OPTIONS_PAGE_TITLE', 'Theme Options');
$theme_options = get_option(THEME_OPTIONS_NAME);
define('GA_ACCOUNT', $theme_options['ga_account']);
define('CB_UID', $theme_options['cb_uid']);
define('CB_DOMAIN', $theme_options['cb_domain']);
/**
 * 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('Video', 'Document', 'Publication', 'Page', 'Person', 'Post');
Config::$custom_taxonomies = array('OrganizationalGroups');
Config::$body_classes = array('default');
/**
 * Configure theme settings, see abstract class Field's descendants for
 * available fields. -- functions/base.php
 * */
Config::$theme_settings = array('Analytics' => array(new TextField(array('name' => 'Google WebMaster Verification', 'id' => THEME_OPTIONS_NAME . '[gw_verify]', 'description' => 'Example: <em>9Wsa3fspoaoRE8zx8COo48-GCMdi5Kd-1qFpQTTXSIw</em>', 'default' => null, 'value' => $theme_options['gw_verify'])), new TextField(array('name' => 'Google Analytics Account', 'id' => THEME_OPTIONS_NAME . '[ga_account]', 'description' => 'Example: <em>UA-9876543-21</em>. Leave blank for development.', 'default' => null, 'value' => $theme_options['ga_account']))), 'Events' => array(new RadioField(array('name' => 'Enable Events Below the Fold', 'id' => THEME_OPTIONS_NAME . '[enable_events]', 'description' => 'Display events in the bottom page content, appearing on most pages.', 'default' => 1, 'choices' => array('On' => 1, 'Off' => 0), 'value' => $theme_options['enable_events'])), new RadioField(array('name' => 'Enable Events on Search Page', 'id' => THEME_OPTIONS_NAME . '[enable_search_events]', 'description' => 'Display events on the search results page.', 'value' => $theme_options['enable_search_events'], 'default' => 1, 'choices' => array('On' => 1, 'Off' => 0))), new SelectField(array('name' => 'Events Max Items', 'id' => THEME_OPTIONS_NAME . '[events_max_items]', 'description' => 'Maximum number of events to display whenever outputting event information.', 'value' => $theme_options['events_max_items'], 'default' => 4, 'choices' => array('1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5))), new TextField(array('name' => 'Events Calendar URL', 'id' => THEME_OPTIONS_NAME . '[events_url]', 'description' => 'Base URL for the calendar you wish to use. Example: <em>http://events.ucf.edu/mycalendar</em>', 'value' => $theme_options['events_url'], 'default' => 'http://events.ucf.edu/upcoming/feed.rss'))), 'News' => array(new RadioField(array('name' => 'Enable News Below the Fold', 'id' => THEME_OPTIONS_NAME . '[enable_news]', 'description' => 'Display UCF Today news in the bottom page content, appearing on most pages.', 'default' => 1, 'choices' => array('On' => 1, 'Off' => 0), 'value' => $theme_options['enable_news'])), new SelectField(array('name' => 'News Max Items', 'id' => THEME_OPTIONS_NAME . '[news_max_items]', 'description' => 'Maximum number of articles to display when outputting news information.', 'value' => $theme_options['news_max_items'], 'default' => 2, 'choices' => array('1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5))), new TextField(array('name' => 'News Feed', 'id' => THEME_OPTIONS_NAME . '[news_url]', 'description' => 'Use the following URL for the news RSS feed <br>Example: <em>http://today.ucf.edu/feed/</em>', 'value' => $theme_options['news_url'], 'default' => 'http://today.ucf.edu/feed/'))), 'Search' => array(new RadioField(array('name' => 'Enable Google Search', 'id' => THEME_OPTIONS_NAME . '[enable_google]', 'description' => 'Enable to use the google search appliance to power the search functionality.', 'default' => 1, 'choices' => array('On' => 1, 'Off' => 0), 'value' => $theme_options['enable_google'])), new TextField(array('name' => 'Search Domain', 'id' => THEME_OPTIONS_NAME . '[search_domain]', 'description' => 'Domain to use for the built-in google search.  Useful for development or if the site needs to search a domain other than the one it occupies. Example: <em>some.domain.com</em>', 'default' => null, 'value' => $theme_options['search_domain'])), new TextField(array('name' => 'Search Results Per Page', 'id' => THEME_OPTIONS_NAME . '[search_per_page]', 'description' => 'Number of search results to show per page of results', 'default' => 10, 'value' => $theme_options['search_per_page']))), 'Site' => array(new TextField(array('name' => 'Contact Email', 'id' => THEME_OPTIONS_NAME . '[site_contact]', 'description' => 'Contact email address that visitors to your site can use to contact you.', 'value' => $theme_options['site_contact'])), new TextField(array('name' => 'Organization Name', 'id' => THEME_OPTIONS_NAME . '[organization_name]', 'description' => 'Your organization\'s name', 'value' => $theme_options['organization_name'])), new FileField(array('name' => 'Home Image', 'id' => THEME_OPTIONS_NAME . '[site_image]', 'description' => 'Image to feature on the homepage.', 'value' => $theme_options['site_image'])), new TextareaField(array('name' => 'Site Description', 'id' => THEME_OPTIONS_NAME . '[site_description]', 'description' => 'A quick description of your organization and its role.', 'default' => 'This is the site\'s default description, change or remove it on the <a href="' . get_admin_url() . 'admin.php?page=theme-options#site">theme options page</a> in the admin site.', 'value' => $theme_options['site_description']))), 'Social' => array(new TextField(array('name' => 'Facebook URL', 'id' => THEME_OPTIONS_NAME . '[facebook_url]', 'description' => 'URL to the facebook page you would like to direct visitors to.  Example: <em>https://www.facebook.com/CSBrisketBus</em>', 'default' => null, 'value' => $theme_options['facebook_url'])), new TextField(array('name' => 'Twitter URL', 'id' => THEME_OPTIONS_NAME . '[twitter_url]', 'description' => 'URL to the twitter user account you would like to direct visitors to.  Example: <em>http://twitter.com/csbrisketbus</em>', 'value' => $theme_options['twitter_url'])), new RadioField(array('name' => 'Enable Flickr', 'id' => THEME_OPTIONS_NAME . '[enable_flickr]', 'description' => 'Automatically display flickr images throughout the site', 'default' => 1, 'choices' => array('On' => 1, 'Off' => 0), 'value' => $theme_options['enable_flickr'])), new TextField(array('name' => 'Flickr Photostream ID', 'id' => THEME_OPTIONS_NAME . '[flickr_id]', 'description' => 'ID of the flickr photostream you would like to show pictures from.  Example: <em>65412398@N05</em>', 'default' => '36226710@N08', 'value' => $theme_options['flickr_id'])), new SelectField(array('name' => 'Flickr Max Images', 'id' => THEME_OPTIONS_NAME . '[flickr_max_items]', 'description' => 'Maximum number of flickr images to display', 'value' => $theme_options['flickr_max_items'], 'default' => 12, 'choices' => array('6' => 6, '12' => 12, '18' => 18)))), 'Styles' => array(new SelectField(array('name' => 'Header Menu Styles', 'id' => THEME_OPTIONS_NAME . '[bootstrap_menu_styles]', 'description' => 'Adjust the styles that the header menu links will use.  Non-default options Twitter Bootstrap navigation components for sub-navigation support.', 'default' => 'default', 'choices' => array('Default (list of links with dropdowns)' => 'default', 'Tabs with dropdowns' => 'nav-tabs', 'Pills with dropdowns' => 'nav-pills'), 'value' => $theme_options['bootstrap_menu_styles']))));
/**
 * If Yoast SEO is activated, assume we're handling ALL SEO-related
 * modifications with it.  Don't add Facebook Opengraph theme options.
 **/
if (function_exists('is_plugin_active') && !is_plugin_active('wordpress-seo/wp-seo.php')) {
    array_unshift(Config::$theme_settings['Social'], new RadioField(array('name' => 'Enable OpenGraph', 'id' => THEME_OPTIONS_NAME . '[enable_og]', 'description' => 'Turn on the opengraph meta information used by Facebook.', 'default' => 1, 'choices' => array('On' => 1, 'Off' => 0), 'value' => $theme_options['enable_og'])), new TextField(array('name' => 'Facebook Admins', 'id' => THEME_OPTIONS_NAME . '[fb_admins]', 'description' => 'Comma seperated facebook usernames or user ids of those responsible for administrating any facebook pages created from pages on this site. Example: <em>592952074, abe.lincoln</em>', 'default' => null, 'value' => $theme_options['fb_admins'])));
}
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('admin' => True, 'src' => THEME_CSS_URL . '/admin.css'), THEME_STATIC_URL . '/bootstrap/bootstrap/css/bootstrap.css', THEME_STATIC_URL . '/bootstrap/bootstrap/css/bootstrap-responsive.css');
array_push(Config::$styles, plugins_url('gravityforms/css/forms.css'), THEME_CSS_URL . '/webcom-base.css', get_bloginfo('stylesheet_url'), THEME_URL . '/style-responsive.css');