_remove_theme_support [ WordPress Function ]
_remove_theme_support ( $feature )
| Access: |
|
| Defined at: |
|
Soorgelijke functies: remove_theme_support, get_theme_support, remove_post_type_support, remove_theme_mod, remove_theme_mods
Do not use. Removes theme support internally, ignorant of the blacklist.
Source
<?php
function _remove_theme_support( $feature ) {
global $_wp_theme_features;
switch ( $feature ) {
case 'custom-header-uploads' :
if ( ! isset( $_wp_theme_features['custom-header'] ) )
return false;
add_theme_support( 'custom-header', array( 'uploads' => false ) );
return; // Do not continue - custom-header-uploads no longer exists.
}
if ( ! isset( $_wp_theme_features[ $feature ] ) )
return false;
switch ( $feature ) {
case 'custom-header' :
$support = get_theme_support( 'custom-header' );
if ( $support[0]['wp-head-callback'] )
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) );
unset( $GLOBALS['custom_image_header'] );
break;
case 'custom-background' :
$support = get_theme_support( 'custom-background' );
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
unset( $GLOBALS['custom_background'] );
break;
}
unset( $_wp_theme_features[ $feature ] );
return true;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/remove theme support « WordPress Codex
Function Reference/remove theme support. This page is marked as incomplete. You can help Codex by expanding it. Contents. 1 Description; 2 Usage ...
codex.wordpress.org - WordPress › Support » Remove Theme Support not Working?
I have a "twenty ten" child theme and I want to disable the Custom Header and Custom Background Support, I added this code to my functions.php but it is not ...
wordpress.org - #14899 (Remove Theme Support not Working) – WordPress Trac
I have a "twenty ten" child theme and I want to disable the Custom Header and Custom Background Support, I added this code to my functions.php but it is not ...
core.trac.wordpress.org - Remove theme support for something « Theme Hybrid Support
You are here: Home / Forums / Themes/Prototype / Remove theme support for something. Remove theme support for something. Members-only Content ...
themehybrid.com