mirror of
https://github.com/KevinMidboe/rohnenedre.git
synced 2026-01-08 10:25:47 +00:00
27 lines
886 B
PHP
27 lines
886 B
PHP
<?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 );
|
|
}
|
|
} |