Make WordPress Core

Changeset 39226


Ignore:
Timestamp:
11/14/2016 05:16:04 PM (8 years ago)
Author:
karmatosed
Message:

Twenty Fourteen: Removes video header support

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

Props davidakennedy
Fixes #38783

Location:
trunk/src/wp-content/themes/twentyfourteen
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r38985 r39226  
    435435    }
    436436
    437     if ( get_header_image() || function_exists( 'has_header_video' ) && has_header_video() ) {
     437    if ( get_header_image() ) {
    438438        $classes[] = 'header-image';
    439439    } elseif ( ! in_array( $GLOBALS['pagenow'], array( 'wp-activate.php', 'wp-signup.php' ) ) ) {
  • trunk/src/wp-content/themes/twentyfourteen/header.php

    r38985 r39226  
    3333<body <?php body_class(); ?>>
    3434<div id="page" class="hfeed site">
    35     <?php if ( function_exists( 'has_header_video' ) && has_header_video() ) : ?>
    36         <div id="site-header">
    37             <?php the_custom_header_markup(); ?>
    38         </div>
    39     <?php elseif ( get_header_image() ) : ?>
     35    <?php if ( get_header_image() ) : ?>
    4036    <div id="site-header">
    4137        <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
  • trunk/src/wp-content/themes/twentyfourteen/inc/custom-header.php

    r38985 r39226  
    4141        'height'                 => 240,
    4242        'flex-height'            => true,
    43         'video'                  => true,
    4443        'wp-head-callback'       => 'twentyfourteen_header_style',
    4544        'admin-head-callback'    => 'twentyfourteen_admin_header_style',
  • trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php

    r38985 r39226  
    2020    $wp_customize->get_setting( 'blogdescription' )->transport   = 'postMessage';
    2121    $wp_customize->get_setting( 'header_textcolor' )->transport  = 'postMessage';
    22     $wp_customize->get_setting( 'header_image' )->transport      = 'postMessage';
    23     $wp_customize->get_setting( 'header_image_data' )->transport = 'postMessage';
    2422
    2523    if ( isset( $wp_customize->selective_refresh ) ) {
  • trunk/src/wp-content/themes/twentyfourteen/js/functions.js

    r39102 r39226  
    9696        if ( _window.width() > 781 ) {
    9797            var mastheadHeight = $( '#masthead' ).height(),
    98                 mastheadOffset;
     98                toolbarOffset, mastheadOffset;
    9999
    100100            if ( mastheadHeight > 48 ) {
     
    102102            }
    103103
    104             mastheadOffset = $( '#site-header' ).height();
    105 
    106104            if ( body.is( '.header-image' ) ) {
     105                toolbarOffset  = body.is( '.admin-bar' ) ? $( '#wpadminbar' ).height() : 0;
     106                mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset;
    107107
    108108                _window.on( 'scroll.twentyfourteen', function() {
     
    113113                    }
    114114                } );
    115 
    116                 // Update masthead offset once a custom header video loads.
    117                 $( document ).on( 'wp-custom-header-video-loaded', function() {
    118                     mastheadOffset = $( '#site-header' ).height();
    119                 } );
    120 
    121 
    122                 // Update masthead offset after a selective refresh.
    123                 if ( 'undefined' !== typeof wp && wp.customize && wp.customize.selectiveRefresh ) {
    124                     wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function() {
    125                         mastheadOffset = $( '#site-header' ).height();
    126                     } );
    127                 }
    128115            }
    129116        }
  • trunk/src/wp-content/themes/twentyfourteen/style.css

    r39136 r39226  
    8989    display: inline-block;
    9090    max-width: 100%;
    91     height: auto;
    9291}
    9392
     
    608607    margin-bottom: 24px;
    609608    max-width: 100%;
    610 }
    611 
    612 #wp-custom-header iframe,
    613 #wp-custom-header video {
    614     margin-bottom: -8px;
    615609}
    616610
Note: See TracChangeset for help on using the changeset viewer.