/**
  * seamless_theme_setup
  *
  * @todo review for impact of deprecations on child themes & fix comment blocks?
  * @since Distilled 1.0?
  */
 function seamless_theme_setup()
 {
     global $content_width;
     /**
      * Set the content width based on the theme's design and stylesheet.
      *
      * Used to set the width of images and content. Should be equal to the width the theme
      * is designed for, generally via the style.css stylesheet.
      *
      * @since Distilled 1.0
      */
     if (!isset($content_width)) {
         $content_width = 600;
     }
     // Check for MultiSite
     define('THEMATIC_MB', is_multisite());
     // Create the feedlinks
     if (!current_theme_supports('seamless_legacy_feedlinks')) {
         add_theme_support('automatic-feed-links');
     }
     if (apply_filters('seamless_post_thumbs', true)) {
         add_theme_support('post-thumbnails');
     }
     add_theme_support('seamless_superfish');
     add_theme_support('seamless_meta_viewport');
     // Path constants
     define('DISTILLED_LIB', get_template_directory() . '/library');
     // Create Theme Options Page
     require_once DISTILLED_LIB . '/extensions/theme-options.php';
     // Need a little help from our helper functions
     require_once DISTILLED_LIB . '/extensions/helpers.php';
     // Load overrides to activate the old xhtml markup if set
     if (!is_admin() && seamless_is_legacy_xhtml()) {
         add_theme_support('seamless_legacy');
         require_once DISTILLED_LIB . '/legacy/legacy.php';
     }
     // Load widgets
     require_once DISTILLED_LIB . '/extensions/widgets.php';
     // Load custom header extensions
     require_once DISTILLED_LIB . '/extensions/header-extensions.php';
     // Load custom content filters
     require_once DISTILLED_LIB . '/extensions/content-extensions.php';
     // Load custom Comments filters
     require_once DISTILLED_LIB . '/extensions/comments-extensions.php';
     // Load custom discussion filters
     require_once DISTILLED_LIB . '/extensions/discussion-extensions.php';
     // Load custom Widgets
     require_once DISTILLED_LIB . '/extensions/widgets-extensions.php';
     // Load the Comments Template functions and callbacks
     require_once DISTILLED_LIB . '/extensions/discussion.php';
     // Load custom sidebar hooks
     require_once DISTILLED_LIB . '/extensions/sidebar-extensions.php';
     // Load custom footer hooks
     require_once DISTILLED_LIB . '/extensions/footer-extensions.php';
     // Add Dynamic Contextual Semantic Classes
     require_once DISTILLED_LIB . '/extensions/dynamic-classes.php';
     // Load Theme Customizer support
     require_once DISTILLED_LIB . '/extensions/customizer.php';
     // Adds filters for the description/meta content in archive templates
     add_filter('archive_meta', 'wptexturize');
     add_filter('archive_meta', 'convert_smilies');
     add_filter('archive_meta', 'convert_chars');
     add_filter('archive_meta', 'wpautop');
     // Remove the WordPress Generator - via http://blog.ftwr.co.uk/archives/2007/10/06/improving-the-wordpress-generator/
     function seamless_remove_generators()
     {
         return '';
     }
     if (apply_filters('seamless_hide_generators', true)) {
         add_filter('the_generator', 'seamless_remove_generators');
     }
     // Translate, if applicable
     load_theme_textdomain('seamless', DISTILLED_LIB . '/languages');
     $locale = get_locale();
     $locale_file = DISTILLED_LIB . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
 }
	        <?php 
        }
    }
    // Add postMessage support for site title and description.
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    // Get the default seamless footer text
    $seamless_defaults = seamless_default_opt();
    $seamless_default_footertext = $seamless_defaults['footer_txt'];
    $seamless_default_layout = $seamless_defaults['layout'];
    /**
     * Filter to show or hide the layout section from the Theme Customizer
     * 
     * @param bool true Default is showing the section
     */
    if (apply_filters('seamless_show_customizer_layoutsection', true) && !seamless_is_legacy_xhtml()) {
        $wp_customize->add_section('seamless_layout', array('title' => __('Layout', 'seamless'), 'description' => __('Choose the main layout of your theme', 'seamless'), 'capability' => 'edit_theme_options', 'priority' => '90'));
        $wp_customize->add_setting('seamless_theme_opt[layout]', array('default' => $seamless_default_layout, 'type' => 'option'));
        $possible_layouts = seamless_available_theme_layouts();
        $available_layouts = array();
        foreach ($possible_layouts as $layout) {
            $available_layouts[$layout['slug']] = $layout['title'];
        }
        $wp_customize->add_control('seamless_layout_control', array('type' => 'radio', 'label' => __('Theme layout', 'seamless'), 'section' => 'seamless_layout', 'choices' => $available_layouts, 'settings' => 'seamless_theme_opt[layout]'));
    }
    // Add section for seamless footer options
    $wp_customize->add_section('seamless_footer_text', array('title' => __('Footer', 'seamless'), 'description' => sprintf(_x('You can use HTML in your footer text.', '%s are shortcode tags', 'seamless')), 'priority' => 135));
    // Add setting for footer text
    $wp_customize->add_setting('seamless_theme_opt[footer_txt]', array('default' => $seamless_default_footertext, 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'refresh'));
    // Add control for footer text
    $wp_customize->add_control(new Distilled_Customize_Textarea_Control($wp_customize, 'seamless_theme_opt[footer_txt]', array('label' => __('Footer text', 'seamless'), 'section' => 'seamless_footer_text', 'type' => 'textarea', 'settings' => 'seamless_theme_opt[footer_txt]')));