Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $custom_header_support = array(
- // The default image to use.
- // The %s is a placeholder for the theme template directory URI.
- 'default-image' => '%s/images/headers/path.jpg',
- // The height and width of our custom header.
- 'width' => apply_filters( 'twentyten_header_image_width', 980 ),
- 'height' => apply_filters( 'twentyten_header_image_height', 224 ),
- // Support flexible heights.
- 'flex-height' => true,
- // Don't support text inside the header image.
- 'header-text' => false,
- // Callback for styling the header preview in the admin.
- 'admin-head-callback' => 'twentyten_admin_header_style',
- );
- add_theme_support( 'custom-header', $custom_header_support );
- if ( ! function_exists( 'get_custom_header' ) ) {
- // This is all for compatibility with versions of WordPress prior to 3.4.
- define( 'HEADER_TEXTCOLOR', '' );
- define( 'NO_HEADER_TEXT', true );
- define( 'HEADER_IMAGE', $custom_header_support['default-image'] );
- define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] );
- define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] );
- add_custom_image_header( '', $custom_header_support['admin-head-callback'] );
- add_custom_background();
- }
- // This theme uses wp_nav_menu() in one location.
- register_nav_menus( array(
- 'header' => __( 'Header Navigation', 'twentyten' ),
- 'footer' => __( 'Footer Navigation', 'twentyten' ),
- ) );
- // Remove the default menu function
- function tnc_remove_default_menu() {
- unregister_nav_menu( 'primary' );
- }
- add_action('after_setup_theme', 'tnc_remove_default_menu', 11);
- // Remove parent theme widgets by calling unregister_sidebar()
- function tnc_remove_widgets(){
- unregister_sidebar( 'fourth-footer-widget-area' );
- }
- add_action( 'widgets_init', 'tnc_remove_widgets', 11 );
- // Register new widgetized areas
- function tnc_widgets_init() {
- // Area 1a, below Area 1 to the left.
- register_sidebar( array(
- 'name' => __( 'Left Widget Area', 'twentyten' ),
- 'id' => 'left-widget-area',
- 'description' => __( 'Left 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>',
- ) );
- // Area 1b, below Area 1 to the right.
- register_sidebar( array(
- 'name' => __( 'Right Widget Area', 'twentyten' ),
- 'id' => 'right-widget-area',
- 'description' => __( 'Right 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', 'tnc_widgets_init' );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement