Server IP : 85.214.239.14 / Your IP : 18.224.57.86 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/cwd/var/www/wordpress/wp-content/themes/Divi/ |
Upload File : |
<?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', '510x382' => 'et-pb-portfolio-module-image', '1080x9999' => 'et-pb-portfolio-image-single', '400x516' => 'et-pb-gallery-module-image-portrait', '2880x1800' => 'et-pb-post-main-image-fullwidth-large', ); $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 ); } } if ( function_exists( 'et_screen_sizes' ) && function_exists( 'et_is_responsive_images_enabled' ) && et_is_responsive_images_enabled() ) { // Register responsive image sizes. $et_screen_sizes = et_screen_sizes(); if ( $et_screen_sizes && is_array( $et_screen_sizes ) ) { foreach ( $et_screen_sizes as $breakpoint => $width ) { $height = round( ( $width * ( 56.25/100 ) ) ); // 16:9 aspect ratio. add_image_size( "et-pb-image--responsive--{$breakpoint}", $width, $height, $crop ); } } }