Ticket #21224: 21224.diff
File 21224.diff, 1.0 KB (added by , 11 years ago) |
---|
-
wp-includes/post.php
1326 1326 * 1327 1327 * @since 3.0.0 1328 1328 * @param string $post_type The post type for which to remove the feature 1329 * @param string $feature The feature being removed1329 * @param string|array $feature the feature being removed, can be an array of feature strings or a single string 1330 1330 */ 1331 1331 function remove_post_type_support( $post_type, $feature ) { 1332 1332 global $_wp_post_type_features; 1333 1333 1334 if ( !isset($_wp_post_type_features[$post_type]) ) 1335 return; 1336 1337 if ( isset($_wp_post_type_features[$post_type][$feature]) ) 1338 unset($_wp_post_type_features[$post_type][$feature]); 1334 $features = (array) $feature; 1335 foreach ( $features as $feature ) { 1336 if ( !isset($_wp_post_type_features[$post_type]) ) 1337 return; 1338 1339 if ( isset($_wp_post_type_features[$post_type][$feature]) ) 1340 unset($_wp_post_type_features[$post_type][$feature]); 1341 } 1339 1342 } 1340 1343 1341 1344 /**