Advertisement
phpface

Untitled

Oct 6th, 2017
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. if( ! function_exists( 'videotube_filter_video_thumbnail_size' ) ){
  2.     /**
  3.      *
  4.      * Filter the thumbnail image size
  5.      *
  6.      * @param string $size
  7.      * @return string
  8.      */
  9.     function videotube_filter_video_thumbnail_size( $size ) {
  10.         $columns =  mars_get_columns();
  11.         switch ( $columns ) {
  12.             case '3':
  13.             case '4':
  14.             case '6':
  15.                 $size= 'video-featured';
  16.             break;
  17.         }
  18.         return $size;
  19.     }  
  20.     add_filter( 'video_thumbnail_size' , 'videotube_filter_video_thumbnail_size', 100, 1 );
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement