mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Customize: Introduce Logo support for themes.
Allows a common theme feature to have a common implementation provided by core and available in a consistent location for users. See https://make.wordpress.org/core/2016/02/24/theme-logo-support/ Props kwight, enejb, jeherve, bhubbard, samhotchkiss, zinigor, eliorivero, adamsilverstein, melchoyce, ryan, mikeschroder, westonruter, pento, karmatosed, celloexpressions, obenland. See #33755. git-svn-id: https://develop.svn.wordpress.org/trunk@36698 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1750,13 +1750,17 @@ function _media_states( $post ) {
|
||||
$media_states[] = __( 'Site Icon' );
|
||||
}
|
||||
|
||||
if ( $post->ID == get_theme_mod( 'site_logo' ) ) {
|
||||
$media_states[] = __( 'Logo' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the default media display states for items in the Media list table.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*
|
||||
* @param array $media_states An array of media states. Default 'Header Image',
|
||||
* 'Background Image', 'Site Icon'.
|
||||
* 'Background Image', 'Site Icon', 'Logo'.
|
||||
*/
|
||||
$media_states = apply_filters( 'display_media_states', $media_states );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user