diff --git src/wp-includes/post-functions.php src/wp-includes/post-functions.php
index 58961fe..cfda3fe 100644
|
|
function post_type_supports( $post_type, $feature ) { |
1544 | 1544 | return ( isset( $_wp_post_type_features[$post_type][$feature] ) ); |
1545 | 1545 | } |
1546 | 1546 | |
| 1547 | |
| 1548 | /** |
| 1549 | * Get a list of post type names that support a specific feature. |
| 1550 | * |
| 1551 | * @since 4.5.0 |
| 1552 | * |
| 1553 | * @param string $feature Feature the post types should support. |
| 1554 | * @return array Names of post types that support the given feature. |
| 1555 | */ |
| 1556 | function get_post_types_by_support( $feature ) { |
| 1557 | $post_types = array(); |
| 1558 | |
| 1559 | foreach ( get_post_types() as $post_type ) { |
| 1560 | if ( post_type_supports( $feature ) ) { |
| 1561 | $post_types[] = $post_type; |
| 1562 | } |
| 1563 | } |
| 1564 | |
| 1565 | return $post_types; |
| 1566 | } |
| 1567 | |
1547 | 1568 | /** |
1548 | 1569 | * Update the post type for the post ID. |
1549 | 1570 | * |