WordPress.org

Make WordPress Core

Ticket #21527: 21527.2.diff

File 21527.2.diff, 1.1 KB (added by SergeyBiryukov, 2 years ago)
  • wp-includes/post.php

     
    15291529function remove_post_type_support( $post_type, $feature ) { 
    15301530        global $_wp_post_type_features; 
    15311531 
    1532         if ( !isset($_wp_post_type_features[$post_type]) ) 
     1532        if ( ! isset( $_wp_post_type_features[$post_type] ) ) 
    15331533                return; 
    15341534 
    1535         if ( isset($_wp_post_type_features[$post_type][$feature]) ) 
    1536                 unset($_wp_post_type_features[$post_type][$feature]); 
     1535        unset( $_wp_post_type_features[$post_type][$feature] ); 
    15371536} 
    15381537 
    15391538/** 
     
    15651564function post_type_supports( $post_type, $feature ) { 
    15661565        global $_wp_post_type_features; 
    15671566 
    1568         if ( !isset( $_wp_post_type_features[$post_type][$feature] ) ) 
    1569                 return false; 
    1570  
    1571         // If no args passed then no extra checks need be performed 
    1572         if ( func_num_args() <= 2 ) 
    1573                 return true; 
    1574  
    1575         // @todo Allow pluggable arg checking 
    1576         //$args = array_slice( func_get_args(), 2 ); 
    1577  
    1578         return true; 
     1567        return ( isset( $_wp_post_type_features[$post_type][$feature] ) ); 
    15791568} 
    15801569 
    15811570/**