Changeset 21325 for trunk/wp-content/themes/twentytwelve/functions.php
- Timestamp:
- 07/25/2012 04:28:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/functions.php
r21279 r21325 72 72 73 73 // Add support for custom background. 74 add_theme_support( 'custom-background' ); 74 add_theme_support( 'custom-background', array( 75 'default-color' => 'e6e6e6', 76 ) ); 75 77 76 78 // Add custom image size for featured image use, displayed on "standard" posts. … … 326 328 327 329 /** 328 * Extends the default WordPress body class to denote a full-width layout. 329 * Used when there are no active widgets in the sidebar. 330 * Extends the default WordPress body class to denote: 331 * 1. Using a full-width layout, when no active widgets in the sidebar 332 * or full-width template. 333 * 2. White or empty background color to change the layout and spacing. 330 334 * 331 335 * @since Twenty Twelve 1.0 332 336 */ 333 337 function twentytwelve_body_class( $classes ) { 334 if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'full-width' ) ) 338 $background_color = get_background_color(); 339 340 if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'full-width-page.php' ) ) 335 341 $classes[] = 'full-width'; 342 343 if ( empty( $background_color ) ) 344 $classes[] = 'custom-background-empty'; 345 elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) ) 346 $classes[] = 'custom-background-white'; 336 347 337 348 return $classes;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)