这就是我最终使用的,这是对Rarst答案的修改版本
public function addFeaturedImageSupport()
{
$supportedTypes = get_theme_support( \'post-thumbnails\' );
if( $supportedTypes === false )
add_theme_support( \'post-thumbnails\', array( self::POST_TYPE ) );
elseif( is_array( $supportedTypes ) )
{
$supportedTypes[0][] = self::POST_TYPE;
add_theme_support( \'post-thumbnails\', $supportedTypes[0] );
}
}
add_action( \'after_setup_theme\', array( $this, \'addFeaturedImageSupport\' ), 11 );