Changeset 36652 for trunk/src/wp-includes/post.php
- Timestamp:
- 02/23/2016 10:49:17 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r36607 r36652 1640 1640 1641 1641 /** 1642 * Get a list of post type names that support a specific feature. 1643 * 1644 * @since 4.5.0 1645 * 1646 * @global array $_wp_post_type_features 1647 * 1648 * @param array|string $args Single feature or an array of features the post types should support. 1649 * @param string $operator Optional. The logical operation to perform. 'or' means 1650 * only one element from the array needs to match; 'and' 1651 * means all elements must match; 'not' means no elements may 1652 * match. Default 'and'. 1653 * @return array A list of post type names. 1654 */ 1655 function get_post_types_by_support( $args, $operator = 'and' ) { 1656 global $_wp_post_type_features; 1657 1658 $features = array_fill_keys( (array) $args, true ); 1659 1660 return array_keys( wp_filter_object_list( $_wp_post_type_features, $features, $operator ) ); 1661 } 1662 1663 /** 1642 1664 * Update the post type for the post ID. 1643 1665 *
Note: See TracChangeset
for help on using the changeset viewer.