Skip to content

Commit 1dd1db6

Browse files
committed
Media: Indicate if media is header video in media library.
This introduces a label to indicate if a piece of media is being used as a video header in the media library. Props desrosj, Mista-Flo, mikeschroder. Fixes #42929. git-svn-id: https://develop.svn.wordpress.org/trunk@49205 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6c31412 commit 1dd1db6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/wp-admin/includes/template.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,6 +2270,13 @@ function _media_states( $post ) {
22702270
$media_states[] = __( 'Current Header Image' );
22712271
}
22722272
}
2273+
2274+
if ( get_theme_support( 'custom-header', 'video' ) && has_header_video() ) {
2275+
$mods = get_theme_mods();
2276+
if ( isset( $mods['header_video'] ) && $post->ID === $mods['header_video'] ) {
2277+
$media_states[] = __( 'Current Header Video' );
2278+
}
2279+
}
22732280
}
22742281

22752282
if ( current_theme_supports( 'custom-background' ) ) {

0 commit comments

Comments
 (0)