Make WordPress Core


Ignore:
Timestamp:
03/09/2016 11:43:49 PM (10 years ago)
Author:
obenland
Message:

Customize: Only add custom logo’s header text control if needed.

Dissolves WP_CustomLogo and adopts a structure similar to custom header and background (See _delete_attachment_theme_mod()).
The option to hide header text only gets added if it’s not already part of custom header, and only if selectors have been registered when theme support for custom logos was declared. Themes can add postMessage support for it as well.

Example:

add_theme_support( 'custom-logo', array(
    'size' => ‘large’,
    'header-text' => array( 'site-title', 'site-description' ),
) );

See #33755.

File:
1 edited

Legend:

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

    r36837 r36915  
    881881        restore_current_blog();
    882882    }
    883     $size = get_theme_support( 'custom-logo' );
    884     $size = $size[0]['size'];
     883    $size = get_theme_support( 'custom-logo', 'size' );
    885884
    886885    // We have a logo. Logo is go.
Note: See TracChangeset for help on using the changeset viewer.