WordPress.org

Make WordPress Core

Changeset 36903


Ignore:
Timestamp:
03/09/2016 07:32:33 PM (5 years ago)
Author:
westonruter
Message:

Customize: Restore body class removed in [36837] for when custom logo is present.

The class name is wp-custom-logo and it will be toggled by JS in the Customizer preview when the custom logo is added or removed.

See #33755.
Fixes #35945.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/customize-preview.js

    r36851 r36903  
    257257
    258258            $( '.custom-logo-link' ).show();
     259            $( 'body' ).addClass( 'wp-custom-logo' );
    259260        } );
    260261
     
    263264                if ( ! newValue ) {
    264265                    $( '.custom-logo-link' ).hide();
     266                    $( 'body' ).removeClass( 'wp-custom-logo' );
    265267                }
    266268            } );
  • trunk/src/wp-includes/post-template.php

    r36837 r36903  
    706706    if ( get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) || get_background_image() )
    707707        $classes[] = 'custom-background';
     708
     709    if ( has_custom_logo() ) {
     710        $classes[] = 'wp-custom-logo';
     711    }
    708712
    709713    $page = $wp_query->get( 'page' );
Note: See TracChangeset for help on using the changeset viewer.