WordPress.org

Make WordPress Core

Ticket #14077: 14077.3.diff

File 14077.3.diff, 1.0 KB (added by jeremyfelt, 22 months ago)

Refreshed patch

  • 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 $features Feature being removed. Can be an array of feature strings or a single string. 
    13301330 */ 
    1331 function remove_post_type_support( $post_type, $feature ) { 
     1331function remove_post_type_support( $post_type, $features ) { 
    13321332        global $_wp_post_type_features; 
    13331333 
    1334         if ( !isset($_wp_post_type_features[$post_type]) ) 
     1334        if ( ! isset( $_wp_post_type_features[ $post_type ] ) ) 
    13351335                return; 
    13361336 
    1337         if ( isset($_wp_post_type_features[$post_type][$feature]) ) 
    1338                 unset($_wp_post_type_features[$post_type][$feature]); 
     1337        foreach( (array) $features as $feature ) { 
     1338                if ( isset( $_wp_post_type_features[ $post_type ][ $feature ] ) ) 
     1339                        unset( $_wp_post_type_features[ $post_type ][ $feature ] ); 
     1340        } 
    13391341} 
    13401342 
    13411343/**