Advertisement
Digitalraindrops

2012 Child Functions.php

Jun 1st, 2012
615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.00 KB | None | 0 0
  1. <?php
  2. // It's a new layout make the content wider
  3. if ( ! isset( $content_width ) )
  4.     $content_width = 940;
  5.  
  6. /** Tell WordPress to run post_theme_setup() when the 'after_setup_theme' hook is run. */
  7. add_action( 'after_setup_theme', 'post_theme_setup' );
  8.  
  9. if ( !function_exists( 'post_theme_setup' ) ):
  10. function post_theme_setup() {
  11.        
  12.     // The height and width of your custom header.
  13.     // Add a filter to twentyeleven_header_image_width and twentyeleven_header_image_height to change these values.
  14.     define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyeleven_header_image_width', 1140 ) );
  15.     define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyeleven_header_image_height', 150 ) );
  16.  
  17.     /* 1140 Remove Headers */
  18.     function child_remove_twenty_eleven_headers(){
  19.         unregister_default_headers( array(
  20.             'wheel',
  21.             'shore',
  22.             'trolley',
  23.             'pine-cone',
  24.             'chessboard',
  25.             'lanterns',
  26.             'willow' ,
  27.             'hanoi')
  28.             );
  29.     }
  30.     add_action( 'after_setup_theme', 'child_remove_twenty_eleven_headers', 11 );
  31. }
  32. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement