Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi
File: post_thumbnails_divi.php
<?php
[0] Fix | Delete
add_theme_support( 'post-thumbnails' );
[1] Fix | Delete
[2] Fix | Delete
global $et_theme_image_sizes;
[3] Fix | Delete
[4] Fix | Delete
$et_theme_image_sizes = array(
[5] Fix | Delete
'400x250' => 'et-pb-post-main-image',
[6] Fix | Delete
'1080x675' => 'et-pb-post-main-image-fullwidth',
[7] Fix | Delete
'400x284' => 'et-pb-portfolio-image',
[8] Fix | Delete
'510x382' => 'et-pb-portfolio-module-image',
[9] Fix | Delete
'1080x9999' => 'et-pb-portfolio-image-single',
[10] Fix | Delete
'400x516' => 'et-pb-gallery-module-image-portrait',
[11] Fix | Delete
'2880x1800' => 'et-pb-post-main-image-fullwidth-large',
[12] Fix | Delete
);
[13] Fix | Delete
[14] Fix | Delete
$et_theme_image_sizes = apply_filters( 'et_theme_image_sizes', $et_theme_image_sizes );
[15] Fix | Delete
$crop = apply_filters( 'et_post_thumbnails_crop', true );
[16] Fix | Delete
[17] Fix | Delete
if ( is_array( $et_theme_image_sizes ) ){
[18] Fix | Delete
foreach ( $et_theme_image_sizes as $image_size_dimensions => $image_size_name ){
[19] Fix | Delete
$dimensions = explode( 'x', $image_size_dimensions );
[20] Fix | Delete
[21] Fix | Delete
if ( in_array( $image_size_name, array( 'et-pb-portfolio-image-single' ) ) )
[22] Fix | Delete
$crop = false;
[23] Fix | Delete
[24] Fix | Delete
add_image_size( $image_size_name, $dimensions[0], $dimensions[1], $crop );
[25] Fix | Delete
[26] Fix | Delete
$crop = apply_filters( 'et_post_thumbnails_crop', true );
[27] Fix | Delete
}
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
if ( function_exists( 'et_screen_sizes' ) && function_exists( 'et_is_responsive_images_enabled' ) && et_is_responsive_images_enabled() ) {
[31] Fix | Delete
// Register responsive image sizes.
[32] Fix | Delete
$et_screen_sizes = et_screen_sizes();
[33] Fix | Delete
if ( $et_screen_sizes && is_array( $et_screen_sizes ) ) {
[34] Fix | Delete
foreach ( $et_screen_sizes as $breakpoint => $width ) {
[35] Fix | Delete
$height = round( ( $width * ( 56.25/100 ) ) ); // 16:9 aspect ratio.
[36] Fix | Delete
add_image_size( "et-pb-image--responsive--{$breakpoint}", $width, $height, $crop );
[37] Fix | Delete
}
[38] Fix | Delete
}
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function