Changeset 36704
- Timestamp:
- 02/25/2016 04:55:01 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r36652 r36704 1640 1640 1641 1641 /** 1642 * Geta list of post type names that support a specific feature.1642 * Retrieves a list of post type names that support a specific feature. 1643 1643 * 1644 1644 * @since 4.5.0 1645 1645 * 1646 * @global array $_wp_post_type_features 1647 * 1648 * @param array|string $ argsSingle feature or an array of features the post types should support.1646 * @global array $_wp_post_type_features Post type features 1647 * 1648 * @param array|string $feature Single feature or an array of features the post types should support. 1649 1649 * @param string $operator Optional. The logical operation to perform. 'or' means 1650 1650 * only one element from the array needs to match; 'and' … … 1653 1653 * @return array A list of post type names. 1654 1654 */ 1655 function get_post_types_by_support( $ args, $operator = 'and' ) {1655 function get_post_types_by_support( $feature, $operator = 'and' ) { 1656 1656 global $_wp_post_type_features; 1657 1657 1658 $features = array_fill_keys( (array) $ args, true );1658 $features = array_fill_keys( (array) $feature, true ); 1659 1659 1660 1660 return array_keys( wp_filter_object_list( $_wp_post_type_features, $features, $operator ) );
Note: See TracChangeset
for help on using the changeset viewer.