'51555c', 'cfct_header_text_color' => 'cecfd1', 'cfct_header_link_color' => 'ffffff', 'cfct_header_nav_background_color' => 'e9eaea', 'cfct_header_nav_link_color' => 'a00004', 'cfct_header_nav_text_color' => '51555c', 'cfct_page_title_color' => '51555c', 'cfct_page_subtitle_color' => '51555c', 'cfct_link_color' => 'a00004', 'cfct_footer_background_color' => '51555c', 'cfct_footer_text_color' => '999999', 'cfct_footer_link_color' => 'CECFD1', ); foreach ($cfct_color_options as $k => $default) { $cfct_options[] = $k; } function cfct_blog_option_defaults($options) { $options['cfct_list_limit_1'] = CFCT_HOME_LIST_LENGTH; $options['cfct_latest_limit_1'] = CFCT_HOME_LATEST_LENGTH; $options['cfct_list_limit_2'] = CFCT_HOME_LIST_LENGTH; $options['cfct_latest_limit_2'] = CFCT_HOME_LATEST_LENGTH; $options['cfct_list_limit_3'] = CFCT_HOME_LIST_LENGTH; $options['cfct_latest_limit_3'] = CFCT_HOME_LATEST_LENGTH; $options['cfct_ajax_load'] = 'yes'; $options['cfct_custom_colors'] = 'no'; $options['cfct_custom_header_image'] = 'no'; $options['cfct_css_background_images'] = 'yes'; return $options; } add_filter('cfct_option_defaults', 'cfct_blog_option_defaults'); function cfct_blog_init() { if (cfct_get_option('cfct_ajax_load') == 'yes') { cfct_ajax_load(); } if (cfct_get_option('cfct_lightbox') != 'no' && !is_admin()) { wp_enqueue_script('cfct_thickbox', get_bloginfo('template_directory').'/carrington-core/lightbox/thickbox.js', array('jquery'), '1.0'); // in the future we'll use this, but for now we want 2.5 compatibility // wp_enqueue_style('jquery-lightbox', get_bloginfo('template_directory').'/carrington-core/lightbox/css/lightbox.css'); } } add_action('init', 'cfct_blog_init'); wp_enqueue_script('jquery'); wp_enqueue_script('carrington', get_bloginfo('template_directory').'/js/carrington.js', array('jquery'), '1.0'); // Filter comment reply link to work with namespaced comment-reply javascript. add_filter('cancel_comment_reply_link', 'cfct_get_cancel_comment_reply_link', 10, 3); function cfct_blog_head() { // see enqueued style in cfct_blog_init, we'll activate that in the future if (cfct_get_option('cfct_lightbox') != 'no') { echo ' '; } cfct_get_option('cfct_ajax_load') == 'no' ? $ajax_load = 'false' : $ajax_load = 'true'; echo ' '; if (cfct_get_option('cfct_lightbox') != 'no') { echo ' '; } // preview if (isset($_GET['cfct_action']) && $_GET['cfct_action'] == 'custom_color_preview' && current_user_can('manage_options')) { cfct_blog_custom_colors('preview'); } else if (cfct_get_option('cfct_custom_colors') == 'yes') { cfct_blog_custom_colors(); } if (cfct_get_option('cfct_custom_header_image') == 'yes') { $header_image = cfct_get_option('cfct_header_image'); if ($header_image != 0 && $img = wp_get_attachment_image_src($header_image, 'large')) { ?>