Gallery – Photo Gallery – Image Gallery - Version 1.3.1

Version Description

  • Changed lightbox script
Download this release

Release Info

Developer machothemes
Plugin Icon wp plugin Gallery – Photo Gallery – Image Gallery
Version 1.3.1
Comparing to
See all releases

Code changes from version 1.2.1 to 1.3.1

Modula.php CHANGED
@@ -5,7 +5,7 @@
5
* Description: Modula is one of the best & most creative WordPress gallery plugins. Use it to create a great grid or
6
* masonry image gallery.
7
* Author: Macho Themes
8
- * Version: 1.2.1
9
* Author URI: https://www.machothemes.com/
10
*/
11
@@ -21,8 +21,9 @@ if ( ! class_exists( "ModulaLite" ) ) {
21
class ModulaLite {
22
23
private $loadedData;
24
25
- private $version = "1.2.1";
26
27
private $defaultValues = array(
28
'width' => 100,
@@ -61,6 +62,8 @@ if ( ! class_exists( "ModulaLite" ) ) {
61
'hoverEffect' => 'pufrobo',
62
'hasResizedImages' => false,
63
'importedFrom' => '',
64
);
65
66
public function __construct() {
@@ -71,6 +74,9 @@ if ( ! class_exists( "ModulaLite" ) ) {
71
$this->define_hover_effects();
72
$this->ModulaDB = $this->create_db_conn();
73
74
add_filter( 'widget_text', 'do_shortcode' );
75
add_filter( 'mce_buttons', array( $this, 'editor_button' ) );
76
add_filter( 'mce_external_plugins', array( $this, 'register_editor_plugin' ) );
@@ -82,7 +88,8 @@ if ( ! class_exists( "ModulaLite" ) ) {
82
add_action( 'admin_menu', array( $this, 'add_gallery_admin_menu' ) );
83
84
add_shortcode( 'Modula', array( $this, 'gallery_shortcode_handler' ) );
85
-
86
add_action( 'wp_ajax_modula_save_gallery', array( $this, 'save_gallery' ) );
87
add_action( 'wp_ajax_modula_save_image', array( $this, 'save_image' ) );
88
add_action( 'wp_ajax_modula_add_image', array( $this, 'add_image' ) );
@@ -101,6 +108,350 @@ if ( ! class_exists( "ModulaLite" ) ) {
101
102
add_filter( 'plugin_row_meta', array( $this, 'register_links' ), 10, 2 );
103
add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
104
}
105
106
//Define textdomain
@@ -266,7 +617,7 @@ if ( ! class_exists( "ModulaLite" ) ) {
266
public function register_links( $links, $file ) {
267
$base = plugin_basename( __FILE__ );
268
if ( $file == $base ) {
269
- $links[] = '<a href="admin.php?page=modula-lite-admin" title="Modula Grid Gallery Dashboard">Dashboard</a>';
270
$links[] = '<a href="https://twitter.com/MachoThemez" title="@MachoThemez on Twitter">Twitter</a>';
271
$links[] = '<a href="https://www.facebook.com/machothemes" title="MachoThemes on Facebook">Facebook</a>';
272
}
@@ -420,15 +771,14 @@ if ( ! class_exists( "ModulaLite" ) ) {
420
wp_register_script( 'modula', plugins_url() . '/modula-best-grid-gallery/scripts/jquery.modula.js', array( 'jquery' ) );
421
wp_enqueue_script( 'modula' );
422
423
-
424
- wp_register_style( 'modula_stylesheet', plugins_url() . '/modula-best-grid-gallery/scripts/modula.css' );
425
wp_enqueue_style( 'modula_stylesheet' );
426
427
wp_register_style( 'effects_stylesheet', plugins_url() . '/modula-best-grid-gallery/scripts/effects.css', null, $this->version );
428
wp_enqueue_style( 'effects_stylesheet' );
429
430
- wp_register_script( 'lightbox2_script', plugins_url() . '/modula-best-grid-gallery/lightbox/lightbox2/js/script.js', array( 'jquery' ) );
431
- wp_register_style( 'lightbox2_stylesheet', plugins_url() . '/modula-best-grid-gallery/lightbox/lightbox2/css/style.css' );
432
}
433
434
//Admin Section - register scripts and styles
@@ -482,7 +832,7 @@ if ( ! class_exists( "ModulaLite" ) ) {
482
483
//Create Admin Menu
484
public function add_gallery_admin_menu() {
485
- $overview = add_menu_page( 'Manage Galleries', 'Modula', 'edit_posts', 'modula-lite-admin', array(
486
$this,
487
'add_overview',
488
), plugins_url() . '/modula-best-grid-gallery/admin/icon.png' );
@@ -502,7 +852,7 @@ if ( ! class_exists( "ModulaLite" ) ) {
502
503
if ( $imageUrl ) {
504
if ( strncmp( strtolower( $imageUrl ), strtolower( site_url() ), strlen( site_url() ) ) != 0 ) {
505
- $fix = add_submenu_page( 'modula-lite-admin', __( 'Modula >> Fix', 'Modula' ), '❗️ ' . __( 'Fix', 'Modula' ), 'edit_posts', 'modula-lite-gallery-fix', array(
506
$this,
507
'fix',
508
) );
@@ -513,15 +863,15 @@ if ( ! class_exists( "ModulaLite" ) ) {
513
add_option( 'Modula_skip_fix', true );
514
}
515
516
- $add_gallery = add_submenu_page( 'modula-lite-admin', __( 'Modula - Add Gallery', 'Modula' ), __( 'Add Gallery', 'Modula' ), 'edit_posts', 'modula-lite-add', array(
517
$this,
518
'add_gallery',
519
) );
520
- $edit_gallery = add_submenu_page( NULL, __( 'Modula - Edit Gallery', 'Modula' ), __( 'Edit Gallery', 'Modula' ), 'edit_posts', 'modula-lite-edit', array(
521
$this,
522
'edit_gallery',
523
) );
524
- $upgrade = add_submenu_page( 'modula-lite-admin', __( 'Modula - Upgrade to PRO', 'Modula' ), __( 'Upgrade to PRO', 'Modula' ), 'edit_posts', 'modula-lite-gallery-upgrade', array(
525
$this,
526
'upgrade',
527
) );
@@ -603,9 +953,9 @@ if ( ! class_exists( "ModulaLite" ) ) {
603
if ( check_admin_referer( 'Modula', 'Modula' ) ) {
604
$result = false;
605
// $type = $_POST['type'];
606
- $imageUrl = stripslashes( $_POST['img_url'] );
607
$imageCaption = stripslashes( $_POST['description'] );
608
- $title = $_POST['title'];
609
$target = $_POST['target'];
610
$link = isset( $_POST['link'] ) ? stripslashes( $_POST['link'] ) : null;
611
$imageId = intval( $_POST['img_id'] );
@@ -682,6 +1032,8 @@ if ( ! class_exists( "ModulaLite" ) ) {
682
$lightbox = $_POST['tg_lightbox'];
683
$wp_field_caption = $_POST['tg_wp_field_caption'];
684
$wp_field_title = $_POST['tg_wp_field_title'];
685
$captionColor = $_POST['tg_captionColor'];
686
$borderSize = intval( $_POST['tg_borderSize'] );
687
$loadedScale = intval( $_POST['tg_loadedScale'] );
@@ -710,6 +1062,8 @@ if ( ! class_exists( "ModulaLite" ) ) {
710
'hasResizedImages' => true,
711
'wp_field_caption' => $wp_field_caption,
712
'wp_field_title' => $wp_field_title,
713
'margin' => $margin,
714
'randomFactor' => $_POST['tg_randomFactor'],
715
'shuffle' => $shuffle,
@@ -812,337 +1166,30 @@ if ( ! class_exists( "ModulaLite" ) ) {
812
case "lightbox2":
813
wp_enqueue_style( 'lightbox2_stylesheet' );
814
wp_enqueue_script( 'lightbox2_script' );
815
break;
816
}
817
818
return $Modula->render();
819
} else {
820
- return "Gallery not found.";
821
}
822
}
823
824
- var $fields = array(
825
826
- "General" => array(
827
- "icon" => "mdi mdi-settings",
828
- "fields" => array(
829
- "name" => array(
830
- "name" => "Name",
831
- "type" => "text",
832
- "description" => "Name of the gallery, for internal use.",
833
- "excludeFrom" => array(),
834
- ),
835
- "description" => array(
836
- "name" => "Description",
837
- "type" => "text",
838
- "description" => "This description is for internal use.",
839
- "excludeFrom" => array(),
840
- ),
841
- "width" => array(
842
- "name" => "Width",
843
- "type" => "text",
844
- "description" => "Width of the gallery (i.e.: 100% or 500px)",
845
- "mu" => "px or %",
846
- "excludeFrom" => array(),
847
- ),
848
- "height" => array(
849
- "name" => "Height",
850
- "type" => "number",
851
- "description" => "Height of the gallery in pixels",
852
- "mu" => "px",
853
- "excludeFrom" => array(),
854
- ),
855
- "img_size" => array(
856
- "name" => "Minimum image size",
857
- "type" => "number",
858
- "description" => "Minimum width or height of the images",
859
- "mu" => "px or %",
860
- "excludeFrom" => array(),
861
- ),
862
- "margin" => array(
863
- "name" => "Margin",
864
- "type" => "number",
865
- "description" => "Margin between images",
866
- "mu" => "px",
867
- "excludeFrom" => array(),
868
- ),
869
- "randomFactor" => array(
870
- "name" => "Random factor",
871
- "type" => "ui-slider",
872
- "description" => "",
873
- "min" => 0,
874
- "max" => 100,
875
- "mu" => "%",
876
- "default" => 20,
877
- "excludeFrom" => array(),
878
- ),
879
- "filters" => array(
880
- "name" => "Filters",
881
- "type" => "PRO_FEATURE",
882
- "description" => "Add your own filters here. Each image can have one or more filters.",
883
- "excludeFrom" => array(),
884
- ),
885
- "filterClick" => array(
886
- "name" => "Reload Page on filter click",
887
- "type" => "PRO_FEATURE",
888
- "description" => "Turn this feature ON if you want to use filters with most lightboxes",
889
- "excludeFrom" => array(),
890
- ),
891
- "allFilterLabel" => array(
892
- "name" => "Text for 'All' filter",
893
- "type" => "PRO_FEATURE",
894
- "description" => "Write here the label for the 'All' filter",
895
- "default" => "All",
896
- "excludeFrom" => array(),
897
- ),
898
- "lightbox" => array(
899
- "name" => "Lightbox &amp; Links",
900
- "type" => "select",
901
- "description" => "Define here what happens when user click on the images.",
902
- "values" => array(
903
- "Link" => array( "|No link", "direct|Direct link to image", "|Attachment page" ),
904
- "Lightboxes" => array( "lightbox2|Lightbox" ),
905
- ),
906
- "disabled" => array(
907
- "Lightboxes with PRO license" => array(
908
- "magnific|Magnific popup",
909
- "prettyphoto|PrettyPhoto",
910
- "fancybox|FancyBox",
911
- "swipebox|SwipeBox",
912
- "lightbox2|Lightbox",
913
- ),
914
- ),
915
- "excludeFrom" => array(),
916
- ),
917
- "shuffle" => array(
918
- "name" => "Shuffle images",
919
- "type" => "toggle",
920
- "default" => "T",
921
- "description" => "Flag it if you want to shuffle the gallery at each page load",
922
- "excludeFrom" => array(),
923
- ),
924
- ),
925
- ),
926
- "Captions" => array(
927
- "icon" => "mdi mdi-comment-text-outline",
928
- "fields" => array(
929
- "captionColor" => array(
930
- "name" => "Caption color",
931
- "type" => "color",
932
- "description" => "Color of the caption.",
933
- "default" => "#ffffff",
934
- "excludeFrom" => array(),
935
- ),
936
- "wp_field_caption" => array(
937
- "name" => "WordPress caption field",
938
- "type" => "select",
939
- "description" => "WordPress field used for captions. <strong>This field is used ONLY when images are added to the gallery, </strong> however, if you want to ignore captions just set it to '<i>Don't use captions</i>'.",
940
- "values" => array(
941
- "Field" => array(
942
- "none|Don't use captions",
943
- "title|Title",
944
- "caption|Caption",
945
- "description|Description",
946
- ),
947
- ),
948
- "excludeFrom" => array( "shortcode" ),
949
- ),
950
- "wp_field_title" => array(
951
- "name" => "WordPress title field",
952
- "type" => "select",
953
- "description" => "WordPress field used for titles. <strong>This field is used ONLY when images are added to the gallery, </strong> however, if you want to ignore titles just set it to '<i>Don't use titles</i>'.",
954
- "values" => array(
955
- "Field" => array( "none|Don't use titles", "title|Title", "description|Description" ),
956
- ),
957
- "excludeFrom" => array( "shortcode" ),
958
- ),
959
- "captionFontSize" => array(
960
- "name" => "Caption Font Size",
961
- "type" => "number",
962
- "description" => "",
963
- "mu" => "px",
964
- "excludeFrom" => array(),
965
- ),
966
- "titleFontSize" => array(
967
- "name" => "Title Font Size",
968
- "type" => "number",
969
- "description" => "",
970
- "mu" => "px",
971
- "excludeFrom" => array(),
972
- ),
973
- ),
974
975
- ),
976
- "Social" => array(
977
- "icon" => "mdi mdi-link-variant",
978
- "fields" => array(
979
- "enableTwitter" => array(
980
- "name" => "Add Twitter icon",
981
- "type" => "toggle",
982
- "default" => "T",
983
- "description" => "Enable Twitter Sharing",
984
- "excludeFrom" => array(),
985
- ),
986
- "enableFacebook" => array(
987
- "name" => "Add Facebook icon",
988
- "type" => "toggle",
989
- "default" => "T",
990
- "description" => "Enable Facebook Sharing",
991
- "excludeFrom" => array(),
992
- ),
993
- "enableGplus" => array(
994
- "name" => "Add Google Plus icon",
995
- "type" => "toggle",
996
- "default" => "T",
997
- "description" => "Enable Google Plus Sharing",
998
- "excludeFrom" => array(),
999
- ),
1000
- "enablePinterest" => array(
1001
- "name" => "Add Pinterest icon",
1002
- "type" => "toggle",
1003
- "default" => "T",
1004
- "description" => "Enable Pinterest Sharing",
1005
- "excludeFrom" => array(),
1006
- ),
1007
- "socialIconColor" => array(
1008
- "name" => "Color of social sharing icons",
1009
- "type" => "color",
1010
- "description" => "Set the color of the social sharing icons",
1011
- "default" => "#ffffff",
1012
- "excludeFrom" => array(),
1013
- ),
1014
- ),
1015
-
1016
- ),
1017
- "Image loaded effects" => array(
1018
- "icon" => "mdi mdi-reload",
1019
- "fields" => array(
1020
- "loadedScale" => array(
1021
- "name" => "Scale",
1022
- "description" => "Choose a value below 100% for a zoom-in effect. Choose a value over 100% for a zoom-out effect",
1023
- "type" => "ui-slider",
1024
- "min" => 0,
1025
- "max" => 200,
1026
- "mu" => "%",
1027
- "default" => 100,
1028
- "excludeFrom" => array(),
1029
- ),
1030
- "loadedRotate" => array(
1031
- "name" => "Rotate",
1032
- "description" => "",
1033
- "type" => "PRO_FEATURE",
1034
- "min" => - 180,
1035
- "max" => 180,
1036
- "default" => 0,
1037
- "mu" => "deg",
1038
- "excludeFrom" => array(),
1039
- ),
1040
- "loadedHSlide" => array(
1041
- "name" => "Horizontal slide",
1042
- "description" => "",
1043
- "type" => "PRO_FEATURE",
1044
- "min" => - 100,
1045
- "max" => 100,
1046
- "mu" => "px",
1047
- "default" => 0,
1048
- "excludeFrom" => array(),
1049
- ),
1050
- "loadedVSlide" => array(
1051
- "name" => "Vertical slide",
1052
- "description" => "",
1053
- "type" => "PRO_FEATURE",
1054
- "min" => - 100,
1055
- "max" => 100,
1056
- "mu" => "px",
1057
- "default" => 0,
1058
- "excludeFrom" => array(),
1059
- ),
1060
-
1061
- ),
1062
- ),
1063
- "Hover effect" => array(
1064
- "icon" => "mdi mdi-blur",
1065
- "fields" => array(
1066
- "Effect" => array(
1067
- "name" => "Effect",
1068
- "description" => "Select an hover effect",
1069
- "type" => "hover-effect",
1070
- "excludeFrom" => array(),
1071
- ),
1072
- ),
1073
- ),
1074
- "Style" => array(
1075
- "icon" => "mdi mdi-format-paint",
1076
- "fields" => array(
1077
- "borderSize" => array(
1078
- "name" => "Border Size",
1079
- "type" => "ui-slider",
1080
- "description" => "",
1081
- "mu" => "px",
1082
- "min" => 0,
1083
- "max" => 10,
1084
- "default" => 0,
1085
- "excludeFrom" => array(),
1086
- ),
1087
- "borderRadius" => array(
1088
- "name" => "Border Radius",
1089
- "type" => "ui-slider",
1090
- "description" => "",
1091
- "mu" => "px",
1092
- "min" => 0,
1093
- "max" => 100,
1094
- "default" => 0,
1095
- "excludeFrom" => array(),
1096
- ),
1097
- "borderColor" => array(
1098
- "name" => "Border Color",
1099
- "type" => "color",
1100
- "description" => "",
1101
- "default" => "#ffffff",
1102
- "excludeFrom" => array(),
1103
- ),
1104
- "shadowSize" => array(
1105
- "name" => "Shadow Size",
1106
- "type" => "ui-slider",
1107
- "description" => "",
1108
- "mu" => "px",
1109
- "min" => 0,
1110
- "max" => 20,
1111
- "default" => 0,
1112
- "excludeFrom" => array(),
1113
- ),
1114
- "shadowColor" => array(
1115
- "name" => "Shadow Color",
1116
- "type" => "color",
1117
- "description" => "",
1118
- "default" => "#ffffff",
1119
- "excludeFrom" => array(),
1120
- ),
1121
1122
- ),
1123
- ),
1124
- "Customizations" => array(
1125
- "icon" => "mdi mdi-puzzle",
1126
- "fields" => array(
1127
- "script" => array(
1128
- "name" => "Custom scripts",
1129
- "type" => "textarea",
1130
- "description" => "This script will be called after the gallery initialization. Useful for custom lightboxes.
1131
- <br />
1132
- <br />
1133
- <strong>Write just the code without using the &lt;script&gt;&lt;/script&gt; tags</strong>",
1134
- "excludeFrom" => array( "shortcode" ),
1135
- ),
1136
- "style" => array(
1137
- "name" => "Custom css",
1138
- "type" => "textarea",
1139
- "description" => "<strong>Write just the code without using the &lt;style&gt;&lt;/style&gt; tags</strong>",
1140
- "excludeFrom" => array( "shortcode" ),
1141
- ),
1142
- ),
1143
- ),
1144
1145
- );
1146
}
1147
1148
class ModulaLiteHoverEffect {
5
* Description: Modula is one of the best & most creative WordPress gallery plugins. Use it to create a great grid or
6
* masonry image gallery.
7
* Author: Macho Themes
8
+ * Version: 1.3.1
9
* Author URI: https://www.machothemes.com/
10
*/
11
21
class ModulaLite {
22
23
private $loadedData;
24
+ private $fields = array();
25
26
+ private $version = "1.3.1";
27
28
private $defaultValues = array(
29
'width' => 100,
62
'hoverEffect' => 'pufrobo',
63
'hasResizedImages' => false,
64
'importedFrom' => '',
65
+ 'hide_title' => false,
66
+ 'hide_description' => false,
67
);
68
69
public function __construct() {
74
$this->define_hover_effects();
75
$this->ModulaDB = $this->create_db_conn();
76
77
+ require_once 'lib/class-modula-feedback.php';
78
+ new Modula_Feedback( __FILE__ );
79
+
80
add_filter( 'widget_text', 'do_shortcode' );
81
add_filter( 'mce_buttons', array( $this, 'editor_button' ) );
82
add_filter( 'mce_external_plugins', array( $this, 'register_editor_plugin' ) );
88
add_action( 'admin_menu', array( $this, 'add_gallery_admin_menu' ) );
89
90
add_shortcode( 'Modula', array( $this, 'gallery_shortcode_handler' ) );
91
+ add_filter( 'the_content', array( $this, 'shortcode_empty_paragraph_fix' ), 99 );
92
+
93
add_action( 'wp_ajax_modula_save_gallery', array( $this, 'save_gallery' ) );
94
add_action( 'wp_ajax_modula_save_image', array( $this, 'save_image' ) );
95
add_action( 'wp_ajax_modula_add_image', array( $this, 'add_image' ) );
108
109
add_filter( 'plugin_row_meta', array( $this, 'register_links' ), 10, 2 );
110
add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
111
+
112
+
113
+ // Set fields
114
+ $this->fields[ __( 'General', 'modula-gallery' ) ] = array(
115
+ "icon" => "mdi mdi-settings",
116
+ "fields" => array(
117
+ "name" => array(
118
+ "name" => esc_html__( 'Name', 'modula-gallery' ),
119
+ "type" => "text",
120
+ "description" => esc_html__( 'Name of the gallery, for internal use.', 'modula-gallery' ),
121
+ "excludeFrom" => array(),
122
+ ),
123
+ "description" => array(
124
+ "name" => esc_html__( 'Description', 'modula-gallery' ),
125
+ "type" => "text",
126
+ "description" => esc_html__( 'This description is for internal use.', 'modula-gallery' ),
127
+ "excludeFrom" => array(),
128
+ ),
129
+ "width" => array(
130
+ "name" => esc_html__( 'Width', 'modula-gallery' ),
131
+ "type" => "text",
132
+ "description" => esc_html__( 'Width of the gallery (i.e.: 100% or 500px)', 'modula-gallery' ),
133
+ "mu" => "px or %",
134
+ "excludeFrom" => array(),
135
+ ),
136
+ "height" => array(
137
+ "name" => esc_html__( 'Height', 'modula-gallery' ),
138
+ "type" => "number",
139
+ "description" => esc_html__( 'Height of the gallery in pixels', 'modula-gallery' ),
140
+ "mu" => "px",
141
+ "excludeFrom" => array(),
142
+ ),
143
+ "img_size" => array(
144
+ "name" => esc_html__( 'Minimum image size', 'modula-gallery' ),
145
+ "type" => "number",
146
+ "description" => esc_html__( 'Minimum width or height of the images', 'modula-gallery' ),
147
+ "mu" => "px or %",
148
+ "excludeFrom" => array(),
149
+ ),
150
+ "margin" => array(
151
+ "name" => esc_html__( 'Margin', 'modula-gallery' ),
152
+ "type" => "number",
153
+ "description" => esc_html__( 'Margin between images', 'modula-gallery' ),
154
+ "mu" => "px",
155
+ "excludeFrom" => array(),
156
+ ),
157
+ "randomFactor" => array(
158
+ "name" => esc_html__( 'Random factor', 'modula-gallery' ),
159
+ "type" => "ui-slider",
160
+ "description" => "",
161
+ "min" => 0,
162
+ "max" => 100,
163
+ "mu" => "%",
164
+ "default" => 20,
165
+ "excludeFrom" => array(),
166
+ ),
167
+ "filters" => array(
168
+ "name" => esc_html__( 'Filters', 'modula-gallery' ),
169
+ "type" => "PRO_FEATURE",
170
+ "description" => esc_html__( 'Add your own filters here. Each image can have one or more filters.', 'modula-gallery' ),
171
+ "excludeFrom" => array(),
172
+ ),
173
+ "filterClick" => array(
174
+ "name" => esc_html__( 'Reload Page on filter click', 'modula-gallery' ),
175
+ "type" => "PRO_FEATURE",
176
+ "description" => esc_html__( 'Turn this feature ON if you want to use filters with most lightboxes', 'modula-gallery' ),
177
+ "excludeFrom" => array(),
178
+ ),
179
+ "allFilterLabel" => array(
180
+ "name" => esc_html__( 'Text for "All" filter', 'modula-gallery' ),
181
+ "type" => "PRO_FEATURE",
182
+ "description" => esc_html__( 'Write here the label for the "All" filter', 'modula-gallery' ),
183
+ "default" => "All",
184
+ "excludeFrom" => array(),
185
+ ),
186
+ "lightbox" => array(
187
+ "name" => esc_html__( 'Lightbox &amp; Links', 'modula-gallery' ),
188
+ "type" => "select",
189
+ "description" => esc_html__( 'Define here what happens when user click on the images.', 'modula-gallery' ),
190
+ "values" => array(
191
+ "Link" => array(
192
+ "|" . esc_html__( 'No link', 'modula-gallery' ),
193
+ "direct|" . esc_html__( 'Direct link to image', 'modula-gallery' ),
194
+ "|" . esc_html__( 'Attachment page', 'modula-gallery' )
195
+ ),
196
+ "Lightboxes" => array( "lightbox2|Lightbox" ),
197
+ ),
198
+ "disabled" => array(
199
+ "Lightboxes with PRO license" => array(
200
+ "magnific|Magnific popup",
201
+ "prettyphoto|PrettyPhoto",
202
+ "fancybox|FancyBox",
203
+ "swipebox|SwipeBox",
204
+ "lightbox2|Lightbox",
205
+ ),
206
+ ),
207
+ "excludeFrom" => array(),
208
+ ),
209
+ "shuffle" => array(
210
+ "name" => esc_html__( 'Shuffle images', 'modula-gallery' ),
211
+ "type" => "toggle",
212
+ "default" => "T",
213
+ "description" => esc_html__( 'Flag it if you want to shuffle the gallery at each page load', 'modula-gallery' ),
214
+ "excludeFrom" => array(),
215
+ ),
216
+ ),
217
+ );
218
+ $this->fields[ esc_html__( 'Captions', 'modula-gallery' ) ] = array(
219
+ "icon" => "mdi mdi-comment-text-outline",
220
+ "fields" => array(
221
+ "captionColor" => array(
222
+ "name" => esc_html__( 'Caption color', 'modula-gallery' ),
223
+ "type" => "color",
224
+ "description" => esc_html__( 'Color of the caption.', 'modula-gallery' ),
225
+ "default" => "#ffffff",
226
+ "excludeFrom" => array(),
227
+ ),
228
+ "wp_field_caption" => array(
229
+ "name" => esc_html__( 'Populate caption from', 'modula-gallery' ),
230
+ "type" => "select",
231
+ "description" => __( '<strong>This field is used ONLY when images are added to the gallery. </strong> If you don\'t want to automatically populate the caption field select <i>Don\'t Populate</i>', 'modula-gallery' ),
232
+ "values" => array(
233
+ "Field" => array(
234
+ "none|" . esc_html__( 'Don\'t Populate', 'modula-gallery' ),
235
+ "title|" . esc_html__( 'WP Image title', 'modula-gallery' ),
236
+ "caption|" . esc_html__( 'WP Image caption', 'modula-gallery' ),
237
+ "description|" . esc_html__( 'WP Image description', 'modula-gallery' ),
238
+ ),
239
+ ),
240
+ "excludeFrom" => array( "shortcode" ),
241
+ ),
242
+ "wp_field_title" => array(
243
+ "name" => esc_html__( 'Populate title from', 'modula-gallery' ),
244
+ "type" => "select",
245
+ "description" => __( '<strong>This field is used ONLY when images are added to the gallery. </strong> If you don\'t want to automatically populate the title field select <i>Don\'t Populate</i>', 'modula-gallery' ),
246
+ "values" => array(
247
+ "Field" => array(
248
+ "none|" . esc_html__( 'Don\'t Populate', 'modula-gallery' ),
249
+ "title|" . esc_html__( 'WP Image title', 'modula-gallery' ),
250
+ "description|" . esc_html__( 'WP Image description', 'modula-gallery' ),
251
+ ),
252
+ ),
253
+ "excludeFrom" => array( "shortcode" ),
254
+ ),
255
+ "hide_title" => array(
256
+ "name" => esc_html__( 'Image Title', 'modula-gallery' ),
257
+ "type" => "toggle",
258
+ "default" => "T",
259
+ "description" => esc_html__( 'Hide image title from frontend', 'modula-gallery' ),
260
+ "excludeFrom" => array(),
261
+ ),
262
+ "hide_description" => array(
263
+ "name" => esc_html__( 'Image Description', 'modula-gallery' ),
264
+ "type" => "toggle",
265
+ "default" => "T",
266
+ "description" => esc_html__( 'Hide image description from frontend', 'modula-gallery' ),
267
+ "excludeFrom" => array(),
268
+ ),
269
+ "captionFontSize" => array(
270
+ "name" => esc_html__( 'Caption Font Size', 'modula-gallery' ),
271
+ "type" => "number",
272
+ "description" => "",
273
+ "mu" => "px",
274
+ "excludeFrom" => array(),
275
+ ),
276
+ "titleFontSize" => array(
277
+ "name" => esc_html__( 'Title Font Size', 'modula-gallery' ),
278
+ "type" => "number",
279
+ "description" => "",
280
+ "mu" => "px",
281
+ "excludeFrom" => array(),
282
+ ),
283
+ ),
284
+ );
285
+
286
+ $this->fields[ esc_html__( 'Social', 'modula-gallery' ) ] = array(
287
+ "icon" => "mdi mdi-link-variant",
288
+ "fields" => array(
289
+ "enableTwitter" => array(
290
+ "name" => esc_html__( 'Add Twitter icon', 'modula-gallery' ),
291
+ "type" => "toggle",
292
+ "default" => "T",
293
+ "description" => esc_html__( 'Enable Twitter Sharing', 'modula-gallery' ),
294
+ "excludeFrom" => array(),
295
+ ),
296
+ "enableFacebook" => array(
297
+ "name" => esc_html__( 'Add Facebook icon', 'modula-gallery' ),
298
+ "type" => "toggle",
299
+ "default" => "T",
300
+ "description" => esc_html__( 'Enable Facebook Sharing', 'modula-gallery' ),
301
+ "excludeFrom" => array(),
302
+ ),
303
+ "enableGplus" => array(
304
+ "name" => esc_html__( 'Add Google Plus icon', 'modula-gallery' ),
305
+ "type" => "toggle",
306
+ "default" => "T",
307
+ "description" => esc_html__( 'Enable Google Plus Sharing', 'modula-gallery' ),
308
+ "excludeFrom" => array(),
309
+ ),
310
+ "enablePinterest" => array(
311
+ "name" => esc_html__( 'Add Pinterest icon', 'modula-gallery' ),
312
+ "type" => "toggle",
313
+ "default" => "T",
314
+ "description" => esc_html__( 'Enable Pinterest Sharing', 'modula-gallery' ),
315
+ "excludeFrom" => array(),
316
+ ),
317
+ "socialIconColor" => array(
318
+ "name" => esc_html__( 'Color of social sharing icons', 'modula-gallery' ),
319
+ "type" => "color",
320
+ "description" => esc_html__( 'Set the color of the social sharing icons', 'modula-gallery' ),
321
+ "default" => "#ffffff",
322
+ "excludeFrom" => array(),
323
+ ),
324
+ ),
325
+
326
+ );
327
+ $this->fields[ esc_html__( 'Image loaded effects', 'modula-gallery' ) ] = array(
328
+ "icon" => "mdi mdi-reload",
329
+ "fields" => array(
330
+ "loadedScale" => array(
331
+ "name" => esc_html__( 'Scale', 'modula-gallery' ),
332
+ "description" => esc_html__( 'Choose a value below 100% for a zoom-in effect. Choose a value over 100% for a zoom-out effect', 'modula-gallery' ),
333
+ "type" => "ui-slider",
334
+ "min" => 0,
335
+ "max" => 200,
336
+ "mu" => "%",
337
+ "default" => 100,
338
+ "excludeFrom" => array(),
339
+ ),
340
+ "loadedRotate" => array(
341
+ "name" => esc_html__( 'Rotate', 'modula-gallery' ),
342
+ "description" => "",
343
+ "type" => "PRO_FEATURE",
344
+ "min" => - 180,
345
+ "max" => 180,
346
+ "default" => 0,
347
+ "mu" => "deg",
348
+ "excludeFrom" => array(),
349
+ ),
350
+ "loadedHSlide" => array(
351
+ "name" => esc_html__( 'Horizontal slide', 'modula-gallery' ),
352
+ "description" => "",
353
+ "type" => "PRO_FEATURE",
354
+ "min" => - 100,
355
+ "max" => 100,
356
+ "mu" => "px",
357
+ "default" => 0,
358
+ "excludeFrom" => array(),
359
+ ),
360
+ "loadedVSlide" => array(
361
+ "name" => esc_html__( 'Vertical slide', 'modula-gallery' ),
362
+ "description" => "",
363
+ "type" => "PRO_FEATURE",
364
+ "min" => - 100,
365
+ "max" => 100,
366
+ "mu" => "px",
367
+ "default" => 0,
368
+ "excludeFrom" => array(),
369
+ ),
370
+
371
+ ),
372
+ );
373
+ $this->fields[ esc_html__( 'Hover effect', 'modula-gallery' ) ] = array(
374
+ "icon" => "mdi mdi-blur",
375
+ "fields" => array(
376
+ "Effect" => array(
377
+ "name" => esc_html__( 'Effect', 'modula-gallery' ),
378
+ "description" => esc_html__( 'Select an hover effect', 'modula-gallery' ),
379
+ "type" => "hover-effect",
380
+ "excludeFrom" => array(),
381
+ ),
382
+ ),
383
+ );
384
+ $this->fields[ esc_html__( 'Style', 'modula-gallery' ) ] = array(
385
+ "icon" => "mdi mdi-format-paint",
386
+ "fields" => array(
387
+ "borderSize" => array(
388
+ "name" => esc_html__( 'Border Size', 'modula-gallery' ),
389
+ "type" => "ui-slider",
390
+ "description" => "",
391
+ "mu" => "px",
392
+ "min" => 0,
393
+ "max" => 10,
394
+ "default" => 0,
395
+ "excludeFrom" => array(),
396
+ ),
397
+ "borderRadius" => array(
398
+ "name" => esc_html__( 'Border Radius', 'modula-gallery' ),
399
+ "type" => "ui-slider",
400
+ "description" => "",
401
+ "mu" => "px",
402
+ "min" => 0,
403
+ "max" => 100,
404
+ "default" => 0,
405
+ "excludeFrom" => array(),
406
+ ),
407
+ "borderColor" => array(
408
+ "name" => esc_html__( 'Border Color', 'modula-gallery' ),
409
+ "type" => "color",
410
+ "description" => "",
411
+ "default" => "#ffffff",
412
+ "excludeFrom" => array(),
413
+ ),
414
+ "shadowSize" => array(
415
+ "name" => esc_html__( 'Shadow Size', 'modula-gallery' ),
416
+ "type" => "ui-slider",
417
+ "description" => "",
418
+ "mu" => "px",
419
+ "min" => 0,
420
+ "max" => 20,
421
+ "default" => 0,
422
+ "excludeFrom" => array(),
423
+ ),
424
+ "shadowColor" => array(
425
+ "name" => esc_html__( 'Shadow Color', 'modula-gallery' ),
426
+ "type" => "color",
427
+ "description" => "",
428
+ "default" => "#ffffff",
429
+ "excludeFrom" => array(),
430
+ ),
431
+
432
+ ),
433
+ );
434
+ $this->fields[ esc_html__( 'Customizations', 'modula-gallery' ) ] = array(
435
+ "icon" => "mdi mdi-puzzle",
436
+ "fields" => array(
437
+ "script" => array(
438
+ "name" => esc_html__( 'Custom scripts', 'modula-gallery' ),
439
+ "type" => "textarea",
440
+ "description" => esc_html__( 'This script will be called after the gallery initialization. Useful for custom lightboxes.', 'modula-gallery' ) . "
441
+ <br />
442
+ <br />
443
+ <strong>Write just the code without using the &lt;script&gt;&lt;/script&gt; tags</strong>",
444
+ "excludeFrom" => array( "shortcode" ),
445
+ ),
446
+ "style" => array(
447
+ "name" => esc_html__( 'Custom css', 'modula-gallery' ),
448
+ "type" => "textarea",
449
+ "description" => '<strong>' . esc_html__( 'Write just the code without using the &lt;style&gt;&lt;/style&gt; tags', 'modula-gallery' ) . '</strong>',
450
+ "excludeFrom" => array( "shortcode" ),
451
+ ),
452
+ ),
453
+ );
454
+
455
}
456
457
//Define textdomain
617
public function register_links( $links, $file ) {
618
$base = plugin_basename( __FILE__ );
619
if ( $file == $base ) {
620
+ $links[] = '<a href="admin.php?page=modula-lite-admin" title="' . esc_html__( 'Modula Grid Gallery Dashboard', 'modula-gallery' ) . '">' . esc_html__( 'Dashboard', 'modula-gallery' ) . '</a>';
621
$links[] = '<a href="https://twitter.com/MachoThemez" title="@MachoThemez on Twitter">Twitter</a>';
622
$links[] = '<a href="https://www.facebook.com/machothemes" title="MachoThemes on Facebook">Facebook</a>';
623
}
771
wp_register_script( 'modula', plugins_url() . '/modula-best-grid-gallery/scripts/jquery.modula.js', array( 'jquery' ) );
772
wp_enqueue_script( 'modula' );
773
774
+ wp_register_style( 'modula_stylesheet', plugins_url() . '/modula-best-grid-gallery/scripts/modula.css', null, $this->version );
775
wp_enqueue_style( 'modula_stylesheet' );
776
777
wp_register_style( 'effects_stylesheet', plugins_url() . '/modula-best-grid-gallery/scripts/effects.css', null, $this->version );
778
wp_enqueue_style( 'effects_stylesheet' );
779
780
+ wp_register_script( 'lightbox2_script', plugins_url() . '/modula-best-grid-gallery/lightbox/lightbox2/js/lightbox.min.js', array( 'jquery' ), $this->version, true );
781
+ wp_register_style( 'lightbox2_stylesheet', plugins_url() . '/modula-best-grid-gallery/lightbox/lightbox2/css/lightbox.min.css' );
782
}
783
784
//Admin Section - register scripts and styles
832
833
//Create Admin Menu
834
public function add_gallery_admin_menu() {
835
+ $overview = add_menu_page( esc_html__( 'Manage Galleries', 'modula-gallery' ), esc_html__( 'Modula', 'modula-gallery' ), 'edit_posts', 'modula-lite-admin', array(
836
$this,
837
'add_overview',
838
), plugins_url() . '/modula-best-grid-gallery/admin/icon.png' );
852
853
if ( $imageUrl ) {
854
if ( strncmp( strtolower( $imageUrl ), strtolower( site_url() ), strlen( site_url() ) ) != 0 ) {
855
+ $fix = add_submenu_page( 'modula-lite-admin', __( 'Modula >> Fix', 'modula-gallery' ), '❗️ ' . __( 'Fix', 'modula-gallery' ), 'edit_posts', 'modula-lite-gallery-fix', array(
856
$this,
857
'fix',
858
) );
863
add_option( 'Modula_skip_fix', true );
864
}
865
866
+ $add_gallery = add_submenu_page( 'modula-lite-admin', __( 'Modula - Add Gallery', 'modula-gallery' ), __( 'Add Gallery', 'modula-gallery' ), 'edit_posts', 'modula-lite-add', array(
867
$this,
868
'add_gallery',
869
) );
870
+ $edit_gallery = add_submenu_page( NULL, __( 'Modula - Edit Gallery', 'modula-gallery' ), __( 'Edit Gallery', 'modula-gallery' ), 'edit_posts', 'modula-lite-edit', array(
871
$this,
872
'edit_gallery',
873
) );
874
+ $upgrade = add_submenu_page( 'modula-lite-admin', __( 'Modula - Upgrade to PRO', 'modula-gallery' ), __( 'Upgrade to PRO', 'modula-gallery' ), 'edit_posts', 'modula-lite-gallery-upgrade', array(
875
$this,
876
'upgrade',
877
) );
953
if ( check_admin_referer( 'Modula', 'Modula' ) ) {
954
$result = false;
955
// $type = $_POST['type'];
956
+ $imageUrl = esc_url( $_POST['img_url'] );
957
$imageCaption = stripslashes( $_POST['description'] );
958
+ $title = stripslashes( $_POST['title'] );
959
$target = $_POST['target'];
960
$link = isset( $_POST['link'] ) ? stripslashes( $_POST['link'] ) : null;
961
$imageId = intval( $_POST['img_id'] );
1032
$lightbox = $_POST['tg_lightbox'];
1033
$wp_field_caption = $_POST['tg_wp_field_caption'];
1034
$wp_field_title = $_POST['tg_wp_field_title'];
1035
+ $hide_title = $this->checkboxVal( 'tg_hide_title' );
1036
+ $hide_description = $this->checkboxVal( 'tg_hide_description' );
1037
$captionColor = $_POST['tg_captionColor'];
1038
$borderSize = intval( $_POST['tg_borderSize'] );
1039
$loadedScale = intval( $_POST['tg_loadedScale'] );
1062
'hasResizedImages' => true,
1063
'wp_field_caption' => $wp_field_caption,
1064
'wp_field_title' => $wp_field_title,
1065
+ 'hide_title' => $hide_title,
1066
+ 'hide_description' => $hide_description,
1067
'margin' => $margin,
1068
'randomFactor' => $_POST['tg_randomFactor'],
1069
'shuffle' => $shuffle,
1166
case "lightbox2":
1167
wp_enqueue_style( 'lightbox2_stylesheet' );
1168
wp_enqueue_script( 'lightbox2_script' );
1169
+ wp_add_inline_script( 'lightbox2_script', 'jQuery(document).ready(function(){lightbox.option({albumLabel: "' . esc_html__( 'Image %1 of %2', 'modula-gallery' ) . '"});});' );
1170
break;
1171
}
1172
1173
return $Modula->render();
1174
} else {
1175
+ return esc_html__( 'Gallery not found.', 'modula-gallery' );
1176
}
1177
}
1178
1179
+ public function shortcode_empty_paragraph_fix( $content ) {
1180
1181
+ $array = array (
1182
+ '<p>[Modula' => '[Modula' ,
1183
+ '<p>[/Modula' => '[/Modula',
1184
+ 'Modula]</p>' => 'Modula]',
1185
+ 'Modula]<br />' => 'Modula]'
1186
+ );
1187
1188
+ $content = strtr( $content, $array );
1189
1190
+ return $content;
1191
+ }
1192
1193
}
1194
1195
class ModulaLiteHoverEffect {
README.txt CHANGED
@@ -1,9 +1,9 @@
1
- === Gallery - Photo Gallery - Image Gallery ===
2
- Contributors: machothemes, imagegallery, xphotogallery
3
Tags: image gallery, photo gallery, responsive gallery, wordpress gallery plugin, wordpress portfolio plugin, lightbox gallery, masonry gallery, envira, envira gallery, nextgen, nextgen gallery, album, content gallery, fancy gallery, gallery widget, media gallery, mosaic gallery, photo album, polaroid gallery, portfolio gallery, post gallery, thumbnail gallery, video gallery, youtube gallery, filterable portfolio, portfolio gallery, responsive portfolio, wordpress portfolio plugin
4
Requires at least: 3.8
5
Tested up to: 4.9
6
- Stable tag: 1.2.1
7
License: GPLv3 or later
8
License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
@@ -157,6 +157,16 @@ Free support is included only with a PRO license: [Buy Modula PRO](https://wp-mo
157
158
== Changelog ==
159
160
= 1.2.1 =
161
* Fixed the broken link
162
* Hid the Edit gallery menu item
1
+ === Gallery - Photo Gallery - Image Gallery ===
2
+ Contributors: machothemes, imagegallery, xphotogallery, silkalns
3
Tags: image gallery, photo gallery, responsive gallery, wordpress gallery plugin, wordpress portfolio plugin, lightbox gallery, masonry gallery, envira, envira gallery, nextgen, nextgen gallery, album, content gallery, fancy gallery, gallery widget, media gallery, mosaic gallery, photo album, polaroid gallery, portfolio gallery, post gallery, thumbnail gallery, video gallery, youtube gallery, filterable portfolio, portfolio gallery, responsive portfolio, wordpress portfolio plugin
4
Requires at least: 3.8
5
Tested up to: 4.9
6
+ Stable tag: 1.3.1
7
License: GPLv3 or later
8
License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
157
158
== Changelog ==
159
160
+ = 1.3.1 =
161
+ * Changed lightbox script
162
+
163
+ = 1.3.0 =
164
+ * Added compatibility with : WPML/Visual Composer/Page Builder by SiteOrigin
165
+ * Fixed bugs with captions & titles
166
+ * Localized all text strings
167
+ * Fixed lightbox bug
168
+ * For a more detailed changelog check : https://github.com/MachoThemes/modula-lite/milestone/2?closed=1
169
+
170
= 1.2.1 =
171
* Fixed the broken link
172
* Hid the Edit gallery menu item
admin/add-gallery.php CHANGED
@@ -9,7 +9,7 @@ $tg_subtitle = "New Gallery";
9
<?php include( "header.php" ) ?>
10
11
12
- <div id="modula-wizard">
13
<h2> <?php _e( 'Add New Gallery', 'modula-gallery' ); ?> </h2>
14
<form action="#" method="post">
15
<?php wp_nonce_field( 'Modula', 'Modula' ); ?>
9
<?php include( "header.php" ) ?>
10
11
12
+ <div id="modula-wizard" class="add-gallery">
13
<h2> <?php _e( 'Add New Gallery', 'modula-gallery' ); ?> </h2>
14
<form action="#" method="post">
15
<?php wp_nonce_field( 'Modula', 'Modula' ); ?>
admin/edit-gallery.php CHANGED
@@ -30,7 +30,7 @@ include( "header.php" );
30
<div class="container">
31
<div class="row collapsible">
32
<div class="card-panel light-green lighten-4">
33
- <span> Shortcode: </span>
34
<input type="text" readonly value="[Modula id='<?php print $gallery->id; ?>']"> </input>
35
</div>
36
</div>
@@ -127,7 +127,7 @@ include( "header.php" );
127
<?php elseif ( $data["type"] == "PRO_FEATURE" ) : ?>
128
129
<div class="pro-cell">
130
- <h6><?php echo esc_html__( 'This feature is available only in the PRO version of Modula', 'modula-lite' ); ?></h6>
131
<br/>
132
<a class="button button-secondary" href="<?php echo esc_url( admin_url( 'admin.php?page=modula-lite-gallery-upgrade&tab=comparison_table' ) ); ?>" target="_blank">
133
<?php echo esc_html__( 'See LITE vs PRO Differences', 'modula-gallery' ); ?></a>
@@ -147,10 +147,10 @@ include( "header.php" );
147
<select name="tg_hoverEffect" class="select-effect">
148
<?php $hoverEffectIdx = 0 ?>
149
<option value="none"><?php echo esc_html__( 'None', 'modula-gallery' ); ?></option>
150
<optgroup label="Buy a PRO license to unlock all hover effects">
151
- <option disabled></option>
152
- <?php foreach ( $this->hoverEffects as $effect ) : ?>
153
- <option <?php echo $effect->code != "pufrobo" ? "disabled" : null ?> <?php echo( $gallery->hoverEffect == strtolower( $effect->code ) ? "selected" : null ) ?> value="<?php echo esc_attr( $effect->code ); ?>"><?php echo esc_attr( $effect->name ); ?></option>
154
<?php endforeach ?>
155
</optgroup>
156
</select>
@@ -183,20 +183,10 @@ include( "header.php" );
183
184
<div class="effect-compatibility">
185
186
- <label class="effect-description"> <?php echo esc_html( 'This effect is
187
- compatible with:', 'modula-gallery' ); ?>
188
- <?php if ( $effect->allowTitle ): ?>
189
- <span><i class="fa fa-check"></i> <?php echo esc_html( 'Title', 'modula-gallery' ); ?></span>
190
- <?php endif; ?>
191
-
192
- <?php if ( $effect->allowSubtitle ): ?>
193
- <span><i class="fa fa-check"></i> <?php echo esc_html( 'Subtitle', 'modula-gallery' ); ?> </span>
194
- <?php endif; ?>
195
-
196
- <?php if ( $effect->maxSocial > 0 ): ?>
197
- <span><i class="fa fa-check"></i> <?php echo esc_html( 'Social Icons', 'modula-gallery' ); ?> </span>
198
- <?php endif; ?>
199
-
200
</label>
201
202
</div>
30
<div class="container">
31
<div class="row collapsible">
32
<div class="card-panel light-green lighten-4">
33
+ <span> <?php echo esc_html__( 'Shortcode', 'modula-gallery' ); ?>: </span>
34
<input type="text" readonly value="[Modula id='<?php print $gallery->id; ?>']"> </input>
35
</div>
36
</div>
127
<?php elseif ( $data["type"] == "PRO_FEATURE" ) : ?>
128
129
<div class="pro-cell">
130
+ <h6><?php echo esc_html__( 'This feature is available only in the PRO version of Modula', 'modula-gallery' ); ?></h6>
131
<br/>
132
<a class="button button-secondary" href="<?php echo esc_url( admin_url( 'admin.php?page=modula-lite-gallery-upgrade&tab=comparison_table' ) ); ?>" target="_blank">
133
<?php echo esc_html__( 'See LITE vs PRO Differences', 'modula-gallery' ); ?></a>
147
<select name="tg_hoverEffect" class="select-effect">
148
<?php $hoverEffectIdx = 0 ?>
149
<option value="none"><?php echo esc_html__( 'None', 'modula-gallery' ); ?></option>
150
+ <option <?php selected( 'pufrobo', $gallery->hoverEffect ) ?> value="pufrobo">Pufrobo</option>
151
<optgroup label="Buy a PRO license to unlock all hover effects">
152
+ <?php foreach ( $this->hoverEffects as $effect ) : if ( 'none' == $effect->code || 'pufrobo' == $effect->code ) { continue; } ?>
153
+ <option disabled value="<?php echo esc_attr( $effect->code ); ?>"><?php echo esc_attr( $effect->name ); ?></option>
154
<?php endforeach ?>
155
</optgroup>
156
</select>
183
184
<div class="effect-compatibility">
185
186
+ <label class="effect-description"> <?php echo esc_html( 'This effect is compatible with:', 'modula-gallery' ); ?>
187
+ <span><i class="fa fa-check"></i> <?php echo esc_html( 'Title', 'modula-gallery' ); ?></span>
188
+ <span><i class="fa fa-check"></i> <?php echo esc_html( 'Subtitle', 'modula-gallery' ); ?> </span>
189
+ <span><i class="fa fa-check"></i> <?php echo esc_html( 'Social Icons', 'modula-gallery' ); ?> </span>
190
</label>
191
192
</div>
admin/header.php CHANGED
@@ -1,4 +1,4 @@
1
<header id="top" class="modula-header" >
2
- <h1 class="header center-on-small-only">Modula Lite</h1>
3
<h4 class="light text-lighten-4 center-on-small-only"><?php print $tg_subtitle ?></h4>
4
</header>
1
<header id="top" class="modula-header" >
2
+ <h1 class="header center-on-small-only"><?php echo esc_html__( 'Modula Lite', 'modula-gallery' ); ?></h1>
3
<h4 class="light text-lighten-4 center-on-small-only"><?php print $tg_subtitle ?></h4>
4
</header>
admin/import.php CHANGED
@@ -4,13 +4,13 @@ if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
4
}
5
6
if ( empty( $tg_subtitle ) ) {
7
- $tg_subtitle = "Import galleries";
8
}
9
10
?>
11
<?php include( "header.php" ); ?>
12
13
- <div id="modula-wizard">
14
<h2> <?php echo esc_html__( 'Import galleries', 'modula-gallery' ); ?> </h2>
15
<form action="#" method="post" onsubmit="return false;">
16
<?php wp_nonce_field( 'Modula', 'Modula' ); ?>
4
}
5
6
if ( empty( $tg_subtitle ) ) {
7
+ $tg_subtitle = esc_html__( 'Import galleries', 'modula-gallery' );
8
}
9
10
?>
11
<?php include( "header.php" ); ?>
12
13
+ <div id="modula-wizard" class="import">
14
<h2> <?php echo esc_html__( 'Import galleries', 'modula-gallery' ); ?> </h2>
15
<form action="#" method="post" onsubmit="return false;">
16
<?php wp_nonce_field( 'Modula', 'Modula' ); ?>
admin/include/image-list.php CHANGED
@@ -52,16 +52,16 @@
52
<input type="hidden" name="halign" value="<?php _e($image->halign) ?>" />
53
<input type="hidden" name="sortOrder" value="<?php _e($image->sortOrder) ?>" />
54
<pre><?php _e($image->description) ?></pre>
55
- <input id="img-title" value="<?php print $image->title ?>">
56
</div>
57
</div>
58
59
<div class="card-action">
60
<a href="#" class="edit">
61
- <span>Edit</span>
62
</a>
63
<a href="#" class="remove">
64
- <span>Remove</span>
65
</a>
66
</div>
67
52
<input type="hidden" name="halign" value="<?php _e($image->halign) ?>" />
53
<input type="hidden" name="sortOrder" value="<?php _e($image->sortOrder) ?>" />
54
<pre><?php _e($image->description) ?></pre>
55
+ <input id="img-title" value="<?php echo htmlentities($image->title) ?>">
56
</div>
57
</div>
58
59
<div class="card-action">
60
<a href="#" class="edit">
61
+ <span><?php echo esc_html__( 'Edit', 'modula-gallery' ) ?></span>
62
</a>
63
<a href="#" class="remove">
64
+ <span><?php echo esc_html__( 'Remove', 'modula-gallery' ) ?></span>
65
</a>
66
</div>
67
admin/include/tinymce-galleries.php CHANGED
@@ -2,7 +2,7 @@
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml">
4
<head>
5
- <title> Modula Grid Gallery </title>
6
<!--<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>-->
7
<script>
8
var wpColorPickerL10n = {"clear":"Clear","defaultString":"Default","pick":"Select Color","current":"Current Color"};
@@ -43,18 +43,18 @@
43
</style>
44
</head>
45
<body class="popup">
46
- <h1> YOUR GALLERIES: </h1>
47
<br>
48
<table id="galleries">
49
<!-- list here galleries -->
50
<!-- loop variable $galleries -->
51
<tr>
52
<td>
53
- <b> ID </b>
54
</td>
55
56
<td>
57
- <b> Name </b>
58
</td>
59
60
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml">
4
<head>
5
+ <title> <?php _e( 'Modula Grid Gallery', 'modula-gallery' ) ?> </title>
6
<!--<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>-->
7
<script>
8
var wpColorPickerL10n = {"clear":"Clear","defaultString":"Default","pick":"Select Color","current":"Current Color"};
43
</style>
44
</head>
45
<body class="popup">
46
+ <h1> <?php _e( 'YOUR GALLERIES', 'modula-gallery' ) ?>: </h1>
47
<br>
48
<table id="galleries">
49
<!-- list here galleries -->
50
<!-- loop variable $galleries -->
51
<tr>
52
<td>
53
+ <b> <?php _e( 'ID', 'modula-gallery' ) ?> </b>
54
</td>
55
56
<td>
57
+ <b> <?php _e( 'Name', 'modula-gallery' ) ?> </b>
58
</td>
59
60
admin/scripts/modula-admin.js CHANGED
@@ -372,6 +372,7 @@ var TG = function( $ ) {
372
var $item = $( this ).parents( '.item' );
373
374
var panel = $( '#image-panel-model' ).clone().attr( 'id', 'image-panel' );
375
panel.css( {
376
marginTop: $( window ).scrollTop() - (246 / 2)
377
} );
@@ -383,6 +384,7 @@ var TG = function( $ ) {
383
$( '#item-title', panel ).html( $( '#img-title', $item ).val() );
384
$( '#item-description', panel ).val( $( 'pre', $item ).html() );
385
$( '.copy', $item ).clone().appendTo( panel );
386
387
$( 'body' ).append( '<div class=\'overlay\' style=\'display:none\' />' );
388
$( '.overlay' ).fadeIn();
@@ -696,7 +698,7 @@ var NewGalleryWizard = function( $ ) {
696
697
return {
698
init: function() {
699
- $_wizard = $( '#modula-wizard' );
700
// $_wizard.find('select').material_select();
701
702
/*! Wizard next */
@@ -789,6 +791,7 @@ var NewGalleryWizard = function( $ ) {
789
790
$_wizard.find( 'fieldset' ).hide();
791
var $fs = $_wizard.find( 'fieldset[data-step=' + _curPage + ']' );
792
if ( _curPage == 3 ) {
793
$fs = $fs.filter( '[data-branch=' + branch + ']' );
794
}
@@ -898,7 +901,7 @@ var ImportWizard = function( $ ) {
898
899
return {
900
init: function() {
901
- $_wizard = $( '#modula-wizard' );
902
$( '#external-galleries .js-select-all' ).on( 'click', function() {
903
$( '#external-galleries .js-item' ).each( function() {
904
this.checked = true;
@@ -1033,9 +1036,4 @@ jQuery( function() {
1033
NewGalleryWizard.init();
1034
ImportWizard.init();
1035
1036
- jQuery( 'a[href$=modula-gallery-upgrade]' ).addClass( 'modula-jump-pro-menu' ).click( function( e ) {
1037
- e.preventDefault();
1038
-
1039
- location.href = 'http://modula.greentreelabs.net/#buy';
1040
- } );
1041
} );
372
var $item = $( this ).parents( '.item' );
373
374
var panel = $( '#image-panel-model' ).clone().attr( 'id', 'image-panel' );
375
+ var image_url = $( '[name=img_url]', $item ).val();
376
panel.css( {
377
marginTop: $( window ).scrollTop() - (246 / 2)
378
} );
384
$( '#item-title', panel ).html( $( '#img-title', $item ).val() );
385
$( '#item-description', panel ).val( $( 'pre', $item ).html() );
386
$( '.copy', $item ).clone().appendTo( panel );
387
+ $( '.thumb', panel ).attr( 'src', image_url );
388
389
$( 'body' ).append( '<div class=\'overlay\' style=\'display:none\' />' );
390
$( '.overlay' ).fadeIn();
698
699
return {
700
init: function() {
701
+ $_wizard = $( '#modula-wizard.add-gallery' );
702
// $_wizard.find('select').material_select();
703
704
/*! Wizard next */
791
792
$_wizard.find( 'fieldset' ).hide();
793
var $fs = $_wizard.find( 'fieldset[data-step=' + _curPage + ']' );
794
+
795
if ( _curPage == 3 ) {
796
$fs = $fs.filter( '[data-branch=' + branch + ']' );
797
}
901
902
return {
903
init: function() {
904
+ $_wizard = $( '#modula-wizard.import' );
905
$( '#external-galleries .js-select-all' ).on( 'click', function() {
906
$( '#external-galleries .js-item' ).each( function() {
907
this.checked = true;
1036
NewGalleryWizard.init();
1037
ImportWizard.init();
1038
1039
} );
admin/tutorial.php CHANGED
@@ -1,5 +1,5 @@
1
<?php
2
- $tg_subtitle = "Video tutorial";
3
include("header.php");
4
?>
5
<div class='wrap'>
1
<?php
2
+ $tg_subtitle = esc_html__( 'Video tutorial', 'modula-gallery' );
3
include("header.php");
4
?>
5
<div class='wrap'>
admin/welcome-screen/sections/comparison-table.php CHANGED
@@ -8,47 +8,47 @@ if ( ! defined( 'WPINC' ) ) {
8
9
$features = array(
10
'post-formats' => array(
11
- 'label' => 'Images per gallery',
12
'modula' => '20',
13
- 'modula-pro' => 'Unlimited',
14
),
15
'slider-layouts' => array(
16
- 'label' => 'Filters',
17
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
18
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
19
),
20
'news-ticker' => array(
21
- 'label' => 'Reload page on filter click',
22
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
23
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
24
),
25
'banner-ads' => array(
26
- 'label' => 'Change Filter Text',
27
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
28
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
29
),
30
'video-widgets' => array(
31
- 'label' => 'Multiple Included LightBox Scripts',
32
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
33
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
34
),
35
'color-schemes' => array(
36
- 'label' => 'Image Loaded Effects',
37
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
38
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
39
),
40
'typography' => array(
41
- 'label' => 'Image Hoever Effects',
42
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
43
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
44
),
45
'updates' => array(
46
- 'label' => 'Feature & Security Updates',
47
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
48
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
49
),
50
'suppoprt' => array(
51
- 'label' => 'Priority Support',
52
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
53
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
54
),
@@ -83,7 +83,7 @@ $features = array(
83
<td></td>
84
<td colspan="2" class="text-right">
85
<a href="https://www.wp-modula.com/?utm_source=worg&utm_medium=about-page&utm_campaign=upsell" target="_blank"
86
- class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span> Get Modula Pro!</a>
87
</td>
88
</tr>
89
</tbody>
8
9
$features = array(
10
'post-formats' => array(
11
+ 'label' => __( 'Images per gallery', 'modula-gallery' ),
12
'modula' => '20',
13
+ 'modula-pro' => __( 'Unlimited', 'modula-gallery' ),
14
),
15
'slider-layouts' => array(
16
+ 'label' => __( 'Filters', 'modula-gallery' ),
17
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
18
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
19
),
20
'news-ticker' => array(
21
+ 'label' => __( 'Reload page on filter click', 'modula-gallery' ),
22
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
23
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
24
),
25
'banner-ads' => array(
26
+ 'label' => __( 'Change Filter Text', 'modula-gallery' ),
27
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
28
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
29
),
30
'video-widgets' => array(
31
+ 'label' => __( 'Multiple Included LightBox Scripts', 'modula-gallery' ),
32
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
33
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
34
),
35
'color-schemes' => array(
36
+ 'label' => __( 'Image Loaded Effects', 'modula-gallery' ),
37
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
38
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
39
),
40
'typography' => array(
41
+ 'label' => __( 'Image Hoever Effects', 'modula-gallery' ),
42
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
43
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
44
),
45
'updates' => array(
46
+ 'label' => __( 'Feature & Security Updates', 'modula-gallery' ),
47
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
48
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
49
),
50
'suppoprt' => array(
51
+ 'label' => __( 'Priority Support', 'modula-gallery' ),
52
'modula' => '<span class="dashicons dashicons-no-alt"></span>',
53
'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
54
),
83
<td></td>
84
<td colspan="2" class="text-right">
85
<a href="https://www.wp-modula.com/?utm_source=worg&utm_medium=about-page&utm_campaign=upsell" target="_blank"
86
+ class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span> <?php echo __( 'Get Modula Pro!', 'modula-gallery' ) ?></a>
87
</td>
88
</tr>
89
</tbody>
lib/class-epsilon-plugin-request.php ADDED
@@ -0,0 +1,225 @@
1
+ <?php
2
+
3
+ class Epsilon_Plugin_Request {
4
+
5
+ /**
6
+ * Url for the request
7
+ *
8
+ * @var string
9
+ */
10
+ private $url = 'https://tamewp.com/';
11
+ /**
12
+ * Api endpoint
13
+ *
14
+ * @var string
15
+ */
16
+ private $endpoint = 'wp-json/epsilon/v1/add-tracking-data';
17
+ /**
18
+ * Private data
19
+ *
20
+ * @var array
21
+ */
22
+ private $data = array(
23
+ 'server' => array(),
24
+ 'user' => array(),
25
+ 'wordpress' => array(
26
+ 'deactivated_plugin' => array(),
27
+ ),
28
+ );
29
+ /**
30
+ * Plugin file
31
+ *
32
+ * @var string
33
+ */
34
+ private $plugin_file = '';
35
+
36
+ private $allow_tracking = 0;
37
+
38
+ public $request_successful = false;
39
+
40
+ function __construct( $_plugin_file, $args ) {
41
+
42
+ // Set variables
43
+ $this->allow_tracking = $args['tracking'];
44
+ $this->plugin_file = $_plugin_file;
45
+ $this->data['unique'] = md5( home_url() . get_bloginfo( 'admin_email' ) );
46
+ $this->data['wordpress']['deactivated_plugin']['uninstall_reason'] = $args['reason'];
47
+ $this->data['wordpress']['deactivated_plugin']['uninstall_details'] = $args['details'];
48
+
49
+ // Start collecting data
50
+ $this->_collect_data();
51
+ $this->_generate_url();
52
+ $this->request_successful = $this->_send_request();
53
+ }
54
+
55
+ /**
56
+ * Collect all data for the request.
57
+ *
58
+ */
59
+ private function _collect_data() {
60
+
61
+ $current_plugin = get_plugin_data( $this->plugin_file );
62
+
63
+ // Plugin data
64
+ $this->data['wordpress']['deactivated_plugin']['slug'] = $current_plugin['TextDomain'];
65
+ $this->data['wordpress']['deactivated_plugin']['name'] = $current_plugin['Name'];
66
+ $this->data['wordpress']['deactivated_plugin']['version'] = $current_plugin['Version'];
67
+ $this->data['wordpress']['deactivated_plugin']['author'] = $current_plugin['AuthorName'];
68
+
69
+ if ( $this->allow_tracking ) {
70
+ $this->_collect_wordpress_data();
71
+ $this->_collect_server_data();
72
+ $this->_collect_user_data();
73
+ }
74
+
75
+ }
76
+
77
+ /**
78
+ * Collect WordPress data.
79
+ *
80
+ */
81
+ private function _collect_wordpress_data() {
82
+ $this->data['wordpress']['locale'] = ( get_bloginfo( 'version' ) >= 4.7 ) ? get_user_locale() : get_locale();
83
+ $this->data['wordpress']['wp_version'] = get_bloginfo( 'version' );
84
+ $this->data['wordpress']['multisite'] = is_multisite();
85
+
86
+ $this->data['wordpress']['themes'] = $this->get_themes();
87
+ $this->data['wordpress']['plugins'] = $this->get_plugins();
88
+ }
89
+
90
+ /**
91
+ * Collect server data.
92
+ *
93
+ */
94
+ private function _collect_server_data() {
95
+ $this->data['server']['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
96
+ $this->data['server']['php_version'] = phpversion();
97
+ $this->data['server']['url'] = home_url();
98
+ }
99
+
100
+ /**
101
+ * Collect user data.
102
+ *
103
+ */
104
+ private function _collect_user_data() {
105
+ $admin = get_user_by( 'email', get_bloginfo( 'admin_email' ) );
106
+ if ( ! $admin ) {
107
+ $this->data['user']['email'] = '';
108
+ $this->data['user']['first_name'] = '';
109
+ $this->data['user']['last_name'] = '';
110
+ }else{
111
+ $this->data['user']['email'] = get_bloginfo( 'admin_email' );
112
+ $this->data['user']['first_name'] = $admin->first_name;
113
+ $this->data['user']['last_name'] = $admin->last_name;
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Get current themes
119
+ *
120
+ * @return array
121
+ */
122
+ private function get_themes() {
123
+ $theme = wp_get_theme();
124
+
125
+ return array(
126
+ 'installed' => $this->_get_installed_themes(),
127
+ 'active' => array(
128
+ 'slug' => get_stylesheet(),
129
+ 'name' => $theme->get( 'Name' ),
130
+ 'version' => $theme->get( 'Version' ),
131
+ 'author' => $theme->get( 'Author' ),
132
+ ),
133
+ );
134
+ }
135
+
136
+ /**
137
+ * Get an array of installed themes
138
+ */
139
+ private function _get_installed_themes() {
140
+ $installed = wp_get_themes();
141
+ $theme = get_stylesheet();
142
+ $arr = array();
143
+
144
+ foreach ( $installed as $slug => $info ) {
145
+ if ( $slug === $theme ) {
146
+ continue;
147
+ }
148
+ $arr[ $slug ] = array(
149
+ 'slug' => $slug,
150
+ 'name' => $info->get( 'Name' ),
151
+ 'version' => $info->get( 'Version' ),
152
+ 'author' => $info->get( 'Author' )
153
+ );
154
+ };
155
+
156
+ return $arr;
157
+ }
158
+
159
+ /**
160
+ * Get a list of installed plugins
161
+ */
162
+ private function get_plugins() {
163
+ if ( ! function_exists( 'get_plugins' ) ) {
164
+ include ABSPATH . '/wp-admin/includes/plugin.php';
165
+ }
166
+
167
+ $plugins = get_plugins();
168
+ $option = get_option( 'active_plugins', array() );
169
+ $active = array();
170
+ $installed = array();
171
+ foreach ( $plugins as $id => $info ) {
172
+ if ( in_array( $id, $active ) ) {
173
+ continue;
174
+ }
175
+
176
+ $id = explode( '/', $id );
177
+ $id = ucwords( str_replace( '-', ' ', $id[0] ) );
178
+
179
+ $installed[] = $id;
180
+ }
181
+
182
+ foreach ( $option as $id ) {
183
+ $id = explode( '/', $id );
184
+ $id = ucwords( str_replace( '-', ' ', $id[0] ) );
185
+
186
+ $active[] = $id;
187
+ }
188
+
189
+ return array(
190
+ 'installed' => $installed,
191
+ 'active' => $active,
192
+ );
193
+ }
194
+
195
+ /**
196
+ * Generate the url
197
+ */
198
+ protected function _generate_url() {
199
+ $this->url = $this->url . $this->endpoint;
200
+ }
201
+
202
+ /**
203
+ * Send dat to server.
204
+ *
205
+ */
206
+ private function _send_request() {
207
+
208
+ $request = wp_remote_post( $this->url, array(
209
+ 'method' => 'POST',
210
+ 'timeout' => 20,
211
+ 'redirection' => 5,
212
+ 'httpversion' => '1.1',
213
+ 'blocking' => true,
214
+ 'body' => $this->data,
215
+ 'user-agent' => 'MT/EPSILON-CUSTOMER-TRACKING/' . esc_url( home_url() )
216
+ ) );
217
+
218
+ if ( is_wp_error( $request ) ) {
219
+ return false;
220
+ }
221
+
222
+ return true;
223
+
224
+ }
225
+ }
lib/class-modula-feedback.php ADDED
@@ -0,0 +1,252 @@
1
+ <?php
2
+
3
+ class Modula_Feedback {
4
+
5
+ private $plugin_file = '';
6
+ private $plugin_name = '';
7
+
8
+ function __construct( $_plugin_file ) {
9
+
10
+ $this->plugin_file = $_plugin_file;
11
+ $this->plugin_name = basename( $this->plugin_file, '.php' );
12
+
13
+ // Deactivation
14
+ add_filter( 'plugin_action_links_' . plugin_basename( $this->plugin_file ), array( $this, 'filter_action_links' ) );
15
+ add_action( 'admin_footer-plugins.php', array( $this, 'goodbye_ajax' ) );
16
+ add_action( 'wp_ajax_epsilon_deactivate_plugin', array( $this, 'epsilon_deactivate_plugin_callback' ) );
17
+
18
+ }
19
+
20
+ /**
21
+ * Filter the deactivation link to allow us to present a form when the user deactivates the plugin
22
+ * @since 1.0.0
23
+ */
24
+ public function filter_action_links( $links ) {
25
+
26
+ if( isset( $links['deactivate'] ) ) {
27
+ $deactivation_link = $links['deactivate'];
28
+ // Insert an onClick action to allow form before deactivating
29
+ $deactivation_link = str_replace( '<a ', '<div class="epsilon-deactivate-form-wrapper"><span class="epsilon-deactivate-form" id="epsilon-deactivate-form-' . esc_attr( $this->plugin_name ) . '"></span></div><a onclick="javascript:event.preventDefault();" id="epsilon-deactivate-link-' . esc_attr( $this->plugin_name ) . '" ', $deactivation_link );
30
+ $links['deactivate'] = $deactivation_link;
31
+ }
32
+ return $links;
33
+ }
34
+
35
+ /**
36
+ * Form text strings
37
+ * These can be filtered
38
+ * @since 1.0.0
39
+ */
40
+ public function goodbye_ajax() {
41
+ // Get our strings for the form
42
+ $form = $this->get_form_info();
43
+
44
+ // Build the HTML to go in the form
45
+ $html = '<div class="epsilon-deactivate-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
46
+ $html .= '<div class="epsilon-deactivate-form-body"><p>' . esc_html( $form['body'] ) . '</p>';
47
+ if( is_array( $form['options'] ) ) {
48
+ $html .= '<div class="epsilon-deactivate-options"><p>';
49
+ foreach( $form['options'] as $key => $option ) {
50
+ if ( 'features' == $key ) {
51
+ $html .= '<input type="radio" name="epsilon-deactivate-reason" checked="checked" id="' . esc_attr( $key ) . '" value="' . esc_attr( $key ) . '"> <label for="' . esc_attr( $key ) . '">' . esc_attr( $option ) . '</label><br>';
52
+ }else{
53
+ $html .= '<input type="radio" name="epsilon-deactivate-reason" id="' . esc_attr( $key ) . '" value="' . esc_attr( $key ) . '"> <label for="' . esc_attr( $key ) . '">' . esc_attr( $option ) . '</label><br>';
54
+ }
55
+ }
56
+ $html .= '</p><label id="epsilon-deactivate-details-label" for="epsilon-deactivate-reasons"><strong>' . esc_html( $form['details'] ) .'</strong></label><textarea name="epsilon-deactivate-details" id="epsilon-deactivate-details" rows="2" style="width:100%"></textarea>';
57
+ $html .= '<input type="checkbox" name="epsilon-deactivate-tracking" checked="" id="allow-tracking" value="yes"> <label for="allow-tracking">' . esc_html__( 'Allow us to get more information in order to improve our plugin', 'modula-gallery' ) . '</label><br>';
58
+ $html .= '</div><!-- .epsilon-deactivate-options -->';
59
+ }
60
+ $html .= '</div><!-- .epsilon-deactivate-form-body -->';
61
+ $html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'modula-gallery' ) . '</p>';
62
+ $html .= '<div class="epsilon-deactivate-form-footer"><p><a id="epsilon-deactivate-plugin" href="#">' . __( 'Just Deactivate', 'modula-gallery' ) . '</a><a id="epsilon-deactivate-submit-form" class="button button-primary" href="#">' . __( 'Submit and Deactivate', 'modula-gallery' ) . '</a></p></div>'
63
+ ?>
64
+ <div class="epsilon-deactivate-form-bg"></div>
65
+ <style type="text/css">
66
+ .epsilon-deactivate-form-active .epsilon-deactivate-form-bg {
67
+ background: rgba( 0, 0, 0, .5 );
68
+ position: fixed;
69
+ top: 0;
70
+ left: 0;
71
+ width: 100%;
72
+ height: 100%;
73
+ }
74
+ .epsilon-deactivate-form-wrapper {
75
+ position: relative;
76
+ z-index: 999;
77
+ display: none;
78
+ }
79
+ .epsilon-deactivate-form-active .epsilon-deactivate-form-wrapper {
80
+ display: block;
81
+ }
82
+ .epsilon-deactivate-form {
83
+ display: none;
84
+ }
85
+ .epsilon-deactivate-form-active .epsilon-deactivate-form {
86
+ position: absolute;
87
+ bottom: 30px;
88
+ left: 0;
89
+ max-width: 400px;
90
+ background: #fff;
91
+ white-space: normal;
92
+ }
93
+ .epsilon-deactivate-form-head {
94
+ background: #51AD31;
95
+ color: #fff;
96
+ padding: 8px 18px;
97
+ }
98
+ .epsilon-deactivate-form-body {
99
+ padding: 8px 18px;
100
+ color: #444;
101
+ }
102
+ .deactivating-spinner {
103
+ display: none;
104
+ }
105
+ .deactivating-spinner .spinner {
106
+ float: none;
107
+ margin: 4px 4px 0 18px;
108
+ vertical-align: bottom;
109
+ visibility: visible;
110
+ }
111
+ .epsilon-deactivate-form-footer {
112
+ padding: 8px 18px;
113
+ }
114
+ .epsilon-deactivate-form-footer p {
115
+ display: flex;
116
+ align-items: center;
117
+ justify-content: space-between;
118
+ }
119
+ .epsilon-deactivate-form.process-response .epsilon-deactivate-form-body,
120
+ .epsilon-deactivate-form.process-response .epsilon-deactivate-form-footer {
121
+ position: relative;
122
+ }
123
+ .epsilon-deactivate-form.process-response .epsilon-deactivate-form-body:after,
124
+ .epsilon-deactivate-form.process-response .epsilon-deactivate-form-footer:after {
125
+ content: "";
126
+ display: block;
127
+ position: absolute;
128
+ top: 0;
129
+ left: 0;
130
+ width: 100%;
131
+ height: 100%;
132
+ background-color: rgba( 255, 255, 255, .5 );
133
+ }
134
+ </style>
135
+ <script>
136
+ jQuery(document).ready(function($){
137
+ var deactivateURL = $("#epsilon-deactivate-link-<?php echo esc_attr( $this->plugin_name ); ?>"),
138
+ formContainer = $('#epsilon-deactivate-form-<?php echo esc_attr( $this->plugin_name ); ?>'),
139
+ detailsStrings = {
140
+ 'setup' : '<?php echo __( 'What was the dificult part ?', 'modula-gallery' ) ?>',
141
+ 'documentation' : '<?php echo __( 'What can we describe more ?', 'modula-gallery' ) ?>',
142
+ 'features' : '<?php echo __( 'How could we improve ?', 'modula-gallery' ) ?>',
143
+ 'better-plugin' : '<?php echo __( 'Can you mention it ?', 'modula-gallery' ) ?>',
144
+ 'incompatibility' : '<?php echo __( 'With what plugin or theme is incompatible ?', 'modula-gallery' ) ?>',
145
+ };
146
+
147
+ $( deactivateURL ).on("click",function(){
148
+ // We'll send the user to this deactivation link when they've completed or dismissed the form
149
+ var url = deactivateURL.attr( 'href' );
150
+ $('body').toggleClass('epsilon-deactivate-form-active');
151
+ formContainer.fadeIn();
152
+ formContainer.html( '<?php echo $html; ?>');
153
+
154
+ formContainer.on( 'change', 'input[name="epsilon-deactivate-reason"]', function(){
155
+ var detailsLabel = formContainer.find( '#epsilon-deactivate-details-label strong' );
156
+ var value = formContainer.find( 'input[name="epsilon-deactivate-reason"]:checked' ).val();
157
+ detailsLabel.text( detailsStrings[ value ] );
158
+ });
159
+
160
+ formContainer.on('click', '#epsilon-deactivate-submit-form', function(e){
161
+ var data = {
162
+ 'action': 'epsilon_deactivate_plugin',
163
+ 'security': "<?php echo wp_create_nonce ( 'epsilon_deactivate_plugin' ); ?>",
164
+ 'dataType': "json"
165
+ };
166
+ e.preventDefault();
167
+ // As soon as we click, the body of the form should disappear
168
+ formContainer.addClass( 'process-response' );
169
+ // Fade in spinner
170
+ formContainer.find(".deactivating-spinner").fadeIn();
171
+
172
+ data['reason'] = formContainer.find( 'input[name="epsilon-deactivate-reason"]:checked' ).val();
173
+ data['details'] = formContainer.find('#epsilon-deactivate-details').val();
174
+ data['tracking'] = formContainer.find( '#allow-tracking:checked' ).length;
175
+
176
+ $.post(
177
+ ajaxurl,
178
+ data,
179
+ function(response){
180
+ // Redirect to original deactivation URL
181
+ window.location.href = url;
182
+ }
183
+ );
184
+ });
185
+
186
+ formContainer.on('click', '#epsilon-deactivate-plugin', function(e){
187
+ e.preventDefault();
188
+ window.location.href = url;
189
+ });
190
+
191
+ // If we click outside the form, the form will close
192
+ $('.epsilon-deactivate-form-bg').on('click',function(){
193
+ formContainer.fadeOut();
194
+ $('body').removeClass('epsilon-deactivate-form-active');
195
+ });
196
+ });
197
+ });
198
+ </script>
199
+ <?php }
200
+
201
+ /*
202
+ * Form text strings
203
+ * These are non-filterable and used as fallback in case filtered strings aren't set correctly
204
+ * @since 1.0.0
205
+ */
206
+ public function get_form_info() {
207
+ $form = array();
208
+ $form['heading'] = __( 'Sorry to see you go', 'modula-gallery' );
209
+ $form['body'] = __( 'Before you deactivate the plugin, would you quickly give us your reason for doing so?', 'modula-gallery' );
210
+ $form['options'] = array(
211
+ 'setup' => __( 'Set up is too difficult', 'modula-gallery' ),
212
+ 'documentation' => __( 'Lack of documentation', 'modula-gallery' ),
213
+ 'features' => __( 'Not the features I wanted', 'modula-gallery' ),
214
+ 'better-plugin' => __( 'Found a better plugin', 'modula-gallery' ),
215
+ 'incompatibility' => __( 'Incompatible with theme or plugin', 'modula-gallery' ),
216
+ );
217
+ $form['details'] = __( 'How could we improve ?', 'modula-gallery' );
218
+ return $form;
219
+ }
220
+
221
+ public function epsilon_deactivate_plugin_callback() {
222
+
223
+ check_ajax_referer( 'epsilon_deactivate_plugin', 'security' );
224
+
225
+ if ( isset($_POST['reason']) && isset($_POST['details']) && isset($_POST['tracking']) ) {
226
+ require_once 'class-epsilon-plugin-request.php';
227
+ $args = array(
228
+ 'reason' => $_POST['reason'],
229
+ 'details' => $_POST['details'],
230
+ 'tracking' => $_POST['tracking'],
231
+ );
232
+ $request = new Epsilon_Plugin_Request( $this->plugin_file, $args );
233
+ if ( $request->request_successful ) {
234
+ echo json_encode( array(
235
+ 'status' => 'ok',
236
+ ) );
237
+ }else{
238
+ echo json_encode( array(
239
+ 'status' => 'nok',
240
+ ) );
241
+ }
242
+ }else{
243
+ echo json_encode( array(
244
+ 'status' => 'ok',
245
+ ) );
246
+ }
247
+
248
+ die();
249
+
250
+ }
251
+
252
+ }
lib/gallery-class.php CHANGED
@@ -63,19 +63,18 @@ if ( ! class_exists( "ModulaLiteFE" ) ) {
63
$args = array(
64
'post_type' => 'attachment',
65
'posts_per_page' => -1,
66
- 'include' => $ids
67
);
68
69
$this->wp_images = get_posts( $args );
70
- if ( $this->gallery->lightbox == "attachment-page" ) {
71
- foreach ( $this->wp_images as $att ) {
72
- $att->url = get_attachment_link( $att->ID );
73
-
74
- if ( $this->gallery->mode == MODULA_DB_MODE ) {
75
- //$this->images[$att->ID]->imagePath = $att->guid;
76
- $this->images[ $att->ID ]->url = $att->url;
77
- $this->images[ $att->ID ]->alt = get_post_meta( $att->ID, '_wp_attachment_image_alt', true );
78
- }
79
}
80
}
81
}
@@ -92,6 +91,7 @@ if ( ! class_exists( "ModulaLiteFE" ) ) {
92
$image->Id = $att->ID;
93
$image->imagePath = $att->guid;
94
$image->link = get_post_meta( $att->ID, "_modula_link", true );
95
96
switch ( $this->gallery->wp_field_caption ) {
97
case 'title':
@@ -231,36 +231,35 @@ if ( ! class_exists( "ModulaLiteFE" ) ) {
231
232
$html = "";
233
234
- $html .= "<style>\n";
235
236
if ( $this->gallery->borderSize ) {
237
- $html .= "#jtg-$this->id$rid .item { border: " . $this->gallery->borderSize . "px solid " . $this->gallery->borderColor . "; }\n";
238
}
239
240
if ( $this->gallery->borderRadius ) {
241
- $html .= "#jtg-$this->id$rid .item { border-radius: " . $this->gallery->borderRadius . "px; }\n";
242
}
243
244
if ( $this->gallery->shadowSize ) {
245
- $html .= "#jtg-$this->id$rid .item { box-shadow: " . $this->gallery->shadowColor . " 0px 0px " . $this->gallery->shadowSize . "px; }\n";
246
}
247
248
if ( $this->gallery->socialIconColor ) {
249
- $html .= "#jtg-$this->id$rid .item .jtg-social a { color: " . $this->gallery->socialIconColor . " }\n";
250
}
251
252
- $html .= "#jtg-$this->id$rid .item .caption { background-color: " . $this->gallery->captionColor . "; }\n";
253
-
254
- $html .= "#jtg-$this->id$rid .item .figc { color: " . $this->gallery->captionColor . "; font-size: " . $this->gallery->captionFontSize . "px; }\n";
255
256
- $html .= "#jtg-$this->id$rid .item .figc h2.jtg-title { font-size: " . $this->gallery->titleFontSize . "px; }\n";
257
258
- $html .= "#jtg-$this->id$rid .item { transform: scale(" . $gallery->loadedScale / 100 . ") translate(" . $gallery->loadedHSlide . 'px,' . $gallery->loadedVSlide . "px) rotate(" . $gallery->loadedRotate . "deg); }\n";
259
260
261
- $html .= "#jtg-$this->id$rid .items { width:" . $this->gallery->width . "; height:" . $this->gallery->height . "px; }\n";
262
263
- $html .= "#jtg-$this->id$rid .items .figc p.description { color:" . $this->gallery->captionColor . "; }\n";
264
265
266
if ( strlen( $this->gallery->style ) ) {
@@ -271,11 +270,12 @@ if ( ! class_exists( "ModulaLiteFE" ) ) {
271
272
$id = $this->id;
273
$html .= "<a name='$id'> </a>";
274
- $html .= "<div class='modula' id='jtg-$this->id$rid'>\n";
275
276
- $html .= "<div class='items'>\n";
277
278
foreach ( array_slice( $this->images, 0, 40 / 2 ) as $image ) {
279
$title = in_array( $this->gallery->lightbox, array(
280
'prettyphoto',
281
'fancybox',
@@ -298,50 +298,46 @@ if ( ! class_exists( "ModulaLiteFE" ) ) {
298
$imgUrl = $image->imagePath;
299
$image->alt = isset( $image->alt ) ? $image->alt : '';
300
301
- $html .= "\t<div class=\"item " . $hasTitle . " effect-" . $hoverEffect->code . "\">\n";
302
- $html .= "<a $title='$image->description' " . ( $this->gallery->lightbox == "lightbox2" && empty( $image->link ) ? "data-lightbox='gallery'" : "" ) . " rel='$rel' " . $this->getTarget( $image ) . " class='tile-inner " . ( $this->getLightboxClass( $image ) ) . "' " . $this->getLink( $image ) . ">\n";
303
- $html .= "\t\t<img data-valign='$image->valign' alt='$image->alt' data-halign='$image->halign' class='pic' src='$imgUrl' data-src='$imgUrl' />\n";
304
- $html .= "\t\t<div class=\"figc\">\n";
305
- $html .= "\t\t\t<div class=\"figc-inner\">\n";
306
- if ( $this->gallery->hoverEffect != 'none' && ! empty( $image->title ) ) {
307
- $html .= "\t\t\t\t<h2 class='jtg-title'>" . $image->title . "</h2>\n";
308
}
309
310
- if ( ( $hoverEffect->allowSubtitle && ! empty( $image->description ) ) ||
311
- empty( $this->gallery->hoverEffect ) ) {
312
- $html .= "\t\t\t\t\t<p class=\"description\">";
313
- if ( $hoverEffect->allowSubtitle || empty( $this->gallery->hoverEffect ) ) {
314
- $html .= $image->description;
315
- }
316
- $html .= "</p>\n";
317
}
318
- $html .= "\t\t\t</div>\n";
319
- $html .= "\t\t</div>\n";
320
- $html .= "\t</a>\n";
321
- $html .= "\t</div>\n";
322
}
323
324
325
- $html .= "\t</div>\n";
326
- $html .= "</div>\n";
327
328
- $html .= "<script type='text/javascript'>\n";
329
- $html .= "\tjQuery('#jtg-$this->id$rid').modulaGallery({\n";
330
331
if ( strlen( $this->gallery->script ) ) {
332
- $html .= "\t\tonComplete: function () { " . stripslashes( $this->gallery->script ) . "},\n";
333
}
334
335
- $html .= "\t\tresizer: '" . plugins_url( 'modula-best-grid-gallery/image.php', '' ) . "',\n";
336
- $html .= "\t\tmargin: " . $this->gallery->margin . ",\n";
337
// $html .= "\t\tkeepArea: " . ($this->gallery->keepArea == "T" ? "true" : "false") . ",\n";
338
- $html .= "\t\tenableTwitter: " . ( $this->gallery->enableTwitter == "T" ? "true" : "false" ) . ",\n";
339
- $html .= "\t\tenableFacebook: " . ( $this->gallery->enableFacebook == "T" ? "true" : "false" ) . ",\n";
340
- $html .= "\t\tenablePinterest: " . ( $this->gallery->enablePinterest == "T" ? "true" : "false" ) . ",\n";
341
- $html .= "\t\tenableGplus: " . ( $this->gallery->enableGplus == "T" ? "true" : "false" ) . ",\n";
342
- $html .= "\t\trandomFactor: " . ( $this->gallery->randomFactor / 100 ) . ",\n";
343
- $html .= "\t});\n";
344
-
345
$html .= "</script>";
346
347
63
$args = array(
64
'post_type' => 'attachment',
65
'posts_per_page' => -1,
66
+ 'include' => $ids,
67
+ 'suppress_filters' => 0,
68
);
69
70
$this->wp_images = get_posts( $args );
71
+ foreach ( $this->wp_images as $att ) {
72
+ $att->url = get_attachment_link( $att->ID );
73
+
74
+ if ( $this->gallery->mode == MODULA_DB_MODE ) {
75
+ //$this->images[$att->ID]->imagePath = $att->guid;
76
+ $this->images[ $att->ID ]->url = $att->url;
77
+ $this->images[ $att->ID ]->alt = get_post_meta( $att->ID, '_wp_attachment_image_alt', true );
78
}
79
}
80
}
91
$image->Id = $att->ID;
92
$image->imagePath = $att->guid;
93
$image->link = get_post_meta( $att->ID, "_modula_link", true );
94
+ $image->alt = get_post_meta( $att->ID, '_wp_attachment_image_alt', true );
95
96
switch ( $this->gallery->wp_field_caption ) {
97
case 'title':
231
232
$html = "";
233
234
+ $html .= "<style>";
235
236
if ( $this->gallery->borderSize ) {
237
+ $html .= "#jtg-$this->id$rid .item { border: " . $this->gallery->borderSize . "px solid " . $this->gallery->borderColor . "; }";
238
}
239
240
if ( $this->gallery->borderRadius ) {
241
+ $html .= "#jtg-$this->id$rid .item { border-radius: " . $this->gallery->borderRadius . "px; }";
242
}
243
244
if ( $this->gallery->shadowSize ) {
245
+ $html .= "#jtg-$this->id$rid .item { box-shadow: " . $this->gallery->shadowColor . " 0px 0px " . $this->gallery->shadowSize . "px; }";
246
}
247
248
if ( $this->gallery->socialIconColor ) {
249
+ $html .= "#jtg-$this->id$rid .item .jtg-social a { color: " . $this->gallery->socialIconColor . " }";
250
}
251
252
+ $html .= "#jtg-$this->id$rid .item .caption { background-color: " . $this->gallery->captionColor . "; }";
253
254
+ $html .= "#jtg-$this->id$rid .item .figc { color: " . $this->gallery->captionColor . "; font-size: " . $this->gallery->captionFontSize . "px; }";
255
256
+ $html .= "#jtg-$this->id$rid .item .figc h2.jtg-title { font-size: " . $this->gallery->titleFontSize . "px; }";
257
258
+ $html .= "#jtg-$this->id$rid .item { transform: scale(" . $gallery->loadedScale / 100 . ") translate(" . $gallery->loadedHSlide . 'px,' . $gallery->loadedVSlide . "px) rotate(" . $gallery->loadedRotate . "deg); }";
259
260
+ $html .= "#jtg-$this->id$rid .items { width:" . $this->gallery->width . "; height:" . $this->gallery->height . "px; }";
261
262
+ $html .= "#jtg-$this->id$rid .items .figc p.description { color:" . $this->gallery->captionColor . "; }";
263
264
265
if ( strlen( $this->gallery->style ) ) {
270
271
$id = $this->id;
272
$html .= "<a name='$id'> </a>";
273
+ $html .= "<div class='modula' id='jtg-$this->id$rid'>";
274
275
+ $html .= "<div class='items'>";
276
277
foreach ( array_slice( $this->images, 0, 40 / 2 ) as $image ) {
278
+
279
$title = in_array( $this->gallery->lightbox, array(
280
'prettyphoto',
281
'fancybox',
298
$imgUrl = $image->imagePath;
299
$image->alt = isset( $image->alt ) ? $image->alt : '';
300
301
+ $html .= "<div class=\"item " . $hasTitle . " effect-" . $hoverEffect->code . "\">";
302
+ $html .= "<a $title='$image->description' " . ( $this->gallery->lightbox == "lightbox2" && empty( $image->link ) ? "data-lightbox='$rel'" : "" ) . " rel='$rel' " . $this->getTarget( $image ) . " class='tile-inner " . ( $this->getLightboxClass( $image ) ) . "' " . $this->getLink( $image ) . "></a>";
303
+ $html .= "<img data-valign='$image->valign' alt='$image->alt' data-halign='$image->halign' class='pic' src='$imgUrl' data-src='$imgUrl' />";
304
+ $html .= "<div class=\"figc\">";
305
+ $html .= "<div class=\"figc-inner\">";
306
+ if ( $this->gallery->hoverEffect != 'none' && ! empty( $image->title ) && 'T' != $this->gallery->hide_title ) {
307
+ $html .= "<h2 class='jtg-title'>" . $image->title . "</h2>";
308
}
309
310
+ if ( ( $this->gallery->hoverEffect != 'none' && ! empty( $image->description ) ) && 'T' != $this->gallery->hide_description ) {
311
+ $html .= "<p class=\"description\">";
312
+ $html .= $image->description;
313
+ $html .= "</p>";
314
}
315
+ $html .= "</div>";
316
+ $html .= "</div>";
317
+ $html .= "</a>";
318
+ $html .= "</div>";
319
}
320
321
322
+ $html .= "</div>";
323
+ $html .= "</div>";
324
325
+ $html .= "<script type='text/javascript'>";
326
+ $html .= "jQuery('#jtg-$this->id$rid').modulaGallery({";
327
328
if ( strlen( $this->gallery->script ) ) {
329
+ $html .= "onComplete: function () { " . stripslashes( $this->gallery->script ) . "},";
330
}
331
332
+ $html .= "resizer: '" . plugins_url( 'modula-best-grid-gallery/image.php', '' ) . "',";
333
+ $html .= "margin: " . $this->gallery->margin . ",";
334
// $html .= "\t\tkeepArea: " . ($this->gallery->keepArea == "T" ? "true" : "false") . ",\n";
335
+ $html .= "enableTwitter: " . ( $this->gallery->enableTwitter == "T" ? "true" : "false" ) . ",";
336
+ $html .= "enableFacebook: " . ( $this->gallery->enableFacebook == "T" ? "true" : "false" ) . ",";
337
+ $html .= "enablePinterest: " . ( $this->gallery->enablePinterest == "T" ? "true" : "false" ) . ",";
338
+ $html .= "enableGplus: " . ( $this->gallery->enableGplus == "T" ? "true" : "false" ) . ",";
339
+ $html .= "randomFactor: " . ( $this->gallery->randomFactor / 100 ) . ",";
340
+ $html .= "});";
341
$html .= "</script>";
342
343
lightbox/lightbox2/css/lightbox.css ADDED
@@ -0,0 +1,207 @@