WP Lightbox 2 - Version 3.0.5

Version Description

  • Fix: WordPress 4.3 compatibility
Download this release

Release Info

Developer n7studios
Plugin Icon 128x128 WP Lightbox 2
Version 3.0.5
Comparing to
See all releases

Code changes from version 3.0.4 to 3.0.5

about.php DELETED
File without changes
admin/admin_menu.php CHANGED
@@ -1,6 +1,5 @@
1
  <?php
2
  require_once($this->plugin_path.'admin/general_settings.php');
3
- require_once($this->plugin_path.'admin/design_settings.php');
4
 
5
  class wp_lightbox_admin_menu{
6
 
@@ -13,18 +12,14 @@ class wp_lightbox_admin_menu{
13
  private $plugin_path;
14
 
15
  private $text_parametrs;
16
-
17
- public $wp_lightbox_2_design_settings_page;
18
-
19
  public $wp_lightbox_2_general_settings_page;
20
 
21
  function __construct($param){
22
  $this->menu_name='WP Lightbox 2';
23
  $this->databese_parametrs=$param['databese_parametrs']->get_general_settings;
24
- $this->databese_design_parametrs=$param['databese_parametrs']->get_design_settings;
25
 
26
  $this->wp_lightbox_2_general_settings_page =new wp_lightbox_2_general_settings_page( array( 'plugin_url'=> $this->plugin_url, 'plugin_path' => $this->plugin_path,'databese_settings' =>$this->databese_parametrs));
27
- $this->wp_lightbox_2_design_settings_page =new wp_lightbox_2_design_settings_page( array( 'plugin_url' => $this->plugin_url, 'plugin_path' => $this->plugin_path,'databese_settings' =>$this->databese_design_parametrs));
28
 
29
  // set plugin url
30
  if(isset($param['plugin_url']))
@@ -57,9 +52,7 @@ class wp_lightbox_admin_menu{
57
 
58
  $manage_page_main = add_menu_page( $this->menu_name, $this->menu_name, 'manage_options', str_replace( ' ', '-', $this->menu_name), array($this->wp_lightbox_2_general_settings_page, 'controller_page'),$this->plugin_url.'admin/images/icon_lightboxx2.png');
59
  add_submenu_page( str_replace( ' ', '-', $this->menu_name), 'General settings', 'General settings', 'manage_options', str_replace( ' ', '-', $this->menu_name), array($this->wp_lightbox_2_general_settings_page, 'controller_page'));
60
- $page_widget = add_submenu_page( str_replace( ' ', '-', $this->menu_name), 'Design settings', 'Design settings', 'manage_options', 'wplightbox2-design', array($this->wp_lightbox_2_design_settings_page, 'controller_page'));
61
  add_action('admin_print_styles-' .$manage_page_main, array($this,'menu_requeried_scripts'));
62
- add_action('admin_print_styles-' .$page_widget, array($this,'menu_requeried_scripts'));
63
  }
64
  public function menu_requeried_scripts(){
65
  wp_enqueue_script('jquery-ui-style');
1
  <?php
2
  require_once($this->plugin_path.'admin/general_settings.php');
 
3
 
4
  class wp_lightbox_admin_menu{
5
 
12
  private $plugin_path;
13
 
14
  private $text_parametrs;
15
+
 
 
16
  public $wp_lightbox_2_general_settings_page;
17
 
18
  function __construct($param){
19
  $this->menu_name='WP Lightbox 2';
20
  $this->databese_parametrs=$param['databese_parametrs']->get_general_settings;
 
21
 
22
  $this->wp_lightbox_2_general_settings_page =new wp_lightbox_2_general_settings_page( array( 'plugin_url'=> $this->plugin_url, 'plugin_path' => $this->plugin_path,'databese_settings' =>$this->databese_parametrs));
 
23
 
24
  // set plugin url
25
  if(isset($param['plugin_url']))
52
 
53
  $manage_page_main = add_menu_page( $this->menu_name, $this->menu_name, 'manage_options', str_replace( ' ', '-', $this->menu_name), array($this->wp_lightbox_2_general_settings_page, 'controller_page'),$this->plugin_url.'admin/images/icon_lightboxx2.png');
54
  add_submenu_page( str_replace( ' ', '-', $this->menu_name), 'General settings', 'General settings', 'manage_options', str_replace( ' ', '-', $this->menu_name), array($this->wp_lightbox_2_general_settings_page, 'controller_page'));
 
55
  add_action('admin_print_styles-' .$manage_page_main, array($this,'menu_requeried_scripts'));
 
56
  }
57
  public function menu_requeried_scripts(){
58
  wp_enqueue_script('jquery-ui-style');
admin/design_settings.php DELETED
@@ -1,474 +0,0 @@
1
- <?php
2
- class wp_lightbox_2_design_settings_page{
3
- private $menu_name;
4
- private $databese_settings;
5
- public $initial_values;
6
-
7
-
8
- function __construct($params){
9
- // set plugin url
10
- if(isset($params['plugin_url']))
11
- $this->plugin_url=$params['plugin_url'];
12
- else
13
- $this->plugin_url=trailingslashit(dirname(plugins_url('',__FILE__)));
14
- // set plugin path
15
- if(isset($params['plugin_path']))
16
- $this->plugin_path=$params['plugin_path'];
17
- else
18
- $this->plugin_path=trailingslashit(dirname(plugin_dir_path('',__FILE__)));
19
-
20
- $this->databese_settings=$params['databese_settings'];
21
-
22
- /*ajax parametrs*/
23
- add_action( 'wp_ajax_save_in_databese_lightbox2_design', array($this,'save_parametrs') );
24
-
25
- }
26
- public function save_parametrs(){
27
- $initial_values=array( 'jqlb_overlay_opacity'=>'80');
28
- $kk=1;
29
- if(isset($_POST['wp_lightbox_2_design_settings_page']) && wp_verify_nonce( $_POST['wp_lightbox_2_design_settings_page'],'wp_lightbox_2_design_settings_page')){
30
-
31
- foreach($initial_values as $key => $value){
32
- if(isset($_POST[$key])){
33
- update_option($key,stripslashes($_POST[$key]));
34
- }
35
- else{
36
- $kk=0;
37
- printf('error saving %s <br>',$key);
38
- }
39
- }
40
- }
41
- else{
42
- die('Authorization Problem ');
43
- }
44
- if($kk==0){
45
- exit;
46
- }
47
- die('sax_normala');
48
- }
49
- /*#################### CONTROLERRR ########################*/
50
- /*#################### CONTROLERRR ########################*/
51
- /*#################### CONTROLERRR ########################*/
52
- public function controller_page(){
53
-
54
- $this->display_table_list_answers();
55
- }
56
-
57
-
58
- private function display_table_list_answers(){
59
-
60
- $initial_values= $this->databese_settings;
61
-
62
-
63
- foreach($initial_values as $key => $value){
64
- $$key=$value;
65
- }
66
- ?>
67
-
68
- <style>
69
- .popup_settings{
70
- <?php echo $youtube_plus_show_popup?'':'display:none;'; ?>
71
- }
72
- .pro_subtitle_span{
73
- color: rgba(10, 154, 62, 1);
74
- }
75
- </style>
76
- <h2>Lightbox Design Settings</h2>
77
- <div class="main_yutube_plus_params">
78
- <table class="wp-list-table widefat fixed posts wp_lightbox2_settings_table" style="width: 900px; min-width:320px !important;table-layout: fixed;">
79
- <thead>
80
- <tr>
81
- <th width="60%">
82
- <span> Lightbox Design Settings </span>
83
- </th>
84
- <th width="40%">
85
- <span style="float:right"><a href="http://wpdevart.com/wordpress-lightbox-plugin/" target="_blank" style="color: rgba(10, 154, 62, 1);; font-weight: bold; font-size: 18px; text-decoration: none;">Upgrade to Pro Version</a><br></span>
86
- </th>
87
-
88
- </tr>
89
- </thead>
90
- <tbody>
91
- <tr>
92
- <td>
93
- Overlay opacity: <span title="Set overlay opacity for lightbox." class="desription_class">?</span>
94
- </td>
95
- <td>
96
- <input type="text" name="jqlb_overlay_opacity" id="jqlb_overlay_opacity" class="slider_input" value="<?php echo $jqlb_overlay_opacity; ?>">
97
- <div class="slider_parametrs" id="jqlb_overlay_opacity_div"></div>
98
- <span id="jqlb_overlay_opacity_span" class="slider_span"></span>
99
-
100
- </td>
101
- </tr>
102
- <tr>
103
- <td>
104
- Overlay color:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Choose overlay opacity for lightbox." class="desription_class">?</span>
105
- </td>
106
- <td>
107
- <div class="disabled_for_pro" onclick="alert(text_of_upgrate_version)">
108
- <div class="wp-picker-container"><a tabindex="0" class="wp-color-result" title="Select Color" data-current="Current Color" style="background-color: rgb(0, 0, 0);"></a></div>
109
- </div>
110
- </td>
111
- </tr>
112
- <tr>
113
- <td>
114
- Overlay close function:<span class='pro_subtitle_span'>Pro feature!</span><span title="This function will close the lightbox when you click on overlay. " class="desription_class">?</span>
115
- </td>
116
- <td class="radio_input">
117
- <label onMouseDown="alert(text_of_upgrate_version); return false;"><input type="radio" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_overlay_close_radio" checked="checked" value="1">Yes</label>
118
- <label onMouseDown="alert(text_of_upgrate_version); return false;"><input type="radio" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_overlay_close_radio" value="0">No</label>
119
-
120
- </td>
121
- </tr>
122
- <tr>
123
- <td>
124
- Lightbox image Border width:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Type here Lightbox image Border width." class="desription_class">?</span>
125
- </td>
126
- <td>
127
- <input type="text" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_border_width" id="jqlb_border_width" value="<?php echo $jqlb_border_width; ?>"><small>(px)</small>
128
- </td>
129
- </tr>
130
- <tr>
131
- <td>
132
- Lightbox image Border color:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Choose Border color for Lightbox image." class="desription_class">?</span>
133
- </td>
134
- <td>
135
- <div class="disabled_for_pro" onclick="alert(text_of_upgrate_version)">
136
- <div class="wp-picker-container"><a tabindex="0" class="wp-color-result" title="Select Color" data-current="Current Color" style="background-color: rgb(255, 255, 255);"></a></div>
137
- </div>
138
- </td>
139
- </tr>
140
- <tr>
141
- <td>
142
- Lightbox image Border radius:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Type here Lightbox image Border radius." class="desription_class">?</span>
143
- </td>
144
- <td>
145
- <input type="text" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_border_radius" id="jqlb_border_radius" value="<?php echo $jqlb_border_radius; ?>"><small>(px)</small>
146
- </td>
147
- </tr>
148
- <tr>
149
- <td>
150
- Show/Hide image numbers (ex. Image 1 of 3):<span class='pro_subtitle_span'>Pro feature!</span> <span title="Choose to show or hide numbers for images." class="desription_class">?</span>
151
- </td>
152
- <td class="radio_input">
153
- <label onMouseDown="alert(text_of_upgrate_version); return false;"><input type="radio" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_show_text_for_image_radio" checked="checked" value="1">Show</label>
154
- <label onMouseDown="alert(text_of_upgrate_version); return false;"><input type="radio" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_show_text_for_image_radio" value="0">Hide</label>
155
- </td>
156
- </tr>
157
- <tr>
158
- <td>
159
- Image info and close button background opacity:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Set image info and close button background opacity." class="desription_class">?</span>
160
- </td>
161
- <td>
162
- <input onMouseDown="alert(text_of_upgrate_version); return false;" type="text" name="jqlb_image_info_background_transparency" id="jqlb_image_info_background_transparency" class="slider_input" value="<?php echo $jqlb_image_info_background_transparency; ?>">
163
- <div onMouseDown="alert(text_of_upgrate_version); return false;" class="slider_parametrs" id="jqlb_image_info_background_transparency_div"></div>
164
- <span onMouseDown="alert(text_of_upgrate_version); return false;" id="jqlb_image_info_background_transparency_span" class="slider_span"></span>
165
-
166
- </td>
167
- </tr>
168
- <tr>
169
- <td>
170
- Image info and close button background color:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Set Image info and close button background color." class="desription_class">?</span>
171
- </td>
172
- <td>
173
- <div class="disabled_for_pro" onclick="alert(text_of_upgrate_version)">
174
- <div class="wp-picker-container"><a tabindex="0" class="wp-color-result" title="Select Color" data-current="Current Color" style="background-color: rgb(255, 255, 255);"></a></div>
175
- </div>
176
- </td>
177
- </tr>
178
- <tr>
179
- <td>
180
- Image info text color (include download link and other text):<span class='pro_subtitle_span'>Pro feature!</span> <span title="Set Image info text color." class="desription_class">?</span>
181
- </td>
182
- <td>
183
- <div class="disabled_for_pro" onclick="alert(text_of_upgrate_version)">
184
- <div class="wp-picker-container"><a tabindex="0" class="wp-color-result" title="Select Color" data-current="Current Color" style="background-color: rgb(0, 0, 0);"></a></div>
185
- </div>
186
- </td>
187
- </tr>
188
- </tr>
189
- <tr>
190
- <td>
191
- Image info text font-size (include download link and other text):<span class='pro_subtitle_span'>Pro feature!</span> <span title="Type Image info text font-size (include download link and other text)" class="desription_class">?</span>
192
- </td>
193
- <td>
194
- <input type="text" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_image_info_text_fontsize" id="jqlb_image_info_text_fontsize" value="10"><small>(px)</small>
195
- </td>
196
- </tr>
197
- <tr>
198
- <td>
199
- Next image title tag:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Type here next image title tag." class="desription_class">?</span>
200
- </td>
201
- <td>
202
- <input type="text" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_next_image_title" id="jqlb_next_image_title" value="<?php echo __('next image', 'jqlb'); ?>">
203
- </td>
204
- </tr>
205
- <tr>
206
- <td>
207
- Previous image title tag:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Type here previous image title tag." class="desription_class">?</span>
208
- </td>
209
- <td>
210
- <input type="text" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_previous_image_title" id="jqlb_previous_image_title" value="<?php echo __('previous image', 'jqlb'); ?>">
211
- </td>
212
- </tr>
213
-
214
- <tr>
215
- <td>
216
- Choose next/Previous button image:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Choose Next/Previous button for lightbox." class="desription_class">?</span>
217
- </td>
218
- <td class="radio_input">
219
- <select onMouseDown="alert(text_of_upgrate_version); return false;" id="theme_for_next_previus">
220
- <option value="">Standart</option>
221
- <option value="theme0">Theme1</option>
222
- <option value="theme1">Theme2</option>
223
- <option value="theme2">Theme3</option>
224
- <option value="theme3">Theme4</option>
225
- <option value="theme4">Theme5</option>
226
- <option value="theme5">Theme6</option>
227
- <option value="theme6">Theme7</option>
228
- <option value="theme7">Theme8</option>
229
- <option value="theme8">Theme9</option>
230
- <option value="theme9">Theme10</option>
231
- <option value="theme10">Theme11</option>
232
- </select><small>or choose custom</small> <br /> <br />
233
- <div class="option_group next_button">
234
- <div style="display:inline-block; float:left;height: 60px;">
235
- <input class="upload-button button-secondary action" onMouseDown="alert(text_of_upgrate_version); return false;" style="width:114px;" type="button" value=" Upload Next "/>
236
- <input type="text" class="upload" id="jqlb_next_button_image" name="jqlb_next_button_image" size="15" value="<?php echo $jqlb_next_button_image ?>"/>
237
- </div>
238
- <span style="height:60px;display: inline-block;">
239
- <img src="<?php echo $jqlb_next_button_image ?>" style="max-width:60px; max-height:60px;"/>
240
- </span>
241
- </div>
242
- <div class="option_group previous_button">
243
- <div style="display:inline-block; float:left;height: 60px;">
244
- <input class="upload-button button-secondary action" onMouseDown="alert(text_of_upgrate_version); return false;" type="button" value="Upload Previus"/>
245
- <input type="text" class="upload" id="jqlb_previous_button_image" name="jqlb_previous_button_image" size="15" value="<?php echo $jqlb_previous_button_image ?>"/>
246
- </div>
247
- <span style="height:60px;display: inline-block;">
248
- <img src="<?php echo $jqlb_previous_button_image ?>" style="max-width:60px; max-height:60px;" />
249
- </span>
250
- </div>
251
- </td>
252
- </tr>
253
- <tr>
254
- <td>
255
- Maximum Width:<span class='pro_subtitle_span'>Pro feature!</span> <span title=" Type maximum width for lightbox images." class="desription_class">?</span>
256
- </td>
257
- <td>
258
- <input type="text" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_maximum_width" id="jqlb_maximum_width" value="<?php echo $jqlb_maximum_width; ?>"><small>(px)</small>
259
- </td>
260
- </tr>
261
- <tr>
262
- <td>
263
- Maximum Height:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Type maximum height for lightbox images." class="desription_class">?</span>
264
- </td>
265
- <td>
266
- <input type="text" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_maximum_height" id="jqlb_maximum_height" value="<?php echo $jqlb_maximum_height; ?>"><small>(px)</small>
267
- </td>
268
- </tr>
269
- <tr>
270
- <td>
271
- Show/Hide close button:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Choose to show or hide close button." class="desription_class">?</span>
272
- </td>
273
- <td class="radio_input">
274
- <label onMouseDown="alert(text_of_upgrate_version); return false;"><input onMouseDown="alert(text_of_upgrate_version); return false;" type="radio" name="jqlb_show_close_button_radio" <?php checked($jqlb_show_close_button,'1'); ?> value="1">Show</label>
275
- <label onMouseDown="alert(text_of_upgrate_version); return false;"><input onMouseDown="alert(text_of_upgrate_version); return false;" type="radio" name="jqlb_show_close_button_radio" <?php checked($jqlb_show_close_button,'0'); ?> value="0">Hide</label>
276
- </td>
277
- </tr>
278
- <tr>
279
- <td>
280
- Close button max height:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Type here close button max height." class="desription_class">?</span>
281
- </td>
282
- <td>
283
- <input type="text" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_close_image_max_heght" id="jqlb_close_image_max_heght" value="<?php echo $jqlb_close_image_max_heght; ?>"><small>(px)</small>
284
- </td>
285
- </tr>
286
- <tr>
287
- <td>
288
- Close button image title tag:<span class='pro_subtitle_span'>Pro feature!</span> <span title="Type here close button image title tag." class="desription_class">?</span>
289
- </td>
290
- <td>
291
- <input type="text" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_close_image_title" id="jqlb_close_image_title" value="<?php echo $jqlb_close_image_title; ?>">
292
- </td>
293
- </tr>
294
- <tr>
295
- <td>
296
- Lightbox close button image:<span class='pro_subtitle_span'>Pro feature!</span><span title="Choose one, or upload your own image for close button." class="desription_class">?</span>
297
- </td>
298
- <td class="radio_input">
299
- <select onMouseDown="alert(text_of_upgrate_version); return false;" id="theme_for_close_image">
300
- <option value="">Standart</option>
301
- <option value="theme0">Theme1</option>
302
- <option value="theme1">Theme2</option>
303
- <option value="theme2">Theme3</option>
304
- <option value="theme3">Theme4</option>
305
- <option value="theme4">Theme5</option>
306
- <option value="theme4">Theme6</option>
307
- </select><small>or choose custom</small> <br /> <br />
308
- <div class="option_group">
309
- <div style="display:inline-block; float:left;height: 60px;">
310
- <input class="upload-button button-secondary action" onMouseDown="alert(text_of_upgrate_version); return false;" type="button" value="Upload Image"/>
311
- <input type="text" class="upload" id="jqlb_image_for_close_lightbox" name="jqlb_image_for_close_lightbox" size="15" value="<?php echo $jqlb_image_for_close_lightbox ?>"/>
312
- </div>
313
- <span style="height:60px;display: inline-block;">
314
- <img src="<?php echo $jqlb_image_for_close_lightbox ?>" style="max-width:60px; max-height:60px;" />
315
- </span>
316
- </div>
317
- </td>
318
- </tr>
319
- <tr>
320
- <td>
321
- Keyboard navigation:<span class='pro_subtitle_span'>Pro feature!</span> <span title="With this feature users also can change images with keyboard." class="desription_class">?</span>
322
- </td>
323
- <td class="radio_input">
324
- <label onMouseDown="alert(text_of_upgrate_version); return false;"><input type="radio" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_keyboard_navigation_radio" checked='checked' value="1">Enable</label>
325
- <label onMouseDown="alert(text_of_upgrate_version); return false;"><input type="radio" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_keyboard_navigation_radio" value="0">Disable</label>
326
-
327
- </td>
328
- </tr>
329
- <tr>
330
- <td>
331
- Fix position for lightbox:<span class='pro_subtitle_span'>Pro feature!</span><span title=" That's mean your lightbox shouldn't change position when users scroll up or down." class="desription_class">?</span>
332
- </td>
333
- <td class="radio_input">
334
- <label onMouseDown="alert(text_of_upgrate_version); return false;"><input type="radio" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_popup_size_fix_radio" value="1">Fix</label>
335
- <label onMouseDown="alert(text_of_upgrate_version); return false;"><input type="radio" onMouseDown="alert(text_of_upgrate_version); return false;" name="jqlb_popup_size_fix_radio" checked="checked" value="0">Normal</label>
336
-
337
- </td>
338
- </tr>
339
- </tbody>
340
- <tfoot>
341
- <tr>
342
- <th colspan="2" width="100%"><button type="button" id="save_button_general" class="save_button button button-primary"><span class="save_button_span">Save Settings</span> <span class="saving_in_progress"> </span><span class="sucsses_save"> </span><span class="error_in_saving"> </span></button></th>
343
- </tr>
344
- </tfoot>
345
- </table>
346
- <?php wp_nonce_field('wp_lightbox_2_design_settings_page','wp_lightbox_2_design_settings_page'); ?>
347
- </div><br /><br /><span class="error_massage"></span>
348
-
349
- <script>
350
-
351
- text_of_upgrate_version="If you want to use this feature upgrade to Wp Lightbox 2 Pro";
352
-
353
- jQuery(document).ready(function(e) {
354
- jQuery('.upload-button').click(function () {
355
-
356
- window.parent.uploadID = jQuery(this).next('input');
357
- window.parent.upimageID = jQuery(this).parent().parent().find('img');
358
- /*grab the specific input*/
359
- formfield = jQuery('.upload').attr('name');
360
- tb_show('', 'media-upload.php?type=image&height=640&width=1000&TB_iframe=true');
361
- return false;
362
- });
363
- window.send_to_editor = function (html) {
364
- imgurl = jQuery('img', html).attr('src');
365
- window.parent.uploadID.val(imgurl);
366
- window.parent.upimageID.attr('src',imgurl);
367
- /*assign the value to the input*/
368
- tb_remove();
369
- };
370
- jQuery('#theme_for_next_previus').change(function(){
371
-
372
- var next_button_link='next.gif';
373
- if(jQuery(this).val()!='')
374
- next_button_link=jQuery(this).val()+'/next.png';
375
-
376
- var previous_button_link='prev.gif';
377
- if(jQuery(this).val()!='')
378
- previous_button_link=jQuery(this).val()+'/prev.png';
379
-
380
- jQuery(this).parent().find('.next_button .upload').val('<?php echo $this->plugin_url; ?>styles/images/'+next_button_link);
381
- jQuery(this).parent().find('.previous_button .upload').val('<?php echo $this->plugin_url; ?>styles/images/'+previous_button_link);
382
- jQuery(this).parent().find('.next_button img').attr('src','<?php echo $this->plugin_url; ?>styles/images/'+next_button_link);
383
- jQuery(this).parent().find('.previous_button img').attr('src','<?php echo $this->plugin_url; ?>styles/images/'+previous_button_link);
384
- });
385
- jQuery('#theme_for_close_image').change(function(){
386
-
387
- var close_button_link='closelabel.gif';
388
- if(jQuery(this).val()!='')
389
- close_button_link=jQuery(this).val()+'/closelabel.png';
390
-
391
- jQuery(this).parent().find('.option_group .upload').val('<?php echo $this->plugin_url; ?>styles/images/'+close_button_link);
392
- jQuery(this).parent().find('.option_group img').attr('src','<?php echo $this->plugin_url; ?>styles/images/'+close_button_link);
393
- })
394
-
395
-
396
-
397
- jQuery( "#jqlb_overlay_opacity_div" ).slider({
398
- range: "min",
399
- value: "<?php echo ($jqlb_overlay_opacity)?$jqlb_overlay_opacity:'100'; ?>",
400
- min: 0,
401
- max: 100,
402
- slide: function( event, ui ) {
403
- jQuery( "#jqlb_overlay_opacity" ).val( ui.value);
404
- jQuery( "#jqlb_overlay_opacity_span" ).html( ui.value+'%' );
405
- }
406
- });
407
- jQuery( "#jqlb_overlay_opacity_span" ).html( '<?php echo ($jqlb_overlay_opacity)?$jqlb_overlay_opacity:'100'; ?>%' );
408
- jQuery( "#jqlb_image_info_background_transparency_div" ).slider({
409
- range: "min",
410
- value: "<?php echo ($jqlb_image_info_background_transparency)?$jqlb_image_info_background_transparency:'100'; ?>",
411
- min: 0,
412
- max: 100,
413
- slide: function( event, ui ) {
414
- return false;
415
- }
416
- });
417
- jQuery( "#jqlb_image_info_background_transparency_span" ).html( '<?php echo ($jqlb_image_info_background_transparency)?$jqlb_image_info_background_transparency:'100'; ?>%' );
418
-
419
- jQuery( "#jqlb_overlay_color" ).wpColorPicker();
420
- jQuery( "#jqlb_border_color" ).wpColorPicker();
421
- jQuery( "#jqlb_image_info_text_color" ).wpColorPicker();
422
- jQuery( "#jqlb_image_info_bg_color" ).wpColorPicker();
423
-
424
- jQuery('#save_button_general').click(function(){
425
-
426
- jQuery('#save_button_general').addClass('padding_loading');
427
- jQuery("#save_button_general").prop('disabled', true);
428
- jQuery('.saving_in_progress').css('display','inline-block');
429
- generete_checkbox('parametr_chechbox');
430
- generete_radio_input('radio_input');
431
- jQuery.ajax({
432
- type:'POST',
433
- url: "<?php echo admin_url( 'admin-ajax.php?action=save_in_databese_lightbox2_design' ); ?>",
434
- data: {wp_lightbox_2_design_settings_page:jQuery('#wp_lightbox_2_design_settings_page').val()<?php foreach($initial_values as $key => $value){echo ','.$key.':jQuery("#'.$key.'").val()';} ?>},
435
- }).done(function(date) {
436
- if(date=='sax_normala'){
437
- jQuery('.saving_in_progress').css('display','none');
438
- jQuery('.sucsses_save').css('display','inline-block');
439
- setTimeout(function(){jQuery('.sucsses_save').css('display','none');jQuery('#save_button_general').removeClass('padding_loading');jQuery("#save_button_general").prop('disabled', false);},2500);
440
- }else{
441
- jQuery('.saving_in_progress').css('display','none');
442
- jQuery('.error_in_saving').css('display','inline-block');
443
- jQuery('.error_massage').css('display','inline-block');
444
- jQuery('.error_massage').html(date);
445
- setTimeout(function(){jQuery('#save_button_general').removeClass('padding_loading');jQuery("#save_button_general").prop('disabled', false);},5000);
446
- }
447
-
448
- });
449
- });
450
- function generete_radio_input(radio_class){
451
- jQuery('.'+radio_class).each(function(index, element) {
452
- jQuery(this).find('input[type=hidden]').val(jQuery(this).find('input[type=radio]:checked').val())
453
- });
454
- }
455
- function generete_checkbox(checkbox_class){
456
- jQuery('.'+checkbox_class).each(function(index, element) {
457
- if(jQuery(this).find('input[type=checkbox]').prop('checked'))
458
- jQuery(this).find('input[type=hidden]').val(jQuery(this).find('input[type=checkbox]:checked').val());
459
- else
460
- jQuery(this).find('input[type=hidden]').val(0);
461
- });
462
- }
463
-
464
- });
465
-
466
- </script>
467
-
468
- <?php
469
- }
470
-
471
- }
472
-
473
-
474
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/general_settings.php CHANGED
@@ -58,7 +58,7 @@ class wp_lightbox_2_general_settings_page{
58
  private function display_table_list_answers(){
59
 
60
  $initial_values= $this->databese_settings;
61
- foreach($initial_values as $key => $value){
62
  $$key=$value;
63
  }
64
  ?>
@@ -76,9 +76,9 @@ class wp_lightbox_2_general_settings_page{
76
  <th width="50%">
77
  <span> Lightbox General Settings </span>
78
  </th>
79
- <th width="50%">
80
- <span style="float:right"><a href="http://wpdevart.com/wordpress-lightbox-plugin/" target="_blank" style="color: rgba(10, 154, 62, 1);; font-weight: bold; font-size: 18px; text-decoration: none;">Upgrade to Pro Version</a><br></span>
81
- </th>
82
  </tr>
83
  </thead>
84
  <tbody>
@@ -109,6 +109,14 @@ class wp_lightbox_2_general_settings_page{
109
  <input type="hidden" name="jqlb_show_download" id="jqlb_show_download" value="<?php echo $jqlb_show_download; ?>">
110
  </td>
111
  </tr>
 
 
 
 
 
 
 
 
112
  <tr class="parametr_chechbox">
113
  <td>
114
  Show image info on top: <span title="Choose image info position." class="desription_class">?</span>
@@ -132,7 +140,7 @@ class wp_lightbox_2_general_settings_page{
132
  Minimum margin from top: <span title="You can change image position from top." class="desription_class">?</span>
133
  </td>
134
  <td>
135
- <input type="text" name="jqlb_margin_size" id="jqlb_margin_size" value="<?php echo $jqlb_margin_size; ?>"><span class="befor_input_small_desc">(default: 0)</span>
136
  </td>
137
  </tr>
138
  <tr>
@@ -140,7 +148,7 @@ class wp_lightbox_2_general_settings_page{
140
  Lightbox Animation duration: <span title="Type here animation duration for lightbox." class="desription_class">?</span>
141
  </td>
142
  <td>
143
- <input type="text" name="jqlb_resize_speed" id="jqlb_resize_speed" value="<?php echo $jqlb_resize_speed; ?>"><span class="befor_input_small_desc">(milliseconds)</span>
144
  </td>
145
  </tr>
146
  <tr>
@@ -158,6 +166,20 @@ class wp_lightbox_2_general_settings_page{
158
  </tr>
159
  </tfoot>
160
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  <?php wp_nonce_field('wp_lightbox_2_general_settings_page','wp_lightbox_2_general_settings_page'); ?>
162
  </div><br /><br /><span class="error_massage"></span>
163
 
58
  private function display_table_list_answers(){
59
 
60
  $initial_values= $this->databese_settings;
61
+ foreach($initial_values as $key => $value){
62
  $$key=$value;
63
  }
64
  ?>
76
  <th width="50%">
77
  <span> Lightbox General Settings </span>
78
  </th>
79
+ <th width="50%">
80
+ &nbsp;
81
+ </th>
82
  </tr>
83
  </thead>
84
  <tbody>
109
  <input type="hidden" name="jqlb_show_download" id="jqlb_show_download" value="<?php echo $jqlb_show_download; ?>">
110
  </td>
111
  </tr>
112
+ <tr>
113
+ <td>
114
+ Overlay opacity: <span title="Set overlay opacity for lightbox." class="desription_class">?</span>
115
+ </td>
116
+ <td>
117
+ <input type="number" min="0" max="100" step="1" name="jqlb_overlay_opacity" id="jqlb_overlay_opacity" value="<?php echo $jqlb_overlay_opacity; ?>"><span class="befor_input_small_desc">%</span>
118
+ </td>
119
+ </tr>
120
  <tr class="parametr_chechbox">
121
  <td>
122
  Show image info on top: <span title="Choose image info position." class="desription_class">?</span>
140
  Minimum margin from top: <span title="You can change image position from top." class="desription_class">?</span>
141
  </td>
142
  <td>
143
+ <input type="number" min="0" max="999" step="1" name="jqlb_margin_size" id="jqlb_margin_size" value="<?php echo $jqlb_margin_size; ?>"><span class="befor_input_small_desc">(default: 0)</span>
144
  </td>
145
  </tr>
146
  <tr>
148
  Lightbox Animation duration: <span title="Type here animation duration for lightbox." class="desription_class">?</span>
149
  </td>
150
  <td>
151
+ <input type="number" min="0" max="9999999" step="1" name="jqlb_resize_speed" id="jqlb_resize_speed" value="<?php echo $jqlb_resize_speed; ?>"><span class="befor_input_small_desc">(milliseconds)</span>
152
  </td>
153
  </tr>
154
  <tr>
166
  </tr>
167
  </tfoot>
168
  </table>
169
+ <ol>
170
+ <li>You can use WordPress image galleries and have them grouped and auto-lightboxed: <a href="http://codex.wordpress.org/Gallery_Shortcode"><code>[gallery link="file"]</code></a></li>
171
+ <li>You can also add a <code>rel="lightbox"</code> attribute to any link tag to activate the lightbox. For example:
172
+ <pre><code> &lt;a href=&quot;images/image-1.jpg&quot; rel=&quot;lightbox&quot; title=&quot;my caption&quot;&gt;image #1&lt;/a&gt;</code></pre>
173
+ <em>Optional:</em> Use the <code>title</code> attribute if you want to show a caption.
174
+ </li>
175
+ <li>If you have a set of related images that you would like to group, simply include a group name in the rel attribute. For example:
176
+ <pre><code> &lt;a href=&quot;images/image-1.jpg&quot; rel=&quot;lightbox[roadtrip]&quot;&gt;image #1&lt;/a&gt;
177
+ &lt;a href=&quot;images/image-2.jpg&quot; rel=&quot;lightbox[roadtrip]&quot;&gt;image #2&lt;/a&gt;
178
+ &lt;a href=&quot;images/image-3.jpg&quot; rel=&quot;lightbox[roadtrip]&quot;&gt;image #3&lt;/a&gt;</code></pre>
179
+ No limits to the number of image sets per page or how many images are allowed in each set. Go nuts!</li>
180
+ <li>To <strong>disable</strong> lightboxing of an image link, just set any other rel-attribute: <code>rel="nobox"</code></li>
181
+ </ol>
182
+
183
  <?php wp_nonce_field('wp_lightbox_2_general_settings_page','wp_lightbox_2_general_settings_page'); ?>
184
  </div><br /><br /><span class="error_massage"></span>
185
 
includes/install_database.php CHANGED
@@ -15,6 +15,7 @@ class wp_lightbox2_database_params{
15
  else
16
  $this->plugin_url=trailingslashit(dirname(plugins_url('',__FILE__)));
17
  $general_settings=array(
 
18
  'jqlb_help_text'=>'',
19
  'jqlb_margin_size'=>0,
20
  'jqlb_automate'=>1,
@@ -49,6 +50,8 @@ class wp_lightbox2_database_params{
49
  $folder='he_IL/';
50
  break;
51
  }
 
 
52
  $design_settings=array(
53
  'jqlb_overlay_opacity'=>'80',
54
  'jqlb_overlay_color'=>'#000000',
15
  else
16
  $this->plugin_url=trailingslashit(dirname(plugins_url('',__FILE__)));
17
  $general_settings=array(
18
+ 'jqlb_overlay_opacity'=>'80',
19
  'jqlb_help_text'=>'',
20
  'jqlb_margin_size'=>0,
21
  'jqlb_automate'=>1,
50
  $folder='he_IL/';
51
  break;
52
  }
53
+
54
+ // Note: Deprecated 3.0.5+
55
  $design_settings=array(
56
  'jqlb_overlay_opacity'=>'80',
57
  'jqlb_overlay_color'=>'#000000',
lightbox-2.php DELETED
File without changes
readme.txt CHANGED
@@ -4,8 +4,8 @@ Plugin Site: http://www.wpbeginner.com/
4
  Donate link: http://www.wpbeginner.com/
5
  Tags: lightbox, image, gallery, photo gallery, lightbox popup, responsive lightbox, wordpress lightbox, lightbox gallery, gallery lightbox, wordpress image lightbox, image lightbox, popup lightbox, wordpress slideshow lightbox, lightbox image, popup images, popup image, wordpress video gallery lightbox, google map lightbox popup, swipe, google map lightbox, popup bar, popup block
6
  Requires at least: 3.0
7
- Tested up to: 4.1
8
- Stable tag: 3.0.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -95,6 +95,9 @@ This plugin was created by <a href="https://syedbalkhi.com" rel="friend" title="
95
 
96
  == Changelog ==
97
 
 
 
 
98
  = 3.0.0 =
99
 
100
  * Created some important changes for Lightbox.
4
  Donate link: http://www.wpbeginner.com/
5
  Tags: lightbox, image, gallery, photo gallery, lightbox popup, responsive lightbox, wordpress lightbox, lightbox gallery, gallery lightbox, wordpress image lightbox, image lightbox, popup lightbox, wordpress slideshow lightbox, lightbox image, popup images, popup image, wordpress video gallery lightbox, google map lightbox popup, swipe, google map lightbox, popup bar, popup block
6
  Requires at least: 3.0
7
+ Tested up to: 4.3
8
+ Stable tag: trunk
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
95
 
96
  == Changelog ==
97
 
98
+ = 3.0.5 =
99
+ * Fix: WordPress 4.3 compatibility
100
+
101
  = 3.0.0 =
102
 
103
  * Created some important changes for Lightbox.
wp-lightbox-2.php CHANGED
@@ -3,13 +3,13 @@
3
  * Plugin Name: WP Lightbox 2
4
  * Plugin URI: http://wpdevart.com/wordpress-lightbox-plugin
5
  * Description: WP Lightbox 2 is awesome tool for adding responsive lightbox (overlay) effect for images and also create lightbox for photo albums/galleries on your WordPress blog. WordPress Lightbox is one of the most useful plugins for your website.
6
- * Version: 3.0.4
7
- * Author: newowner
8
- * Author URI: http://wpdevart.com
9
- * License: GNU General Public License, v2 (or newer)
10
- * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
  */
12
- /* Copyright 2011 Pankaj Jha, current owner wpdevart.com
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
@@ -25,38 +25,6 @@
25
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
  */
27
 
28
- /*2.21 - Image Map, Shrink large images to fit smaller screens*/
29
- /*2.22 - Fixed one s, that caused a fatal error*/
30
- /*2.23 - Updated jQuery calls for faster load*/
31
- /*2.24 - Compatible with wordpress 3.4.2*/
32
- /*2.25 - Fixed PHP 5 bug*/
33
- /*2.26 - Compatible with wordpress 3.5*/
34
- /*2.27 - Compatible with wordpress 3.5.1*/
35
- /*
36
- 2.28 - wp_print_scripts and wp_print_styles should not be used to enqueue styles or scripts on the front page. Use wp_enqueue_scripts instead.
37
- */
38
- /*2.28.1 - Fixed PHP 5 comment bug that got reintroduced into plugin*/
39
- /*2.28.2 - Compatible with wordpress HTML5 Themes */
40
- /*2.28.3 - Fixed HTML5 Themes support issues. */
41
- /*2.28.4 - Compatible with wordpress 3.6*/
42
- /*2.28.5 - Compatible with wordpress 3.6.1*/
43
- /*2.28.6.1 - Fixed navigation issue (minor release)*/
44
- /*2.28.7 - Compatible with wordpress 3.7.1*/
45
- /*2.28.8 - Compatible with wordpress 3.8*/
46
- /*2.28.8.1 - Fixed navigation issue*/
47
- /*2.28.8.2 - Compatible with wordpress 3.8.1*/
48
- /*2.28.8.3 - Fixed full screen close*/
49
- /*2.28.8.4 - Compatible with wordpress 3.9*/
50
- /*2.28.8.5 - Fixed Responsiveness Issue */
51
- /*2.28.8.6 - Compatible with wordpress 3.9.1*/
52
- /*2.28.8.7 - Fixed Image Galary and other HTML issue minor fix*/
53
- /*2.28.8.8 - Compatible with wordpress 3.9.2*/
54
- /*2.28.8.9 - Compatible with wordpress 4.0*/
55
- /*2.28.9.0 - Optimize: content grouping support and exclusion performance */
56
- /*2.28.9.1 - Compatible with wordpress 4.0.1*/
57
- /*2.28.9.2 - Compatible with wordpress 4.1*/
58
- /*2.28.9.2.1 - Fixed: Broken shortcodes with WordPress 4.1*/
59
-
60
  add_action( 'plugins_loaded', 'jqlb_init' );
61
  function jqlb_init() {
62
  if(!defined('ULFBEN_DONATE_URL')){
@@ -66,10 +34,10 @@ function jqlb_init() {
66
  define('JQLB_SCRIPT', 'wp-lightbox-2.min.js');
67
  load_plugin_textdomain('jqlb', false, dirname( plugin_basename( __FILE__ ) ) . '/I18n/');
68
  add_action('admin_init', 'jqlb_register_settings');
69
- add_action('admin_menu', 'jqlb_register_menu_item');
70
  add_action('wp_enqueue_scripts', 'jqlb_css');
71
  add_action('wp_enqueue_scripts', 'jqlb_js');
72
- add_filter('plugin_row_meta', 'jqlb_set_plugin_meta', 2, 10);
73
  add_filter('the_content', 'jqlb_autoexpand_rel_wlightbox', 99);
74
  if(get_option('jqlb_comments') == 1){
75
  remove_filter('pre_comment_content', 'wp_rel_nofollow');
3
  * Plugin Name: WP Lightbox 2
4
  * Plugin URI: http://wpdevart.com/wordpress-lightbox-plugin
5
  * Description: WP Lightbox 2 is awesome tool for adding responsive lightbox (overlay) effect for images and also create lightbox for photo albums/galleries on your WordPress blog. WordPress Lightbox is one of the most useful plugins for your website.
6
+ * Version: 3.0.5
7
+ * Author:Syed Balkhi
8
+ * Author URI: http://syedbalkhi.com
9
+ * License: GNU General Public License, v2 (or newer)
10
+ * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
  */
12
+ /* Copyright 2015 Syed Balkhi
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
25
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
  */
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  add_action( 'plugins_loaded', 'jqlb_init' );
29
  function jqlb_init() {
30
  if(!defined('ULFBEN_DONATE_URL')){
34
  define('JQLB_SCRIPT', 'wp-lightbox-2.min.js');
35
  load_plugin_textdomain('jqlb', false, dirname( plugin_basename( __FILE__ ) ) . '/I18n/');
36
  add_action('admin_init', 'jqlb_register_settings');
37
+ //add_action('admin_menu', 'jqlb_register_menu_item');
38
  add_action('wp_enqueue_scripts', 'jqlb_css');
39
  add_action('wp_enqueue_scripts', 'jqlb_js');
40
+ //add_filter('plugin_row_meta', 'jqlb_set_plugin_meta', 2, 10);
41
  add_filter('the_content', 'jqlb_autoexpand_rel_wlightbox', 99);
42
  if(get_option('jqlb_comments') == 1){
43
  remove_filter('pre_comment_content', 'wp_rel_nofollow');