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.

Built from https://develop.svn.wordpress.org/trunk@49205


git-svn-id: http://core.svn.wordpress.org/trunk@48967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
antpb 2020-10-19 18:32:07 +00:00
parent 570a4e8872
commit 9d13ae60e4
2 changed files with 8 additions and 1 deletions

View File

@ -2270,6 +2270,13 @@ function _media_states( $post ) {
$media_states[] = __( 'Current Header Image' ); $media_states[] = __( 'Current Header Image' );
} }
} }
if ( get_theme_support( 'custom-header', 'video' ) && has_header_video() ) {
$mods = get_theme_mods();
if ( isset( $mods['header_video'] ) && $post->ID === $mods['header_video'] ) {
$media_states[] = __( 'Current Header Video' );
}
}
} }
if ( current_theme_supports( 'custom-background' ) ) { if ( current_theme_supports( 'custom-background' ) ) {

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.6-alpha-49204'; $wp_version = '5.6-alpha-49205';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.