1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

Load prettyPhoto only when it is needed in e_shortcode.php.

This commit is contained in:
Lóna Lore
2016-03-31 09:44:35 +02:00
parent cb14973bea
commit 790caa8ae2

View File

@@ -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');