Advertisement
Guest User

Untitled

a guest
May 22nd, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. if( ! function_exists( 'videotube_pull_full_size_post_thumbnail' ) ){
  2.     /**
  3.      * Pull full thumbnail size of the video post.
  4.      * @param string $size
  5.      * @return string
  6.      */
  7.     function videotube_pull_full_size_post_thumbnail( $size ) {
  8.         global $post;
  9.         if( get_post_type( $post ) == 'video' ){
  10.             $size = 'full'; // or large
  11.         }
  12.         return $size;
  13.     }
  14.     add_filter( 'post_thumbnail_size' , 'videotube_pull_full_size_post_thumbnail', 100, 1 );
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement