WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/09/2016 11:43:49 PM (6 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/default-filters.php

    r36617 r36915  
    372372// Theme
    373373add_action( 'wp_loaded', '_custom_header_background_just_in_time' );
     374add_action( 'wp_head', '_custom_logo_header_styles' );
    374375add_action( 'plugins_loaded', '_wp_customize_include' );
    375376add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );
Note: See TracChangeset for help on using the changeset viewer.