cptbc_addFeaturedImageSupport

The CPT Bootstrap Carousel cptbc addFeaturedImageSupport function.

Description

cptbc_addFeaturedImageSupport(); 

Usage

  1. if ( !function_exists( 'cptbc_addFeaturedImageSupport' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'cpt-bootstrap-carousel/cpt-bootstrap-carousel.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = cptbc_addFeaturedImageSupport(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/cpt-bootstrap-carousel.php  
  1. function cptbc_addFeaturedImageSupport() { 
  2. $supportedTypes = get_theme_support( 'post-thumbnails' ); 
  3. if( $supportedTypes === false ) { 
  4. add_theme_support( 'post-thumbnails', array( 'cptbc' ) );  
  5. add_image_size('featured_preview', 100, 55, true); 
  6. } elseif( is_array( $supportedTypes ) ) { 
  7. $supportedTypes[0][] = 'cptbc'; 
  8. add_theme_support( 'post-thumbnails', $supportedTypes[0] ); 
  9. add_image_size('featured_preview', 100, 55, true);