<?php
/**
* Fire up the engines boys and girls let's start theme setup.
*/
add_action('after_setup_theme', 'shell_setup');
if (!function_exists('shell_setup')):
function shell_setup() {
global $content_width;
/**
* Global content width.
*/
if (!isset($content_width))
$content_width = 550;
/**
* Shell is now available for translations.
* Add your files into /languages/ directory.
*/
load_theme_textdomain( 'shell', TEMPLATEPATH . '/languages' );
$locale = get_locale();
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
if ( is_readable( $locale_file ) )
require_once( $locale_file );
/**
* Add callback for custom TinyMCE editor stylesheets. (editor-style.css)
* @see http://codex.wordpress.org/Function_Reference/add_editor_style
*/
add_editor_style();
/**
* This feature enables post and comment RSS feed links to head.
* @see http://codex.wordpress.org/Function_Reference/add_theme_support#Feed_Links
*/
add_theme_support('automatic-feed-links');
/**
* This feature enables post-thumbnail support for a theme.
* @see http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support('post-thumbnails');
/**
* This feature allows users to use custom background for a theme.
* @see http://codex.wordpress.org/Function_Reference/add_custom_background
*/
add_custom_background();
/**
* This feature adds a callbacks for image header display.
* In our case we are using this to display logo.
* @see http://codex.wordpress.org/Function_Reference/add_custom_image_header
*/
define('HEADER_TEXTCOLOR', '');
define('HEADER_IMAGE', '%s/images/default-logo.png'); // %s is the template dir uri
define('HEADER_IMAGE_WIDTH', 300); // use width and height appropriate for your theme
define('HEADER_IMAGE_HEIGHT', 100);
define('NO_HEADER_TEXT', true);
// gets included in the admin header
function shell_admin_header_style() {
?><style type="text/css">
#headimg {
border: none !important;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
}
</style><?php
}
add_custom_image_header('', 'shell_admin_header_style');
register_nav_menu( 'primary', __( 'Primary Menu', 'shell' ) );
}
endif;
?>
It looks like you're new here. If you want to get involved, click one of these buttons!