mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
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:
parent
9e110f8aed
commit
9ef40ced2f
@ -434,7 +434,7 @@ function twentyfourteen_body_classes( $classes ) {
|
||||
$classes[] = 'group-blog';
|
||||
}
|
||||
|
||||
if ( get_header_image() || function_exists( 'has_header_video' ) && has_header_video() ) {
|
||||
if ( get_header_image() ) {
|
||||
$classes[] = 'header-image';
|
||||
} elseif ( ! in_array( $GLOBALS['pagenow'], array( 'wp-activate.php', 'wp-signup.php' ) ) ) {
|
||||
$classes[] = 'masthead-fixed';
|
||||
|
@ -32,11 +32,7 @@
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
<div id="page" class="hfeed site">
|
||||
<?php if ( function_exists( 'has_header_video' ) && has_header_video() ) : ?>
|
||||
<div id="site-header">
|
||||
<?php the_custom_header_markup(); ?>
|
||||
</div>
|
||||
<?php elseif ( get_header_image() ) : ?>
|
||||
<?php if ( get_header_image() ) : ?>
|
||||
<div id="site-header">
|
||||
<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' ) ); ?>">
|
||||
|
@ -40,7 +40,6 @@ function twentyfourteen_custom_header_setup() {
|
||||
'width' => 1260,
|
||||
'height' => 240,
|
||||
'flex-height' => true,
|
||||
'video' => true,
|
||||
'wp-head-callback' => 'twentyfourteen_header_style',
|
||||
'admin-head-callback' => 'twentyfourteen_admin_header_style',
|
||||
'admin-preview-callback' => 'twentyfourteen_admin_header_image',
|
||||
|
@ -19,8 +19,6 @@ function twentyfourteen_customize_register( $wp_customize ) {
|
||||
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
||||
$wp_customize->get_setting( 'blogdescription' )->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 ) ) {
|
||||
$wp_customize->selective_refresh->add_partial( 'blogname', array(
|
||||
|
@ -95,15 +95,15 @@
|
||||
*/
|
||||
if ( _window.width() > 781 ) {
|
||||
var mastheadHeight = $( '#masthead' ).height(),
|
||||
mastheadOffset;
|
||||
toolbarOffset, mastheadOffset;
|
||||
|
||||
if ( mastheadHeight > 48 ) {
|
||||
body.removeClass( 'masthead-fixed' );
|
||||
}
|
||||
|
||||
mastheadOffset = $( '#site-header' ).height();
|
||||
|
||||
if ( body.is( '.header-image' ) ) {
|
||||
toolbarOffset = body.is( '.admin-bar' ) ? $( '#wpadminbar' ).height() : 0;
|
||||
mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset;
|
||||
|
||||
_window.on( 'scroll.twentyfourteen', function() {
|
||||
if ( _window.scrollTop() > mastheadOffset && mastheadHeight < 49 ) {
|
||||
@ -112,19 +112,6 @@
|
||||
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();
|
||||
} );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,6 @@ canvas,
|
||||
video {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
html {
|
||||
@ -609,11 +608,6 @@ video {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#wp-custom-header iframe,
|
||||
#wp-custom-header video {
|
||||
margin-bottom: -8px;
|
||||
}
|
||||
|
||||
p > embed,
|
||||
p > iframe,
|
||||
p > object,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @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.
|
||||
|
Loading…
Reference in New Issue
Block a user