Actually, the proposed code DOES cause problems. If you have other custom post types and have post-thumbnails globally enabled, then the code STOPS post-thumbnails from working on all post types EXCEPT post, page, and slide. The fix is to just remove the second conditional. The originally suggested code:
PHP Code:
function add_slide() {
global $_wp_theme_features;
if( !isset( $_wp_theme_features['post-thumbnails'] ) )
$_wp_theme_features['post-thumbnails'] = array( array( 'slide' ) );
elseif ( true === $_wp_theme_features['post-thumbnails'] )
$_wp_theme_features['post-thumbnails'] = array( array( 'post','page', 'slide' ) );
elseif ( is_array( $_wp_theme_features['post-thumbnails'] ) )
$_wp_theme_features['post-thumbnails'][0][] = 'slide';
}
My suggestion:
PHP Code:
function add_slide() {
global $_wp_theme_features;
if( !isset( $_wp_theme_features['post-thumbnails'] ) )
$_wp_theme_features['post-thumbnails'] = array( array( 'slide' ) );
elseif ( is_array( $_wp_theme_features['post-thumbnails'] ) )
$_wp_theme_features['post-thumbnails'][0][] = 'slide';
}
Basically if post-thumbnails are already globally enabled, there's no reason to mess with it at all.