Changeset 13902
- Timestamp:
- 03/31/2010 09:06:11 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r13877 r13902 1532 1532 * Allows a theme to register its support of a certain feature 1533 1533 * 1534 * Must be called in the themes functions.php file to work. 1534 * Must be called in the theme's functions.php file to work. 1535 * If attached to a hook, it must be after_setup_theme. 1536 * The init hook may be too late for some features. 1535 1537 * 1536 1538 * @since 2.9.0 … … 1549 1551 * Allows a theme to de-register its support of a certain feature 1550 1552 * 1551 * Must be called in the themes functions.php file to work. 1553 * Should be called in the theme's functions.php file. Generally would 1554 * be used for child themes to override support from the parent theme. 1552 1555 * 1553 1556 * @since 3.0.0 1557 * @see add_theme_support() 1554 1558 * @param string $feature the feature being added 1559 * @return bool Whether feature was removed. 1555 1560 */ 1556 1561 function remove_theme_support( $feature ) { 1562 // Blacklist: for internal registrations not used directly by themes. 1563 if ( in_array( $feature, array( 'custom-background', 'custom-header', 'editor-style', 'widgets' ) ) ) 1564 return false; 1565 1557 1566 global $_wp_theme_features; 1558 1567 1559 unset($_wp_theme_features[$feature]); 1568 if ( ! isset( $_wp_theme_features[$feature] ) ) 1569 return false; 1570 unset( $_wp_theme_features[$feature] ); 1571 return true; 1560 1572 } 1561 1573
Note: See TracChangeset
for help on using the changeset viewer.