From 790caa8ae2db9382b4d880df1a7b95d201611234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Thu, 31 Mar 2016 09:44:35 +0200 Subject: [PATCH] Load prettyPhoto only when it is needed in e_shortcode.php. --- e107_plugins/gallery/e_shortcode.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/e107_plugins/gallery/e_shortcode.php b/e107_plugins/gallery/e_shortcode.php index c15d2abf3..9f66df6c2 100644 --- a/e107_plugins/gallery/e_shortcode.php +++ b/e107_plugins/gallery/e_shortcode.php @@ -38,6 +38,10 @@ class gallery_shortcodes extends e_shortcode function sc_gallery_caption($parm = '') { + e107_require_once(e_PLUGIN . 'gallery/includes/gallery_load.php'); + // Load prettyPhoto settings and files. + gallery_load_prettyphoto(); + $plugPrefs = e107::getPlugConfig('gallery')->getPref(); $hook = varset($plugPrefs['pp_hook'], 'data-gal'); $tp = e107::getParser(); @@ -78,6 +82,10 @@ class gallery_shortcodes extends e_shortcode */ function sc_gallery_thumb($parm = '') { + e107_require_once(e_PLUGIN . 'gallery/includes/gallery_load.php'); + // Load prettyPhoto settings and files. + gallery_load_prettyphoto(); + $plugPrefs = e107::getPlugConfig('gallery')->getPref(); $hook = varset($plugPrefs['pp_hook'], 'data-gal');