Make WordPress Core

Ticket #21224: 21224.diff

File 21224.diff, 1.0 KB (added by DrewAPicture, 12 years ago)
  • wp-includes/post.php

     
    13261326 *
    13271327 * @since 3.0.0
    13281328 * @param string $post_type The post type for which to remove the feature
    1329  * @param string $feature The feature being removed
     1329 * @param string|array $feature the feature being removed, can be an array of feature strings or a single string
    13301330 */
    13311331function remove_post_type_support( $post_type, $feature ) {
    13321332        global $_wp_post_type_features;
    13331333
    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        }
    13391342}
    13401343
    13411344/**