WordPress.org

Make WordPress Core

Ticket #14104: post.diff

File post.diff, 775 bytes (added by dragonflyeye, 5 years ago)

Corrected post.php file with array support.

  • trunk/wp-includes/post.php

     
    10121012 */ 
    10131013function remove_post_type_support( $post_type, $feature ) { 
    10141014        global $_wp_post_type_features; 
     1015        $features = (array) $feature; 
     1016        foreach($features as $feature) { 
     1017                if ( !isset($_wp_post_type_features[$post_type]) ) 
     1018                        return; 
    10151019 
    1016         if ( !isset($_wp_post_type_features[$post_type]) ) 
    1017                 return; 
    1018  
    1019         if ( isset($_wp_post_type_features[$post_type][$feature]) ) 
    1020                 unset($_wp_post_type_features[$post_type][$feature]); 
     1020                if ( isset($_wp_post_type_features[$post_type][$feature]) ) 
     1021                        unset($_wp_post_type_features[$post_type][$feature]); 
     1022        } 
    10211023} 
    10221024 
    10231025/**