WordPress.org

Make WordPress Core

Changeset 23722


Ignore:
Timestamp:
03/15/13 18:28:33 (2 years ago)
Author:
SergeyBiryukov
Message:

Remove redundant code from post_type_supports() and remove_post_type_support(). props obenland, bilalcoder. fixes #21527.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r23635 r23722  
    15301530    global $_wp_post_type_features; 
    15311531 
    1532     if ( !isset($_wp_post_type_features[$post_type]) ) 
    1533         return; 
    1534  
    1535     if ( isset($_wp_post_type_features[$post_type][$feature]) ) 
    1536         unset($_wp_post_type_features[$post_type][$feature]); 
     1532    if ( isset( $_wp_post_type_features[$post_type][$feature] ) ) 
     1533        unset( $_wp_post_type_features[$post_type][$feature] ); 
    15371534} 
    15381535 
     
    15661563    global $_wp_post_type_features; 
    15671564 
    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; 
     1565    return ( isset( $_wp_post_type_features[$post_type][$feature] ) ); 
    15791566} 
    15801567 
Note: See TracChangeset for help on using the changeset viewer.