Ticket #21527: 21527.2.diff
File 21527.2.diff, 1.1 KB (added by , 8 years ago) |
---|
-
wp-includes/post.php
1529 1529 function remove_post_type_support( $post_type, $feature ) { 1530 1530 global $_wp_post_type_features; 1531 1531 1532 if ( ! isset($_wp_post_type_features[$post_type]) )1532 if ( ! isset( $_wp_post_type_features[$post_type] ) ) 1533 1533 return; 1534 1534 1535 if ( isset($_wp_post_type_features[$post_type][$feature]) ) 1536 unset($_wp_post_type_features[$post_type][$feature]); 1535 unset( $_wp_post_type_features[$post_type][$feature] ); 1537 1536 } 1538 1537 1539 1538 /** … … 1565 1564 function post_type_supports( $post_type, $feature ) { 1566 1565 global $_wp_post_type_features; 1567 1566 1568 if ( !isset( $_wp_post_type_features[$post_type][$feature] ) ) 1569 return false; 1570 1571 // If no args passed then no extra checks need be performed 1572 if ( func_num_args() <= 2 ) 1573 return true; 1574 1575 // @todo Allow pluggable arg checking 1576 //$args = array_slice( func_get_args(), 2 ); 1577 1578 return true; 1567 return ( isset( $_wp_post_type_features[$post_type][$feature] ) ); 1579 1568 } 1580 1569 1581 1570 /**