WordPress.org

Make WordPress Core

Changeset 18886


Ignore:
Timestamp:
10/05/11 17:20:43 (3 years ago)
Author:
markjaquith
Message:

Give custom background CSS more specificity. props GaryJ. fixes #18698

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r18818 r18886  
    435435        if ( post_type_supports( $post->post_type, 'post-formats' ) ) { 
    436436            $post_format = get_post_format( $post->ID ); 
    437      
     437 
    438438            if ( $post_format && !is_wp_error($post_format) ) 
    439439                $classes[] = 'single-format-' . sanitize_html_class( $post_format ); 
     
    507507    if ( is_admin_bar_showing() ) 
    508508        $classes[] = 'admin-bar'; 
     509 
     510    if ( get_background_image() || get_background_color() ) 
     511        $classes[] = 'custom-background'; 
    509512 
    510513    $page = $wp_query->get( 'page' ); 
  • trunk/wp-includes/theme.php

    r18821 r18886  
    17941794?> 
    17951795<style type="text/css"> 
    1796 body { <?php echo trim( $style ); ?> } 
     1796body.custom-background { <?php echo trim( $style ); ?> } 
    17971797</style> 
    17981798<?php 
Note: See TracChangeset for help on using the changeset viewer.