Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. if( ! function_exists( 'videotube_filter_the_thumbnail_size' ) ){
  2.     /**
  3.      *
  4.      * Filter the thumbnail size
  5.      *
  6.      * @param string $size
  7.      * @return string
  8.      *
  9.      */
  10.     function videotube_filter_the_thumbnail_size( $size ) {
  11.        
  12.         global $post;
  13.        
  14.         if( get_post_type( $post ) == 'video' ){
  15.             return 'full';
  16.         }
  17.         return $size;
  18.        
  19.     }
  20.     add_filter( 'post_thumbnail_size' , 'videotube_filter_the_thumbnail_size', 10, 1 );
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement