ID , 'tempo-full' ), // 1, width: 1080px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-classic' ), // 2, width: 991px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-991' ), // 3, width: 691px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-tablet' ), // 4, width: 650px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-grid' ), // 5, width: 480px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-480' ), // 6, width: 360px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-small' ) ); if( $cols == 1 ){ if( $tempo_layout -> layout !== 'full' ){ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } else{ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } } // 2 columns else if( $cols == 2 ){ // content with sidebar if( $tempo_layout -> layout !== 'full' ){ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } // full width content else{ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } } // 3 columns else{ // content with sidebar if( $tempo_layout -> layout !== 'full' ){ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } // full width content else{ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } } return $picture; } add_filter( 'tempo_article_picture', 'sarmys_article_picture', 10, 4 ); // single post or page picture function sarmys_single_picture( $picture, $post, $media ) { global $tempo_layout; $thumbnail = get_post( get_post_thumbnail_id( $post ) ); $media = array( // 0, width: 1330px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-full' ), // 1, width: 1080px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-classic' ), // 2, width: 991px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-991' ), // 3, width: 691px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-tablet' ), // 4, width: 650px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-grid' ), // 5, width: 480px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-480' ), // 6, width: 360px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-small' ) ); if( $tempo_layout -> layout !== 'full' ){ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } else{ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } return $picture; } add_filter( 'tempo_single_picture', 'sarmys_single_picture', 10, 3 ); // single post or page picture function sarmys_portfolio_picture( $picture, $post, $cols, $media ) { global $tempo_layout; $thumbnail = get_post( get_post_thumbnail_id( $post ) ); $media = array( // 0, width: 691px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-portfolio-tablet' ), // 1, width: 650px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-portfolio' ), // 2, width: 480px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-portfolio-480' ) ); // 2 columns if( $cols == 2 ){ // content with sidebar if( $tempo_layout -> layout !== 'full' ){ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } // full width content else{ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } } // 3 columns else{ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $post ) ) . ''; $picture .= ''; } return $picture; } add_filter( 'tempo_portfolio_picture', 'sarmys_portfolio_picture', 10, 4 ); // gallery picture function sarmys_gallery_picture( $picture, $thumbnail, $cols, $media ) { global $tempo_layout; $media = array( // 0, width: 1330px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-full' ), // 1, width: 1080px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-classic' ), // 2, width: 991px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-991' ), // 3, width: 691px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-tablet' ), // 4, width: 650px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-grid' ), // 5, width: 480px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-480' ), // 6, width: 360px wp_get_attachment_image_src( $thumbnail -> ID , 'tempo-small' ) ); if( $cols == 1 ){ if( $tempo_layout -> layout !== 'full' ){ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $thumbnail ) ) . ''; $picture .= ''; } else{ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $thumbnail ) ) . ''; $picture .= ''; } } else if( $cols == 2 ){ if( $tempo_layout -> layout !== 'full' ){ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $thumbnail ) ) . ''; $picture .= ''; } else{ $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $thumbnail ) ) . ''; $picture .= ''; } } else { $picture = ''; $picture .= ''; $picture .= ''; $picture .= ''; $picture .= '' . esc_attr( get_the_title( $thumbnail ) ) . ''; $picture .= ''; } return $picture; } add_filter( 'tempo_gallery_picture', 'sarmys_gallery_picture', 10, 4 ); ?>