Hello everyone. New to the forum and with very little knowledge about coding, I am trying to resolve a warning that appeared in a plugin that I use for my website. I had to restore the entire site from a backup after a Wordpress core update failed, and this error appeared afterwards. While I was at it, I updated the site’s php version to 8.0.11, so I’m not sure if that is the culprit.
On my website, I use a plugin called Circles Gallery to display images in more or less every post. I use the free version of the plugin, since the limited configuration options are more than enough for my needs. However, the plugin doesn’t seem to be updated or supported anymore, which of course could also be a factor in this warning popping up.
Anyhoo, if you go to any post where the gallery is used (e.g. Great Eastern – TGOL) you will see the following warning at the top:
Warning: Undefined array key “prettyphoto_theme” in /storage/content/77/168877/thegreatoceanliners.com/public_html/wp-content/plugins/circles-gallery/public/class-circles-gallery.php on line 137 Warning: Undefined array key “colorbox_theme” in /storage/content/77/168877/thegreatoceanliners.com/public_html/wp-content/plugins/circles-gallery/public/class-circles-gallery.php on line 138
The gallery itself works just as intended, though. After some searching, it seems that I can just edit the wp-config file in order to hide the warning, but I would prefer to eliminate the problem that causes the warnings in the first place. The only trouble is that I don’t know enough about PHP to understand or rectify the code.
The php file that the warning refers to can be accessed here, and more specifically the array looks like this:
extract(shortcode_atts(array(
‘gallery_width’ => $defaults[‘gallery_width’],
‘circle_width’ => $defaults[‘circle_width’],
‘circle_max_width’ => $defaults[‘circle_max_width’],
‘columns_no’ => $defaults[‘columns_no’],
‘columns_no_1024’ => $defaults[‘columns_no_1024’],
‘columns_no_768’ => $defaults[‘columns_no_768’],
‘columns_no_phone’ => $defaults[‘columns_no_phone’],
‘circle_background_color’=> $defaults[‘circle_background_color’],
‘hover_effect’ => $defaults[‘hover_effect’],
‘title_font_size’ => $defaults[‘title_font_size’],
‘title_color’ => $defaults[‘title_color’],
‘description_font_size’ => $defaults[‘description_font_size’],
‘description_color’ => $defaults[‘description_color’],
‘circle_border_size’ => $defaults[‘circle_border_size’],
‘circle_border_color’ => $defaults[‘circle_border_color’],
‘margin_bottom’ => $defaults[‘margin_bottom’],
‘text_position’ => $defaults[‘text_position’],
‘circle_icon’ => $defaults[‘circle_icon’],
‘circle_icon_color’ => $defaults[‘circle_icon_color’],
‘item_height’ => $defaults[‘item_height’],
‘custom_css’ => $defaults[‘custom_css’],
‘click_action’ => $defaults[‘click_action’],
‘prettyphoto_theme’ => $defaults[‘prettyphoto_theme’],
‘colorbox_theme’ => $defaults[‘colorbox_theme’],
‘ids’ => ‘’
), $atts));
Lines 137 and 138 are the ones about ‘prettyphoto_theme’ and ‘colorbox_theme’ respectively. These two variables are locked in the free version and can’t be changed (see attached screenshot), so my guess is that this is also a factor.
So, can anyone help? Is there some snippet of code that I can add to circumvent this warning? Again, the gallery itself works fine otherwise, so the warning doesn’t appear to be anything critical. Just annoying, and I would like to sort it out instead of just hiding it.
Thanks in advance for any feedback!