get_template_directory_uri() . '/images/headers/pxwhite.jpg',
// Header text display default
'header-text' => false,
// Header text color default
'default-text-color' => oenology_get_header_textcolor(),
// Header image width (in pixels)
'width' => apply_filters( 'oenology_header_image_width', 1000 ),
// Header image height (in pixels)
'height' => apply_filters( 'oenology_header_image_height', 198 ),
// Header image random rotation default
'random-default' => false,
// Template header style callback
'wp-head-callback' => 'oenology_header_style',
// Admin header style callback
'admin-head-callback' => 'oenology_admin_header_style'
) );
/*
* Add Theme support for Custom Editor Style
*
* Apply custom CSS to the WordPress Visual
* editor, so that content in the editor is
* visually consistent with content rendered
* on the site.
*
* Child Themes can remove support for this feature via
* remove_editor_styles(). (Note PLURAL vs. singular.)
*
* @since WordPress 3.0.0
*/
add_editor_style();
/*
* Add Theme support for Post Formats
*
* Allow user to designate a "format" taxonomy
* for Blog Posts. This taxonomy can be used
* to alter the layout or style of Posts that
* have a given taxonomy term. The supported
* Post Format types - i.e. the supported
* taxonomy terms - are defined by function
* oenology_get_post_formats().
*
* Child Themes can change the array of supported
* post formats via the 'oenology_supported_post_formats'
* filter hook, which is an array of strings of
* supported post format types. For example, to
* support only 'aside' and 'gallery' in a Child
* Theme, hook into the filter, and return
* array( 'aside', 'gallery' ).
*
* Child Themes can completely remove support for this
* feature via remove_theme_support( 'post-formats' ).
*
* @uses oenology_get_post_formats() defined in \functions\custom.php
*
* @since WordPress 3.1.0
*/
// Define a variable to pass to add_theme_support()
$postformats = oenology_get_post_formats();
$supportedpostformats = array();
foreach ( $postformats as $format ) {
$supportedpostformats[] = $format['slug'];
}
$supportedpostformats = apply_filters( 'oenology_supported_post_formats', $supportedpostformats );
// Add Theme support for Post Formats
add_theme_support( 'post-formats', $supportedpostformats );
/*
* Add Theme support for bbPress
*
* Allow Theme to incorporate forum functionality
* via the bbPress Plugin. Placeholder for now, for
* testing purposes. Full bbPress support will be
* included in a future version of Oenology.
*
* Child Themes can remove support for this feature via
* remove_theme_support( 'bbpress' ).
*
* @since bbPress 2.0
*/
//add_theme_support( 'bbpress' );
/**
* @todo Add bbPress integration/support
*/
/**
* Set default Post Thumbnail size
*
* Sets the dimensions for the default
* 'thumbnail' image size.
*
* Child Themes can override this setting
* via set_post_thumbnail_size().
*/
set_post_thumbnail_size( 150, 150, true );
/**
* Add 'post-title-thumbnail' Image size
*
* Defines a new image size to the default array,
* which includes 'full', 'large', 'medium', and'
* 'thumbnail'.
*
* The 'post-title-thumbnail' image is defined
* as having dimensions of 55x55px, and will
* be hard-cropped rather than box-resized.
*
* Child Themes can override this setting
* via add_image_size().
*/
add_image_size( 'post-title-thumbnail', 55, 55, true );
/**
* Add 'attachment-nav-thumbnail' Image size
*
* Defines a new image size to the default array,
* which includes 'full', 'large', 'medium', and'
* 'thumbnail'.
*
* The 'post-title-thumbnail' image is defined
* as having dimensions of 45x45px, and will
* be hard-cropped rather than box-resized.
*
* Child Themes can override this setting
* via add_image_size().
*/
add_image_size( 'attachment-nav-thumbnail', 45, 45, true );
// Add a way for the custom header to be styled in the admin panel that controls
// custom headers. See oenology_admin_header_style(), below.
// Default custom headers packaged with the theme.
// %s is a placeholder for the theme template directory URI.
// Auto-magically registers the headers included with TwentyEleven if it is installed
if ( file_exists( get_theme_root() . '/twentyeleven/style.css' ) ) {
register_default_headers( array(
'wheel' => array(
'url' => '%s/../twentyeleven/images/headers/wheel.jpg',
'thumbnail_url' => '%s/../twentyeleven/images/headers/wheel-thumbnail.jpg',
'description' => 'Wheel'
),
'shore' => array(
'url' => '%s/../twentyeleven/images/headers/shore.jpg',
'thumbnail_url' => '%s/../twentyeleven/images/headers/shore-thumbnail.jpg',
'description' => 'Shore'
),
'trolley' => array(
'url' => '%s/../twentyeleven/images/headers/trolley.jpg',
'thumbnail_url' => '%s/../twentyeleven/images/headers/trolley-thumbnail.jpg',
'description' => 'Trolley'
),
'pine-cone' => array(
'url' => '%s/../twentyeleven/images/headers/pine-cone.jpg',
'thumbnail_url' => '%s/../twentyeleven/images/headers/pine-cone-thumbnail.jpg',
'description' => 'Pine Cone'
),
'chessboard' => array(
'url' => '%s/../twentyeleven/images/headers/chessboard.jpg',
'thumbnail_url' => '%s/../twentyeleven/images/headers/chessboard-thumbnail.jpg',
'description' => 'Chessboard'
),
'lanterns' => array(
'url' => '%s/../twentyeleven/images/headers/lanterns.jpg',
'thumbnail_url' => '%s/../twentyeleven/images/headers/lanterns-thumbnail.jpg',
'description' => 'Lanterns'
),
'willow' => array(
'url' => '%s/../twentyeleven/images/headers/willow.jpg',
'thumbnail_url' => '%s/../twentyeleven/images/headers/willow-thumbnail.jpg',
'description' => 'Willow'
),
'hanoi' => array(
'url' => '%s/../twentyeleven/images/headers/hanoi.jpg',
'thumbnail_url' => '%s/../twentyeleven/images/headers/hanoi-thumbnail.jpg',
'description' => 'Hanoi Plant'
)
) );
}
// Auto-magically registers the headers included with TwentyTen if it is installed
if ( file_exists( get_theme_root() . '/twentyten/style.css' ) ) {
register_default_headers( array(
'berries' => array(
'url' => '%s/../twentyten/images/headers/berries.jpg',
'thumbnail_url' => '%s/../twentyten/images/headers/berries-thumbnail.jpg',
'description' => 'Berries'
),
'cherryblossom' => array(
'url' => '%s/../twentyten/images/headers/cherryblossoms.jpg',
'thumbnail_url' => '%s/../twentyten/images/headers/cherryblossoms-thumbnail.jpg',
'description' => 'Cherry Blossoms'
),
'concave' => array(
'url' => '%s/../twentyten/images/headers/concave.jpg',
'thumbnail_url' => '%s/../twentyten/images/headers/concave-thumbnail.jpg',
'description' => 'Concave'
),
'fern' => array(
'url' => '%s/../twentyten/images/headers/fern.jpg',
'thumbnail_url' => '%s/../twentyten/images/headers/fern-thumbnail.jpg',
'description' => 'Fern'
),
'forestfloor' => array(
'url' => '%s/../twentyten/images/headers/forestfloor.jpg',
'thumbnail_url' => '%s/../twentyten/images/headers/forestfloor-thumbnail.jpg',
'description' => 'Forest Floor'
),
'inkwell' => array(
'url' => '%s/../twentyten/images/headers/inkwell.jpg',
'thumbnail_url' => '%s/../twentyten/images/headers/inkwell-thumbnail.jpg',
'description' => 'Inkwell', 'oenology'
),
'path' => array(
'url' => '%s/../twentyten/images/headers/path.jpg',
'thumbnail_url' => '%s/../twentyten/images/headers/path-thumbnail.jpg',
'description' => 'Path'
),
'sunset' => array(
'url' => '%s/../twentyten/images/headers/sunset.jpg',
'thumbnail_url' => '%s/../twentyten/images/headers/sunset-thumbnail.jpg',
'description' => 'Sunset'
)
) );
}
/*
* Define Nav Menus (since WordPress 3.0)
*/
// This theme uses wp_nav_menu() in two locations: main site navigation, and left-colum page navigation.
register_nav_menus( array(
'nav-header' => 'Header Navigation',
'nav-sidebar' => 'Sidebar Navigation',
'nav-footer' => 'Footer Navigation'
) );
}
// Hook oenology_setup() into 'after_setup_theme'
add_action( 'after_setup_theme', 'oenology_setup', 10 );
/**
* Custom Image Header Front-End Callback
*
* Callback to define the front-end style
* definitions for the custom image header.
*
* @uses oenology_get_options() Defined in /functions/options.php
*
* @link http://codex.wordpress.org/Function_Reference/get_header_image get_header_image()
* @link http://codex.wordpress.org/Function_Reference/get_header_textcolor get_header_textcolor()
* @link http://codex.wordpress.org/Function_Reference/header_image header_image()
* @link http://codex.wordpress.org/Function_Reference/header_textcolor header_textcolor()
*/
function oenology_header_style() {
?>