'e2e2e2', 'border' => 'dddddd', 'text' => '373737', 'link' => '1982d1', 'url' => '1982d1', ); class Hum_Theme { public function __construct() { // Late priority, to run after the parent theme's hook. add_action( 'wp_enqueue_scripts', array( $this, 'hum_scripts' ), 20 ); add_action( 'after_setup_theme', array( $this, 'after_setup_theme' ), 20 ); add_action( 'customize_register', array( $this, 'customize_register' ), 20 ); add_action( 'template_redirect', array( $this, 'showcase_content_width' ), 20 ); add_filter( 'twentyeleven_header_image_width', array( $this, 'new_header_width' ), 20 ); add_filter( 'twentyeleven_header_image_height', array( $this, 'new_header_height' ), 20 ); } public function showcase_content_width() { if ( is_page_template( 'showcase.php' ) ) $content_width = 740; //@todo This doesn't seem to change the content width on showcase.php. Not sure why. } public function hum_scripts() { wp_register_style( 'hum-parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'hum-style', get_stylesheet_directory_uri() . '/style.css', array( 'hum-parent-style' ) ); } public function after_setup_theme() { // Disable Twenty Eleven's theme options page & Customizer options remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' ); remove_action( 'customize_register', 'twentyeleven_customize_register' ); // Disable Twenty Eleven's layout body classes remove_filter( 'body_class', 'twentyeleven_layout_classes' ); //Disable Twenty Eleven's color schemes & link color remove_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_color_scheme' ); remove_action( 'wp_head', 'twentyeleven_print_link_color_style' ); // Change size for large feature (header) images to better fit this theme add_image_size( 'large-feature', 740, 288, true ); set_post_thumbnail_size( get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ), true ); // Declare textdomain for this child theme. Translations can be filed in the /languages/ directory. load_child_theme_textdomain( 'hum', get_stylesheet_directory() . '/languages' ); } // Remove Twenty Eleven's layout and color scheme customizer controls. public function customize_register( $wp_customize ) { $wp_customize->remove_section( 'twentyeleven_layout' ); $wp_customize->remove_control( 'twentyeleven_color_scheme' ); } //Set new custom header width and height, changing from 1000px to 180px, and 288px to 200px, using TE filters public function new_header_width( $width ) { $width = 180; return $width; } public function new_header_height( $height ) { $height = 200; return $height; } }; new Hum_Theme;