Changeset 25236
- Timestamp:
- 09/04/2013 05:46:08 PM (11 years ago)
- Location:
- branches/3.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.6
- Property svn:mergeinfo changed
/trunk/src merged: 25193,25235
- Property svn:mergeinfo changed
-
branches/3.6/wp-includes/theme.php
r24386 r25236 1265 1265 break; 1266 1266 1267 case 'html5' : 1268 // You can't just pass 'html5', you need to pass an array of types. 1269 if ( empty( $args[0] ) ) { 1270 $args = array( 0 => array( 'comment-list', 'comment-form', 'search-form' ) ); 1271 } elseif ( ! is_array( $args[0] ) ) { 1272 _doing_it_wrong( "add_theme_support( 'html5' )", 'You need to pass an array of types.', '3.6.1' ); 1273 return false; 1274 } 1275 1276 // Calling 'html5' again merges, rather than overwrites. 1277 if ( isset( $_wp_theme_features['html5'] ) ) 1278 $args[0] = array_merge( $_wp_theme_features['html5'][0], $args[0] ); 1279 break; 1280 1267 1281 case 'custom-header-uploads' : 1268 1282 return add_theme_support( 'custom-header', array( 'uploads' => true ) ); … … 1548 1562 break; 1549 1563 1564 case 'html5': 1550 1565 case 'post-formats': 1551 1566 // specific post formats can be registered by passing an array of types to 1552 1567 // add_theme_support() 1553 $post_format = $args[0]; 1554 return in_array( $post_format, $_wp_theme_features[$feature][0] ); 1568 1569 // Specific areas of HTML5 support *must* be passed via an array to add_theme_support() 1570 1571 $type = $args[0]; 1572 return in_array( $type, $_wp_theme_features[$feature][0] ); 1555 1573 break; 1556 1574
Note: See TracChangeset
for help on using the changeset viewer.