Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('HEADER_TEXTCOLOR', 'ffffff');
- define('HEADER_IMAGE', get_bloginfo('stylesheet_directory') . '/images/header-default.jpg');
- define('HEADER_IMAGE_WIDTH', 940);
- define('HEADER_IMAGE_HEIGHT', 130);
- // The site header function
- function site_header_style() {
- ?><style type="text/css">
- div#header {
- background: url(<?php header_image(); ?>);
- }
- </style><?php
- }
- // The admin header function
- function admin_header_style() {
- ?><style type="text/css">
- #headimg {
- width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
- height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
- }
- </style><?php
- }
- // Enable!
- add_custom_image_header('site_header_style', 'admin_header_style');
- remove_action( 'widgets_init', 'twentyten_widgets_init' ); //necessary to replace parent theme's code
- function twentyten_child_widgets_init() {
- register_sidebar( array(
- 'name' => __( 'Alt Primary Widget Area', 'twentyten' ),
- 'id' => 'alt-primary-widget-area',
- 'description' => __( 'Alt primary widget area', 'twentyten' ),
- 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
- 'after_widget' => '</li>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>',
- ) );
- }
- /** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */
- add_action( 'widgets_init', 'twentyten_child_widgets_init' );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement