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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36915 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Konstantin Obenland
2016-03-09 23:43:49 +00:00
parent 4286a3e63b
commit 6d951b3c5d
7 changed files with 36 additions and 163 deletions

View File

@@ -72,9 +72,6 @@ require_once(ABSPATH . 'wp-admin/includes/user.php');
/** WordPress Site Icon API */
require_once(ABSPATH . 'wp-admin/includes/class-wp-site-icon.php');
/** WordPress Custom Logo API */
require_once(ABSPATH . 'wp-admin/includes/class-wp-custom-logo.php');
/** WordPress Update Administration API */
require_once(ABSPATH . 'wp-admin/includes/update.php');