Example #1
0
 function baselines()
 {
     $this->base['num'] = 10;
     // Get the necessary user-specified values
     $this->fonts = thesis_get_design_option('fonts');
     $this->colors = thesis_get_design_option('colors');
     $this->borders = thesis_get_design_option('borders');
     $this->nav = thesis_get_design_option('nav');
     $this->layout = thesis_get_design_option('layout');
     $this->teasers = thesis_get_design_option('teasers');
     $this->feature_box = thesis_get_design_option('feature_box');
     $this->multimedia_box = thesis_get_design_option('multimedia_box');
     // Calculate line heights
     if (is_array($this->fonts['sizes'])) {
         foreach ($this->fonts['sizes'] as $area => $size) {
             if ($area == 'header' || $area == 'tagline' || $area == 'sidebars' || $area == 'code') {
                 $line_height = $size + 6;
                 if ($line_height % 2 == 1) {
                     $line_height = $line_height - 1;
                 }
             } elseif ($area == 'nav_menu') {
                 $line_height = $size + 4;
                 if ($line_height % 2 == 1) {
                     $line_height = $line_height - 1;
                 }
             } else {
                 $line_height = $size + 8;
                 if ($line_height % 2 == 1) {
                     $line_height = $line_height - 1;
                 }
             }
             $this->line_heights[$area] = $line_height;
         }
     }
     $this->base['horizontal'] = $this->line_heights['content'];
     $this->base['page_padding'] = $this->layout['page_padding'] ? $this->line_heights['content'] * $this->layout['page_padding'] : 0;
 }
Example #2
0
<?php

// Internationalization
load_theme_textdomain('thesis', THESIS_LIB . '/languages');
// Add Thesis Options and Design Options pages to the WordPress Dashboard
if (is_admin()) {
    thesis_admin_setup();
}
// Register sidebars and widgets
thesis_register_sidebars();
thesis_register_widgets();
$thesis = array('head' => thesis_get_option('head'), 'feed' => thesis_get_option('feed'), 'scripts' => thesis_get_option('scripts'), 'home' => thesis_get_option('home'), 'display' => thesis_get_option('display'), 'nav' => thesis_get_option('nav'), 'image' => thesis_get_option('image'), 'save_button_text' => thesis_get_option('save_button_text'), 'version' => thesis_get_option('version'));
$thesis_design = array('fonts' => thesis_get_design_option('fonts'), 'colors' => thesis_get_design_option('colors'), 'borders' => thesis_get_design_option('borders'), 'nav' => thesis_get_design_option('nav'), 'style' => thesis_get_design_option('style'), 'layout' => thesis_get_design_option('layout'), 'teasers' => thesis_get_design_option('teasers'), 'feature_box' => thesis_get_design_option('feature_box'), 'multimedia_box' => thesis_get_design_option('multimedia_box'));
if ($_GET['activated']) {
    thesis_upgrade();
}
// Construct the WordPress header
add_action('wp_head', array('Head', 'build'));
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'start_post_rel_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'adjacent_posts_rel_link');
remove_action('wp_head', 'next_post_rel_link');
remove_action('wp_head', 'prev_post_rel_link');
remove_action('wp_head', 'parent_post_rel_link');
// Add post images to RSS feed
add_filter('the_content', 'thesis_add_image_to_feed');
// Construct the Thesis header
add_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_header', 'thesis_default_header');
// Post hooks