Add featured image support if not supported by theme already

This commit is contained in:
Brian Miyaji
2014-10-29 18:44:06 +11:00
parent acf95f7952
commit d64af09856

View File

@@ -296,7 +296,9 @@ final class SportsPress {
* Ensure theme and server variable compatibility and setup image sizes.
*/
public function setup_environment() {
add_theme_support( 'post-thumbnails', sp_post_types() );
if ( ! current_theme_supports( 'post-thumbnails' ) ) {
add_theme_support( 'post-thumbnails' );
}
// Add image sizes
add_image_size( 'sportspress-fit-medium', 300, 300, false );