ID)){ $classes[] = 'post-has-thumbnail'; } return $classes; } } //Add portfolio thumbnail size to WordPress admin add_filter('image_size_names_choose', 'cpotheme_add_thumbnail'); if(!function_exists('cpotheme_add_thumbnail')){ function cpotheme_add_thumbnail($sizes){ return array_merge($sizes, array('portfolio' => __('Portfolio Size', 'allegiant'))); } } //Add a wrapper to embeds so they become responsive add_filter('embed_oembed_html', 'cpotheme_embed_wrapper', 10, 3); function cpotheme_embed_wrapper($html){ if(strstr($html, 'youtube.com') != false || strstr($html, 'vimeo.com') != false || strstr($html, 'wordpress.tv') != false){ return '
'.$html.'
'; }else{ return $html; } }