Ticket #38678: 38678.1.patch
| File 38678.1.patch, 1.7 KB (added by , 10 years ago) |
|---|
-
src/wp-includes/js/wp-custom-header.js
61 61 } 62 62 63 63 function nativeHandler( settings ) { 64 var video = document.createElement( 'video' ); 64 var video = document.createElement( 'video' ), 65 button = document.createElement( 'button' ); 65 66 66 67 video.id = 'wp-custom-header-video'; 67 68 video.autoplay = 'autoplay'; … … 70 71 video.width = settings.width; 71 72 video.height = settings.height; 72 73 73 video.addEventListener( 'click', function() { 74 button.setAttribute( 'type', 'button' ); 75 button.setAttribute( 'id', 'wp-custom-header-video-button' ); 76 button.setAttribute( 'class', 'wp-custom-header-video-button' ); 77 button.setAttribute( 'aria-hidden', true ); 78 button.innerHTML = 'Pause'; 79 80 button.addEventListener( 'click', function() { 74 81 if ( video.paused ) { 82 button.innerHTML = 'Pause'; 75 83 video.play(); 76 84 } else { 85 button.innerHTML = 'Play'; 77 86 video.pause(); 78 87 } 79 88 }); … … 80 89 81 90 settings.container.innerHTML = ''; 82 91 settings.container.appendChild( video ); 92 settings.container.appendChild( button ); 83 93 video.src = settings.videoUrl; 84 94 } 85 95 -
src/wp-includes/theme.php
1422 1422 } 1423 1423 1424 1424 return sprintf( 1425 '<div id="wp-custom-header" class="wp-custom-header" >%s</div>',1425 '<div id="wp-custom-header" class="wp-custom-header" aria-hidden="true">%s</div>', 1426 1426 get_header_image_tag() 1427 1427 ); 1428 1428 }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)