WordPress.org

Make WordPress Core

Ticket #14077: 14077.diff

File 14077.diff, 971 bytes (added by Utkarsh, 5 years ago)
  • wp-includes/post.php

     
    10081008 * 
    10091009 * @since 3.0.0 
    10101010 * @param string $post_type The post type for which to remove the feature 
    1011  * @param string $feature The feature being removed 
     1011 * @param string|array $feature The feature being removed, can be an array of feature strings or a single string 
    10121012 */ 
    10131013function remove_post_type_support( $post_type, $feature ) { 
    10141014        global $_wp_post_type_features; 
    10151015 
    10161016        if ( !isset($_wp_post_type_features[$post_type]) ) 
    10171017                return; 
     1018                 
     1019        $features = (array) $feature; 
    10181020 
    1019         if ( isset($_wp_post_type_features[$post_type][$feature]) ) 
    1020                 unset($_wp_post_type_features[$post_type][$feature]); 
     1021        foreach ($features as $feature) { 
     1022                if ( isset($_wp_post_type_features[$post_type][$feature]) ) 
     1023                        unset($_wp_post_type_features[$post_type][$feature]); 
     1024        } 
    10211025} 
    10221026 
    10231027/**