Ticket #26697: 26697.diff
| File 26697.diff, 1.5 KB (added by , 13 years ago) |
|---|
-
wp-includes/theme.php
(this hunk was shorter than expected) 1359 1359 } 1360 1360 1361 1361 /** 1362 * Updates gallerie attributes to use HTML5 tags. 1363 * 1364 * @since 3.9.0 1365 * 1366 * @access private 1367 * @param array $atts Gallery shortcode attributes. 1368 * @return array 1369 */ 1370 function _html5_gallery_tags( $atts ) { 1371 return wp_parse_args( array( 1372 'itemtag' => 'figure', 1373 'icontag' => 'div', 1374 'captiontag' => 'figcaption', 1375 ), $atts ); 1376 } 1377 1378 /** 1362 1379 * Allows a theme to register its support of a certain feature 1363 1380 * 1364 1381 * Must be called in the theme's functions.php file to work. … … 1392 1411 } 1393 1412 1394 1413 // Calling 'html5' again merges, rather than overwrites. 1395 if ( isset( $_wp_theme_features['html5'] ) ) 1414 if ( isset( $_wp_theme_features['html5'] ) ) { 1396 1415 $args[0] = array_merge( $_wp_theme_features['html5'][0], $args[0] ); 1416 } 1417 if ( in_array( 'gallery', $args[0] ) ) { 1418 add_filter( 'shortcode_atts_gallery', '_html5_gallery_tags' ); 1419 } 1397 1420 break; 1398 1421 1399 1422 case 'custom-header-uploads' : … … 1643 1666 remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) ); 1644 1667 unset( $GLOBALS['custom_background'] ); 1645 1668 break; 1669 1670 case 'html5' : 1671 if ( did_action( 'wp_loaded' ) ) { 1672 remove_filter( 'shortcode_atts_gallery', '_html5_gallery_tags' ); 1673 } 1674 break; 1646 1675 } 1647 1676 1648 1677 unset( $_wp_theme_features[ $feature ] );
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)