| 1507 | | switch ( $feature ) { |
| 1508 | | case 'post-thumbnails': |
| 1509 | | // post-thumbnails can be registered for only certain content/post types by passing |
| 1510 | | // an array of types to add_theme_support(). If no array was passed, then |
| 1511 | | // any type is accepted |
| 1512 | | if ( true === $_wp_theme_features[$feature] ) // Registered for all types |
| 1513 | | return true; |
| 1514 | | $content_type = $args[0]; |
| 1515 | | return in_array( $content_type, $_wp_theme_features[$feature][0] ); |
| 1516 | | break; |
| | 1509 | switch ( $feature ) { |
| | 1510 | case 'post-thumbnails': |
| | 1511 | // post-thumbnails can be registered for only certain content/post types by passing |
| | 1512 | // an array of types to add_theme_support(). If no array was passed, then |
| | 1513 | // any type is accepted |
| | 1514 | if ( true === $_wp_theme_features[$feature] ) { |
| | 1515 | // Registered for all types |
| | 1516 | $retval = true; |
| | 1517 | break; |
| | 1518 | } |
| 1525 | | case 'custom-header': |
| 1526 | | case 'custom-background' : |
| 1527 | | // specific custom header and background capabilities can be registered by passing |
| 1528 | | // an array to add_theme_support() |
| 1529 | | $header_support = $args[0]; |
| 1530 | | return ( isset( $_wp_theme_features[$feature][0][$header_support] ) && $_wp_theme_features[$feature][0][$header_support] ); |
| 1531 | | break; |
| | 1523 | case 'post-formats': |
| | 1524 | // specific post formats can be registered by passing an array of types to |
| | 1525 | // add_theme_support() |
| | 1526 | $retval = in_array( $args[0], $_wp_theme_features[$feature][0] ); |
| | 1527 | break; |
| | 1528 | |
| | 1529 | case 'custom-header': |
| | 1530 | case 'custom-background' : |
| | 1531 | // specific custom header and background capabilities can be registered by passing |
| | 1532 | // an array to add_theme_support() |
| | 1533 | $retval = ! empty( $_wp_theme_features[$feature][0][$args[0]] ); |
| | 1534 | break; |
| | 1535 | } |