Twenty Fourteen: Removes video header support

Support was added to test implementation but never completed. This removes the test implementation.

Props davidakennedy
Fixes #38783

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


git-svn-id: http://core.svn.wordpress.org/trunk@39166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Tammie Lister 2016-11-14 17:17:31 +00:00
parent 9e110f8aed
commit 9ef40ced2f
7 changed files with 6 additions and 32 deletions

View File

@ -434,7 +434,7 @@ function twentyfourteen_body_classes( $classes ) {
$classes[] = 'group-blog'; $classes[] = 'group-blog';
} }
if ( get_header_image() || function_exists( 'has_header_video' ) && has_header_video() ) { if ( get_header_image() ) {
$classes[] = 'header-image'; $classes[] = 'header-image';
} elseif ( ! in_array( $GLOBALS['pagenow'], array( 'wp-activate.php', 'wp-signup.php' ) ) ) { } elseif ( ! in_array( $GLOBALS['pagenow'], array( 'wp-activate.php', 'wp-signup.php' ) ) ) {
$classes[] = 'masthead-fixed'; $classes[] = 'masthead-fixed';

View File

@ -32,11 +32,7 @@
<body <?php body_class(); ?>> <body <?php body_class(); ?>>
<div id="page" class="hfeed site"> <div id="page" class="hfeed site">
<?php if ( function_exists( 'has_header_video' ) && has_header_video() ) : ?> <?php if ( get_header_image() ) : ?>
<div id="site-header">
<?php the_custom_header_markup(); ?>
</div>
<?php elseif ( get_header_image() ) : ?>
<div id="site-header"> <div id="site-header">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"> <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">

View File

@ -40,7 +40,6 @@ function twentyfourteen_custom_header_setup() {
'width' => 1260, 'width' => 1260,
'height' => 240, 'height' => 240,
'flex-height' => true, 'flex-height' => true,
'video' => true,
'wp-head-callback' => 'twentyfourteen_header_style', 'wp-head-callback' => 'twentyfourteen_header_style',
'admin-head-callback' => 'twentyfourteen_admin_header_style', 'admin-head-callback' => 'twentyfourteen_admin_header_style',
'admin-preview-callback' => 'twentyfourteen_admin_header_image', 'admin-preview-callback' => 'twentyfourteen_admin_header_image',

View File

@ -19,8 +19,6 @@ function twentyfourteen_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_image' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_image_data' )->transport = 'postMessage';
if ( isset( $wp_customize->selective_refresh ) ) { if ( isset( $wp_customize->selective_refresh ) ) {
$wp_customize->selective_refresh->add_partial( 'blogname', array( $wp_customize->selective_refresh->add_partial( 'blogname', array(

View File

@ -95,15 +95,15 @@
*/ */
if ( _window.width() > 781 ) { if ( _window.width() > 781 ) {
var mastheadHeight = $( '#masthead' ).height(), var mastheadHeight = $( '#masthead' ).height(),
mastheadOffset; toolbarOffset, mastheadOffset;
if ( mastheadHeight > 48 ) { if ( mastheadHeight > 48 ) {
body.removeClass( 'masthead-fixed' ); body.removeClass( 'masthead-fixed' );
} }
mastheadOffset = $( '#site-header' ).height();
if ( body.is( '.header-image' ) ) { if ( body.is( '.header-image' ) ) {
toolbarOffset = body.is( '.admin-bar' ) ? $( '#wpadminbar' ).height() : 0;
mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset;
_window.on( 'scroll.twentyfourteen', function() { _window.on( 'scroll.twentyfourteen', function() {
if ( _window.scrollTop() > mastheadOffset && mastheadHeight < 49 ) { if ( _window.scrollTop() > mastheadOffset && mastheadHeight < 49 ) {
@ -112,19 +112,6 @@
body.removeClass( 'masthead-fixed' ); body.removeClass( 'masthead-fixed' );
} }
} ); } );
// Update masthead offset once a custom header video loads.
$( document ).on( 'wp-custom-header-video-loaded', function() {
mastheadOffset = $( '#site-header' ).height();
} );
// Update masthead offset after a selective refresh.
if ( 'undefined' !== typeof wp && wp.customize && wp.customize.selectiveRefresh ) {
wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function() {
mastheadOffset = $( '#site-header' ).height();
} );
}
} }
} }

View File

@ -88,7 +88,6 @@ canvas,
video { video {
display: inline-block; display: inline-block;
max-width: 100%; max-width: 100%;
height: auto;
} }
html { html {
@ -609,11 +608,6 @@ video {
max-width: 100%; max-width: 100%;
} }
#wp-custom-header iframe,
#wp-custom-header video {
margin-bottom: -8px;
}
p > embed, p > embed,
p > iframe, p > iframe,
p > object, p > object,

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-beta3-39225'; $wp_version = '4.7-beta3-39226';
/** /**
* 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.