Ticket #38783: 38783.patch
| File 38783.patch, 4.9 KB (added by , 9 years ago) |
|---|
-
src/wp-content/themes/twentyfourteen/functions.php
434 434 $classes[] = 'group-blog'; 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' ) ) ) { 440 440 $classes[] = 'masthead-fixed'; -
src/wp-content/themes/twentyfourteen/header.php
32 32 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"> 42 38 <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' ) ); ?>"> -
src/wp-content/themes/twentyfourteen/inc/custom-header.php
40 40 'width' => 1260, 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', 46 45 'admin-preview-callback' => 'twentyfourteen_admin_header_image', -
src/wp-content/themes/twentyfourteen/inc/customizer.php
19 19 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 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 ) ) { 26 24 $wp_customize->selective_refresh->add_partial( 'blogname', array( -
src/wp-content/themes/twentyfourteen/js/functions.js
95 95 */ 96 96 if ( _window.width() > 781 ) { 97 97 var mastheadHeight = $( '#masthead' ).height(), 98 mastheadOffset;98 toolbarOffset, mastheadOffset; 99 99 100 100 if ( mastheadHeight > 48 ) { 101 101 body.removeClass( 'masthead-fixed' ); 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() { 109 109 if ( _window.scrollTop() > mastheadOffset && mastheadHeight < 49 ) { … … 112 112 body.removeClass( 'masthead-fixed' ); 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 } 130 117 -
src/wp-content/themes/twentyfourteen/style.css
88 88 video { 89 89 display: inline-block; 90 90 max-width: 100%; 91 height: auto;92 91 } 93 92 94 93 html { … … 609 608 max-width: 100%; 610 609 } 611 610 612 #wp-custom-header iframe,613 #wp-custom-header video {614 margin-bottom: -8px;615 }616 617 611 p > embed, 618 612 p > iframe, 619 613 p > object,