View difference between Paste ID: pFLUYq8J and qKMBMxA3
SHOW: | | - or go back to the newest paste.
1
<?php
2
3
/**
4
 * 
5
 * Digital Raindrops added
6
 * This function will run after the parents functions.php 
7
 */
8
9
add_action( 'after_setup_theme', 'post_theme_setup' );
10
11
/**
12
 * Create a pluggable Function in our child theme
13
 */
14
if ( !function_exists( 'post_theme_setup' ) ):
15
16
function post_theme_setup() {
17
   
18
  	/* Code goes here! */
19
  
20
  	// This theme uses wp_nav_menu() in one location.
21
  	register_nav_menus( array(
22
		'header' => __( 'Header Navigation', 'twentyten' ),
23
		'footer' => __( 'Footer Navigation', 'twentyten' ),
24
  	) );
25
	
26
	
27
   	// Remove the default menu function
28
   	function tnc_remove_default_menu() {
29
		unregister_nav_menu( 'primary' );
30
   	}
31
   	add_action('after_setup_theme', 'tnc_remove_default_menu', 11);
32
33
   	/**
34
     * Change the header width here
35
     */
36
   	add_filter( 'twentyten_header_image_width', 'my_header_width' );
37
   
38
    function my_header_width($width) {
39
   		$width = 980;
40
		return $width;
41
   	}
42
43
   	/**
44
     * Change the header width here
45
     */   	
46
   	add_filter( 'twentyten_header_image_height', 'my_header_height' );
47
   
48
   	function my_header_height($height) {
49
		$height = 224;
50
		return $height;
51
   	}
52
53
   	// Remove the default menu function
54
   	function tnc_remove_default_menu() {
55
		unregister_nav_menu( 'primary' );
56
   	}
57
   	add_action('after_setup_theme', 'tnc_remove_default_menu', 11);
58
59
   	// Remove parent theme widgets by calling unregister_sidebar() 
60
   	function tnc_remove_widgets(){
61
		unregister_sidebar( 'fourth-footer-widget-area' );
62
   	}
63
   	add_action( 'widgets_init', 'tnc_remove_widgets', 11 );
64
65
66
   	// Register new widgetized areas
67
   	function tnc_widgets_init() {
68
69
		// Area 1a, below Area 1 to the left.
70
		register_sidebar( array(
71
			'name' => __( 'Left Widget Area', 'twentyten' ),
72
			'id' => 'left-widget-area',
73
			'description' => __( 'Left widget area', 'twentyten' ),
74
			'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
75
			'after_widget' => '</li>',
76
			'before_title' => '<h3 class="widget-title">',
77
			'after_title' => '</h3>',
78
		) );
79
	
80
		// Area 1b, below Area 1 to the right.
81
		register_sidebar( array(
82
			'name' => __( 'Right Widget Area', 'twentyten' ),
83
			'id' => 'right-widget-area',
84
			'description' => __( 'Right widget area', 'twentyten' ),
85
			'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
86
			'after_widget' => '</li>',
87
			'before_title' => '<h3 class="widget-title">',
88
			'after_title' => '</h3>',
89
		) );
90
91
   }
92
   /** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */
93
  	add_action( 'widgets_init', 'tnc_widgets_init' );
94
}
95
endif;