Changeset 45625
- Timestamp:
- 07/12/2019 12:01:19 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r45602 r45625 1780 1780 * @param mixed ...$args Optional extra arguments to pass along with certain features. 1781 1781 */ 1782 function add_post_type_support( $post_type, $feature ) {1782 function add_post_type_support( $post_type, $feature, ...$args ) { 1783 1783 global $_wp_post_type_features; 1784 1784 1785 1785 $features = (array) $feature; 1786 1786 foreach ( $features as $feature ) { 1787 if ( func_num_args() == 2 ) { 1787 if ( $args ) { 1788 $_wp_post_type_features[ $post_type ][ $feature ] = $args; 1789 } else { 1788 1790 $_wp_post_type_features[ $post_type ][ $feature ] = true; 1789 } else {1790 $_wp_post_type_features[ $post_type ][ $feature ] = array_slice( func_get_args(), 2 );1791 1791 } 1792 1792 }
Note: See TracChangeset
for help on using the changeset viewer.