- Timestamp:
- 02/02/2022 12:59:54 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/trac.wordpress.org/templates/update-headers.php
r11465 r11499 1 1 <?php 2 3 // Avoid PHP Warnings from 'unexpected' tag attributes. 4 libxml_use_internal_errors( true ); 2 5 3 6 function domdocument_from_url( $url ) { … … 79 82 $html_node->appendChild( $wporg_head->importNode( $node, true ) ); 80 83 } 84 85 // Swap out the shortcut icon for a Trac one. #6072 86 $icon_url = 'https://s.w.org/style/trac/common/trac.ico'; 87 foreach ( ( new DOMXPath( $wporg_head ) )->query( '//link[@rel="icon"]' ) as $icon ) { 88 $hash = md5( file_get_contents( $icon_url ) ); 89 $icon->setAttribute( 'href', $icon_url . '?v=' . $hash ); 90 } 91 81 92 save_domdocument( __DIR__ . '/wporg-head.html', $wporg_head ); 82 93
Note: See TracChangeset
for help on using the changeset viewer.