mirror of
https://github.com/KevinMidboe/rohnenedre.git
synced 2026-02-13 04:49:18 +00:00
Initial commit. State 04.2021.
This commit is contained in:
27
wp-content/themes/Divi/epanel/post_thumbnails_divi.php
Normal file
27
wp-content/themes/Divi/epanel/post_thumbnails_divi.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
|
||||
global $et_theme_image_sizes;
|
||||
|
||||
$et_theme_image_sizes = array(
|
||||
'400x250' => 'et-pb-post-main-image',
|
||||
'1080x675' => 'et-pb-post-main-image-fullwidth',
|
||||
'400x284' => 'et-pb-portfolio-image',
|
||||
'1080x9999' => 'et-pb-portfolio-image-single',
|
||||
);
|
||||
|
||||
$et_theme_image_sizes = apply_filters( 'et_theme_image_sizes', $et_theme_image_sizes );
|
||||
$crop = apply_filters( 'et_post_thumbnails_crop', true );
|
||||
|
||||
if ( is_array( $et_theme_image_sizes ) ){
|
||||
foreach ( $et_theme_image_sizes as $image_size_dimensions => $image_size_name ){
|
||||
$dimensions = explode( 'x', $image_size_dimensions );
|
||||
|
||||
if ( in_array( $image_size_name, array( 'et-pb-portfolio-image-single' ) ) )
|
||||
$crop = false;
|
||||
|
||||
add_image_size( $image_size_name, $dimensions[0], $dimensions[1], $crop );
|
||||
|
||||
$crop = apply_filters( 'et_post_thumbnails_crop', true );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user