面白半分

ブログの内容は個人の感想、バイアス満載。異論しか出てこないようなことを書いてます。あと、文章を書く練習中。

Shortcodes Ultimate gallery, slider not working on Multisite

The su slider on my multisite had a problem, the height of the image loaded in the slider was not right as I had expected. After some analysis I found that su_image_resize() in inc/core/tools.php was not working correctly.

What I did was:
Change line290 from this

$file_path = str_replace( $blog_details->path . 'files/', '/wp-content/blogs.dir/' . $blog_id . '/files/', $file_path );

to this.

$file_path = str_replace( $blog_details->path, '/****/', $file_path );

insert your multisite directory in ****

This su_image_resize() function does resizing of the image files set in a shortcode.The line290 is setting a file path to the image to load in a shortcode, but the file path set in the line290 is not correct as it is. Need to be changed if we use the multisite mode.

So, in my case, by changing this path, the height of the image is set correctly as I set in the shortcode.

Check this thread on the support forum also.