Changeset 39226
- Timestamp:
- 11/14/2016 05:16:04 PM (8 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfourteen
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/functions.php
r38985 r39226 435 435 } 436 436 437 if ( get_header_image() || function_exists( 'has_header_video' ) && has_header_video()) {437 if ( get_header_image() ) { 438 438 $classes[] = 'header-image'; 439 439 } elseif ( ! in_array( $GLOBALS['pagenow'], array( 'wp-activate.php', 'wp-signup.php' ) ) ) { -
trunk/src/wp-content/themes/twentyfourteen/header.php
r38985 r39226 33 33 <body <?php body_class(); ?>> 34 34 <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() ) : ?> 40 36 <div id="site-header"> 41 37 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> -
trunk/src/wp-content/themes/twentyfourteen/inc/custom-header.php
r38985 r39226 41 41 'height' => 240, 42 42 'flex-height' => true, 43 'video' => true,44 43 'wp-head-callback' => 'twentyfourteen_header_style', 45 44 'admin-head-callback' => 'twentyfourteen_admin_header_style', -
trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php
r38985 r39226 20 20 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 21 21 $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';24 22 25 23 if ( isset( $wp_customize->selective_refresh ) ) { -
trunk/src/wp-content/themes/twentyfourteen/js/functions.js
r39102 r39226 96 96 if ( _window.width() > 781 ) { 97 97 var mastheadHeight = $( '#masthead' ).height(), 98 mastheadOffset;98 toolbarOffset, mastheadOffset; 99 99 100 100 if ( mastheadHeight > 48 ) { … … 102 102 } 103 103 104 mastheadOffset = $( '#site-header' ).height();105 106 104 if ( body.is( '.header-image' ) ) { 105 toolbarOffset = body.is( '.admin-bar' ) ? $( '#wpadminbar' ).height() : 0; 106 mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset; 107 107 108 108 _window.on( 'scroll.twentyfourteen', function() { … … 113 113 } 114 114 } ); 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 }128 115 } 129 116 } -
trunk/src/wp-content/themes/twentyfourteen/style.css
r39136 r39226 89 89 display: inline-block; 90 90 max-width: 100%; 91 height: auto;92 91 } 93 92 … … 608 607 margin-bottom: 24px; 609 608 max-width: 100%; 610 }611 612 #wp-custom-header iframe,613 #wp-custom-header video {614 margin-bottom: -8px;615 609 } 616 610
Note: See TracChangeset
for help on using the changeset viewer.