Gallery by BestWebSoft - Version 4.2.7

Version Description

  • 09.02.2015 =
  • Update : Plugin functionality was updated for compatibility with Gallery Categories Plugin and Re-attacher Plugin.
  • Update : Gallery template checking functionality was updated.
Download this release

Release Info

Developer bestwebsoft
Plugin Icon 128x128 Gallery by BestWebSoft
Version 4.2.7
Comparing to
See all releases

Code changes from version 4.2.6 to 4.2.7

bws_menu/bws_menu.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Function for displaying BestWebSoft menu
4
- * Version: 1.4.0
5
  */
6
 
7
  if ( ! function_exists( 'bws_add_menu_render' ) ) {
@@ -83,7 +83,7 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
83
  'pro_settings' => 'admin.php?page=gallery-plugin-pro.php'
84
  ),
85
  'adsense-plugin/adsense-plugin.php'=> array(
86
- 'name' => 'Google AdSense',
87
  'description' => 'Allows Google AdSense implementation to your website.',
88
  'link' => 'http://bestwebsoft.com/products/google-adsense/?k=60e3979921e354feb0347e88e7d7b73d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
89
  'download' => 'http://bestwebsoft.com/products/google-adsense/download/?k=60e3979921e354feb0347e88e7d7b73d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
@@ -107,7 +107,7 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
107
  'settings' => 'admin.php?page=quotes-and-tips.php'
108
  ),
109
  'google-sitemap-plugin/google-sitemap-plugin.php'=> array(
110
- 'name' => 'Google Sitemap',
111
  'description' => 'Allows you to add sitemap file to Google Webmaster Tools.',
112
  'link' => 'http://bestwebsoft.com/products/google-sitemap/?k=5202b2f5ce2cf85daee5e5f79a51d806&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
113
  'download' => 'http://bestwebsoft.com/products/google-sitemap/download/?k=5202b2f5ce2cf85daee5e5f79a51d806&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
@@ -137,7 +137,7 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
137
  'settings' => 'admin.php?page=custom_fields_search.php'
138
  ),
139
  'google-one/google-plus-one.php' => array(
140
- 'name' => 'Google +1',
141
  'description' => 'Allows you to see how many times your page has been liked on Google Search Engine as well as who has liked the article.',
142
  'link' => 'http://bestwebsoft.com/products/google-plus-one/?k=ce7a88837f0a857b3a2bb142f470853c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
143
  'download' => 'http://bestwebsoft.com/products/google-plus-one/download/?k=ce7a88837f0a857b3a2bb142f470853c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
@@ -194,7 +194,7 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
194
  'settings' => 'admin.php?page=post-to-csv.php'
195
  ),
196
  'google-shortlink/google-shortlink.php' => array(
197
- 'name' => 'Google Shortlink',
198
  'description' => 'Allows you to get short links from goo.gl servise without leaving your site.',
199
  'link' => 'http://bestwebsoft.com/products/google-shortlink/?k=afcf3eaed021bbbbeea1090e16bc22db&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
200
  'download' => 'http://bestwebsoft.com/products/google-shortlink/download/?k=afcf3eaed021bbbbeea1090e16bc22db&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
@@ -210,7 +210,7 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
210
  'settings' => 'admin.php?page=htaccess.php'
211
  ),
212
  'google-captcha/google-captcha.php' => array(
213
- 'name' => 'Google Captcha (reCAPTCHA)',
214
  'description' => 'Plugin intended to prove that the visitor is a human being and not a spam robot.',
215
  'link' => 'http://bestwebsoft.com/products/google-captcha/?k=7b59fbe542acf950b29f3e020d5ad735&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
216
  'download' => 'http://bestwebsoft.com/products/google-captcha/download/?k=7b59fbe542acf950b29f3e020d5ad735&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
@@ -234,7 +234,10 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
234
  'link' => 'http://bestwebsoft.com/products/subscriber/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
235
  'download' => 'http://bestwebsoft.com/products/subscriber/download/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
236
  'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Subscriber+Bestwebsoft&plugin-search-input=Search+Plugins',
237
- 'settings' => 'admin.php?page=sbscrbr_settings_page'
 
 
 
238
  ),
239
  'contact-form-multi/contact-form-multi.php' => array(
240
  'name' => 'Contact Form Multi',
@@ -248,22 +251,22 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
248
  'pro_settings' => ''
249
  ),
250
  'bws-google-maps/bws-google-maps.php' => array(
251
- 'name' => 'BestWebSoft Google Maps',
252
  'description' => 'Easy to set up and insert Google Maps to your website.',
253
  'link' => 'http://bestwebsoft.com/products/bws-google-maps/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
254
  'download' => 'http://bestwebsoft.com/products/bws-google-maps/download/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
255
- 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=BestWebSoft+Google+Maps&plugin-search-input=Search+Plugins',
256
  'settings' => 'admin.php?page=bws-google-maps.php',
257
  'pro_version' => 'bws-google-maps-pro/bws-google-maps-pro.php',
258
  'purchase' => 'http://bestwebsoft.com/products/bws-google-maps/buy/?k=117c3f9fc17f2c83ef430a8a9dc06f56&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
259
  'pro_settings' => 'admin.php?page=bws-google-maps-pro.php'
260
  ),
261
  'bws-google-analytics/bws-google-analytics.php' => array(
262
- 'name' => 'BestWebSoft Google Analytics',
263
  'description' => 'Allows you to retrieve basic stats from Google Analytics account and add the tracking code to your blog.',
264
  'link' => 'http://bestwebsoft.com/products/bws-google-analytics/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
265
  'download' => 'http://bestwebsoft.com/products/bws-google-analytics/download/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
266
- 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=BestWebSoft+Google+Analytics&plugin-search-input=Search+Plugins',
267
  'settings' => 'admin.php?page=bws-google-analytics.php'
268
  ),
269
  'db-manager/db-manager.php' => array(
@@ -319,6 +322,30 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
319
  'download' => 'http://bestwebsoft.com/products/multilanguage/download/?k=7d68c7bfec2486dc350c67fff57ad433&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
320
  'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Multilanguage+BestWebSoft&plugin-search-input=Search+Plugins',
321
  'settings' => 'admin.php?page=mltlngg_settings'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  )
323
  );
324
 
@@ -525,7 +552,7 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
525
  <?php } ?>
526
  </div>
527
  </div>
528
- <?php } elseif ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) {
529
  if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
530
  <div class="bws_product_box bws_product_deactivated">
531
  <div class="bws_product">
1
  <?php
2
  /*
3
  * Function for displaying BestWebSoft menu
4
+ * Version: 1.4.3
5
  */
6
 
7
  if ( ! function_exists( 'bws_add_menu_render' ) ) {
83
  'pro_settings' => 'admin.php?page=gallery-plugin-pro.php'
84
  ),
85
  'adsense-plugin/adsense-plugin.php'=> array(
86
+ 'name' => 'Google AdSense by BestWebSoft',
87
  'description' => 'Allows Google AdSense implementation to your website.',
88
  'link' => 'http://bestwebsoft.com/products/google-adsense/?k=60e3979921e354feb0347e88e7d7b73d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
89
  'download' => 'http://bestwebsoft.com/products/google-adsense/download/?k=60e3979921e354feb0347e88e7d7b73d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
107
  'settings' => 'admin.php?page=quotes-and-tips.php'
108
  ),
109
  'google-sitemap-plugin/google-sitemap-plugin.php'=> array(
110
+ 'name' => 'Google Sitemap by BestWebSoft',
111
  'description' => 'Allows you to add sitemap file to Google Webmaster Tools.',
112
  'link' => 'http://bestwebsoft.com/products/google-sitemap/?k=5202b2f5ce2cf85daee5e5f79a51d806&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
113
  'download' => 'http://bestwebsoft.com/products/google-sitemap/download/?k=5202b2f5ce2cf85daee5e5f79a51d806&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
137
  'settings' => 'admin.php?page=custom_fields_search.php'
138
  ),
139
  'google-one/google-plus-one.php' => array(
140
+ 'name' => 'Google +1 by BestWebSoft',
141
  'description' => 'Allows you to see how many times your page has been liked on Google Search Engine as well as who has liked the article.',
142
  'link' => 'http://bestwebsoft.com/products/google-plus-one/?k=ce7a88837f0a857b3a2bb142f470853c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
143
  'download' => 'http://bestwebsoft.com/products/google-plus-one/download/?k=ce7a88837f0a857b3a2bb142f470853c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
194
  'settings' => 'admin.php?page=post-to-csv.php'
195
  ),
196
  'google-shortlink/google-shortlink.php' => array(
197
+ 'name' => 'Google Shortlink by BestWebSoft',
198
  'description' => 'Allows you to get short links from goo.gl servise without leaving your site.',
199
  'link' => 'http://bestwebsoft.com/products/google-shortlink/?k=afcf3eaed021bbbbeea1090e16bc22db&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
200
  'download' => 'http://bestwebsoft.com/products/google-shortlink/download/?k=afcf3eaed021bbbbeea1090e16bc22db&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
210
  'settings' => 'admin.php?page=htaccess.php'
211
  ),
212
  'google-captcha/google-captcha.php' => array(
213
+ 'name' => 'Google Captcha (reCAPTCHA) by BestWebSoft',
214
  'description' => 'Plugin intended to prove that the visitor is a human being and not a spam robot.',
215
  'link' => 'http://bestwebsoft.com/products/google-captcha/?k=7b59fbe542acf950b29f3e020d5ad735&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
216
  'download' => 'http://bestwebsoft.com/products/google-captcha/download/?k=7b59fbe542acf950b29f3e020d5ad735&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
234
  'link' => 'http://bestwebsoft.com/products/subscriber/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
235
  'download' => 'http://bestwebsoft.com/products/subscriber/download/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
236
  'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Subscriber+Bestwebsoft&plugin-search-input=Search+Plugins',
237
+ 'settings' => 'admin.php?page=sbscrbr_settings_page',
238
+ 'pro_version' => 'subscriber-pro/subscriber-pro.php',
239
+ 'purchase' => 'http://bestwebsoft.com/products/subscriber/buy/?k=02dbb8b549925d9b74e70adc2a7282e4&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
240
+ 'pro_settings' => 'admin.php?page=sbscrbrpr_settings_page'
241
  ),
242
  'contact-form-multi/contact-form-multi.php' => array(
243
  'name' => 'Contact Form Multi',
251
  'pro_settings' => ''
252
  ),
253
  'bws-google-maps/bws-google-maps.php' => array(
254
+ 'name' => 'Google Maps by BestWebSoft',
255
  'description' => 'Easy to set up and insert Google Maps to your website.',
256
  'link' => 'http://bestwebsoft.com/products/bws-google-maps/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
257
  'download' => 'http://bestwebsoft.com/products/bws-google-maps/download/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
258
+ 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Google+Maps+Bestwebsoft&plugin-search-input=Search+Plugins',
259
  'settings' => 'admin.php?page=bws-google-maps.php',
260
  'pro_version' => 'bws-google-maps-pro/bws-google-maps-pro.php',
261
  'purchase' => 'http://bestwebsoft.com/products/bws-google-maps/buy/?k=117c3f9fc17f2c83ef430a8a9dc06f56&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
262
  'pro_settings' => 'admin.php?page=bws-google-maps-pro.php'
263
  ),
264
  'bws-google-analytics/bws-google-analytics.php' => array(
265
+ 'name' => 'Google Analytics by BestWebSoft',
266
  'description' => 'Allows you to retrieve basic stats from Google Analytics account and add the tracking code to your blog.',
267
  'link' => 'http://bestwebsoft.com/products/bws-google-analytics/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
268
  'download' => 'http://bestwebsoft.com/products/bws-google-analytics/download/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
269
+ 'wp_install' => $admin_url . 'plugin-install.php?tab=search&s=Google+Analytics+Bestwebsoft&plugin-search-input=Search+Plugins',
270
  'settings' => 'admin.php?page=bws-google-analytics.php'
271
  ),
272
  'db-manager/db-manager.php' => array(
322
  'download' => 'http://bestwebsoft.com/products/multilanguage/download/?k=7d68c7bfec2486dc350c67fff57ad433&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
323
  'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Multilanguage+BestWebSoft&plugin-search-input=Search+Plugins',
324
  'settings' => 'admin.php?page=mltlngg_settings'
325
+ ),
326
+ 'bws-popular-posts/bws-popular-posts.php' => array(
327
+ 'name' => 'Popular Posts by BestWebSoft',
328
+ 'description' => 'This plugin will help you can display the most popular posts on your blog in the widget.',
329
+ 'link' => 'http://bestwebsoft.com/products/popular-posts/?k=4d529f116d2b7f7df3a78018c383f975&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
330
+ 'download' => 'http://bestwebsoft.com/products/popular-posts/download/?k=4d529f116d2b7f7df3a78018c383f975&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
331
+ 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Popular+Posts+BestWebSoft&plugin-search-input=Search+Plugins',
332
+ 'settings' => 'admin.php?page=popular-posts.php'
333
+ ),
334
+ 'bws-testimonials/bws-testimonials.php' => array(
335
+ 'name' => 'Testimonials by BestWebSoft',
336
+ 'description' => 'Allows creating and displaying a Testimonial on your website.',
337
+ 'link' => 'http://bestwebsoft.com/products/testimonials/?k=3fe4bb89dc901c98e43a113e08f8db73&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
338
+ 'download' => 'http://bestwebsoft.com/products/testimonials/download/?k=3fe4bb89dc901c98e43a113e08f8db73&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
339
+ 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Testimonials+BestWebSoft&plugin-search-input=Search+Plugins',
340
+ 'settings' => 'admin.php?page=testimonials.php'
341
+ ),
342
+ 'bws-featured-posts/bws-featured-posts.php' => array(
343
+ 'name' => 'Featured Posts by BestWebSoft',
344
+ 'description' => 'Displays featured posts randomly on any website page.',
345
+ 'link' => 'http://bestwebsoft.com/products/featured-posts/?k=f0afb31185ba7c7d6d598528d69f6d97&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
346
+ 'download' => 'http://bestwebsoft.com/products/featured-posts/download/?k=f0afb31185ba7c7d6d598528d69f6d97&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
347
+ 'wp_install' => $admin_url . 'plugin-install.php?tab=search&type=term&s=Featured+Posts+BestWebSoft&plugin-search-input=Search+Plugins',
348
+ 'settings' => 'admin.php?page=featured-posts.php'
349
  )
350
  );
351
 
552
  <?php } ?>
553
  </div>
554
  </div>
555
+ <?php } elseif ( isset( $bws_plugins[ $key_plugin ] ) && ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) ) {
556
  if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
557
  <div class="bws_product_box bws_product_deactivated">
558
  <div class="bws_product">
bws_menu/css/style.css CHANGED
@@ -62,10 +62,10 @@ h4.bws_installed:before {
62
  }
63
  .bws_product {
64
  border-bottom: 1px solid #fff;
65
- min-height: 203px;
66
  }
67
  .bws_product_content {
68
- min-height: 93px;
69
  }
70
  .bws_activate {
71
  color: #F14B21;
@@ -77,7 +77,9 @@ h4.bws_installed:before {
77
  font-weight: bold;
78
  padding: 16px 10px 28px;
79
  font-size: 14px;
80
- height: 18px;
 
 
81
  }
82
  .bws_product_deactivated .bws_product_title {
83
  color: #7e7e7e;
62
  }
63
  .bws_product {
64
  border-bottom: 1px solid #fff;
65
+ min-height: 235px;
66
  }
67
  .bws_product_content {
68
+ min-height: 87px;
69
  }
70
  .bws_activate {
71
  color: #F14B21;
77
  font-weight: bold;
78
  padding: 16px 10px 28px;
79
  font-size: 14px;
80
+ height: 42px;
81
+ position: relative;
82
+ z-index: 2;
83
  }
84
  .bws_product_deactivated .bws_product_title {
85
  color: #7e7e7e;
bws_menu/icons/bws-featured-posts.png ADDED
Binary file
bws_menu/icons/bws-popular-posts.png ADDED
Binary file
bws_menu/icons/bws-testimonials.png ADDED
Binary file
css/frontend_style.css ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * styles for gallery page
3
+ */
4
+ ul.gallery {
5
+ list-style: none outside none;
6
+ }
7
+ .gallery_box_single .gallery.clearfix {
8
+ display: table;
9
+ margin: 0 auto;
10
+ }
11
+ .gallery_box ul {
12
+ list-style: none outside none !important;
13
+ margin:0;
14
+ }
15
+ .gallery_box li {
16
+ padding: 10px 10px 0 0;
17
+ clear: both;
18
+ list-style: none;
19
+ }
20
+ .gallery_box li img {
21
+ padding: 5px;
22
+ margin:0 10px 10px 0;
23
+ float:left;
24
+ border: 1px solid #BDBDBD;
25
+ }
26
+ .gallery_box p {
27
+ margin-bottom:0px;
28
+ }
29
+ .gallery_detail_box {
30
+ float:left;
31
+ }
32
+ .gallery_box .gallery_detail_box p.title {
33
+ color: #000000;
34
+ line-height: 1.5em;
35
+ margin: 0 0 10px;
36
+ font-weight: bold;
37
+ }
38
+ .gllr_clear {
39
+ clear: both;
40
+ height: 0;
41
+ }
42
+ .clear {
43
+ clear: both;
44
+ }
45
+ .gallery .gllr_image_block {
46
+ float: left;
47
+ }
48
+ .gallery .gllr_image_block a img {
49
+ border: 10px solid #F1F1F1;
50
+ margin-top: 0;
51
+ box-sizing: content-box;
52
+ -moz-box-sizing: content-box; /*Firefox 1-3*/
53
+ -webkit-box-sizing: content-box; /* Safari */
54
+ }
55
+ .gallery_box_single .gallery .gllr_image_block p {
56
+ border: 1px solid #BDBDBD;
57
+ margin: 5px 6px 0 0;
58
+ padding: 0;
59
+ }
60
+ .gllr_single_image_text {
61
+ font-size: 12px;
62
+ color: #888;
63
+ }
64
+ .gllr_image_row {
65
+ clear: both;
66
+ }
67
+ .gallery li {
68
+ float: left;
69
+ margin: 5px 6px 10px 0;
70
+ }
71
+ .gallery .gllr_image_container {
72
+ border: 1px solid #BDBDBD;
73
+ }
74
+ .pp_social {
75
+ display: none;
76
+ }
77
+ #fancybox-wrap {
78
+ box-sizing: content-box;
79
+ -moz-box-sizing: content-box; /*Firefox 1-3*/
80
+ -webkit-box-sizing: content-box; /* Safari */
81
+ }
82
+ #fancybox-wrap * {
83
+ box-sizing: content-box;
84
+ -moz-box-sizing: content-box; /*Firefox 1-3*/
85
+ -webkit-box-sizing: content-box; /* Safari */
86
+ }
87
+ .gllr_image_block img {
88
+ border-style: solid;
89
+ }
90
+ /* template fix for theme 2015 */
91
+ .page-template-gallery-template .site-content .site-content,
92
+ .single-gallery .site-content .site-content {
93
+ margin-left: 0;
94
+ width: auto;
95
+ }
96
+ #ajax_update_postmeta,
97
+ #ajax_update_images {
98
+ float: left;
99
+ }
100
+ #gllr_date_additional_field, #gllr_link_additional_field,
101
+ #gllr_shrdescription_additional_field, #gllr_description_additional_field,
102
+ #gllr_svn_additional_field, #gllr_executor_additional_field,
103
+ #gllr_technologies_additional_field {
104
+ float: left;
105
+ position: relative;
106
+ top: 2px;
107
+ margin-right: 3px;
108
+ }
css/style.css CHANGED
@@ -10,67 +10,23 @@
10
  /*
11
  * styles for gallery page
12
  */
13
- ul.gallery {
14
- list-style: none outside none;
15
- }
16
- .gallery_box_single .gallery.clearfix {
17
- display: table;
18
- margin: 0 auto;
19
- }
20
- .gallery_box ul {
21
- list-style: none outside none !important;
22
- margin:0;
23
- }
24
- .gallery_box li {
25
- padding: 10px 10px 0 0;
26
- clear: both;
27
- list-style: none;
28
- }
29
- .gallery_box li img {
30
- padding: 5px;
31
- margin:0 10px 10px 0;
32
- float:left;
33
- border: 1px solid #BDBDBD;
34
- }
35
- .gallery_box p {
36
- margin-bottom:0px;
37
- }
38
- .gallery_detail_box {
39
- float:left;
40
- }
41
- .gallery_box .gallery_detail_box p.title {
42
- color: #000000;
43
- line-height: 1.5em;
44
- margin: 0 0 10px;
45
- font-weight: bold;
46
- }
47
  .gllr_clear {
48
  clear: both;
49
  height: 0;
50
  }
51
- .clear {
52
- clear: both;
53
- }
54
  .gllr_image_text {
55
- width:150px;
56
  }
57
  .gllr_link_text, .gllr_image_alt_tag {
58
- width:170px;
59
  }
60
  .gllr_order_text {
61
- width:20px;
62
  }
63
  .gallery .gllr_image_block {
64
  float: left;
65
  }
66
- #content .gallery .gllr_image_block a img {
67
- border: 10px solid #F1F1F1;
68
- margin-top: 0;
69
- box-sizing: content-box;
70
- -moz-box-sizing: content-box; /*Firefox 1-3*/
71
- -webkit-box-sizing: content-box; /* Safari */
72
- }
73
- #Upload-File .gllr_order_message{
74
  padding-bottom:10px;
75
  }
76
  #Upload-File .gallery .gllr_image_block {
@@ -82,32 +38,12 @@ ul.gallery {
82
  #Upload-File .gallery .gllr_border_image img {
83
  padding:10px;
84
  }
85
- #Upload-File .gallery .small_text{
86
  font-size: 10px;
87
  color: grey;
88
  }
89
- .gallery .delete {
90
- padding-top: 2px;
91
- text-align: center;
92
- }
93
- #content .gallery_box_single .gallery .gllr_image_block p {
94
- border: 1px solid #BDBDBD;
95
- margin: 5px 6px 0 0;
96
- padding: 0;
97
- }
98
- .gllr_single_image_text {
99
- font-size: 12px;
100
- color: #888;
101
- }
102
- .gllr_image_row {
103
- clear: both;
104
- }
105
- .gallery li {
106
- float: left;
107
- margin: 5px 6px 10px 0;
108
- }
109
- .gallery .gllr_image_container {
110
- border: 1px solid #BDBDBD;
111
  }
112
  .gallery .delete {
113
  padding-top: 2px;
@@ -116,21 +52,6 @@ ul.gallery {
116
  .pp_social {
117
  display: none;
118
  }
119
- #gllr_form_image_size .gllr_width_labels label {
120
- min-width: 115px;
121
- float: left;
122
- margin-right: 5px;
123
- }
124
- #gllr_form_image_size input[type="radio"] {
125
- float: left;
126
- position: relative;
127
- top: 5px;
128
- margin-right: 5px;
129
- }
130
- #gllr_form_image_size .label_radio {
131
- width: 540px;
132
- cursor: default;
133
- }
134
  #gllr_border_images_color_small {
135
  background: none repeat scroll 0 0 transparent;
136
  box-shadow: 0 9px 0 rgba(255, 255, 255, 0.1) inset;
@@ -142,29 +63,6 @@ ul.gallery {
142
  width: 20px;
143
  top: -2px;
144
  }
145
- #fancybox-wrap {
146
- box-sizing: content-box;
147
- -moz-box-sizing: content-box; /*Firefox 1-3*/
148
- -webkit-box-sizing: content-box; /* Safari */
149
- }
150
- #fancybox-wrap * {
151
- box-sizing: content-box;
152
- -moz-box-sizing: content-box; /*Firefox 1-3*/
153
- -webkit-box-sizing: content-box; /* Safari */
154
- }
155
- .gllr_image_block img {
156
- border-style: solid;
157
- }
158
- /* template fix for theme 2015 */
159
- .page-template-gallery-template .site-content .site-content,
160
- .single-gallery .site-content .site-content {
161
- margin-left: 0;
162
- width: auto;
163
- }
164
-
165
- #Upload-File .gllr_image_block img {
166
- border-style: none;
167
- }
168
  .minicolors input {
169
  height: 22px !important;
170
  }
@@ -178,12 +76,9 @@ ul.gallery {
178
  #ajax_update_images {
179
  float: left;
180
  }
181
- #gllr_date_additional_field, #gllr_link_additional_field,
182
- #gllr_shrdescription_additional_field, #gllr_description_additional_field,
183
- #gllr_svn_additional_field, #gllr_executor_additional_field,
184
- #gllr_technologies_additional_field {
185
- float: left;
186
- position: relative;
187
- top: 2px;
188
- margin-right: 3px;
189
  }
10
  /*
11
  * styles for gallery page
12
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  .gllr_clear {
14
  clear: both;
15
  height: 0;
16
  }
 
 
 
17
  .gllr_image_text {
18
+ width: 150px;
19
  }
20
  .gllr_link_text, .gllr_image_alt_tag {
21
+ width: 170px;
22
  }
23
  .gllr_order_text {
24
+ width: 20px;
25
  }
26
  .gallery .gllr_image_block {
27
  float: left;
28
  }
29
+ #Upload-File .gllr_order_message {
 
 
 
 
 
 
 
30
  padding-bottom:10px;
31
  }
32
  #Upload-File .gallery .gllr_image_block {
38
  #Upload-File .gallery .gllr_border_image img {
39
  padding:10px;
40
  }
41
+ #Upload-File .gallery .small_text {
42
  font-size: 10px;
43
  color: grey;
44
  }
45
+ li.gllr_image_block {
46
+ margin: 5px 6px 10px 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
  .gallery .delete {
49
  padding-top: 2px;
52
  .pp_social {
53
  display: none;
54
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  #gllr_border_images_color_small {
56
  background: none repeat scroll 0 0 transparent;
57
  box-shadow: 0 9px 0 rgba(255, 255, 255, 0.1) inset;
63
  width: 20px;
64
  top: -2px;
65
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  .minicolors input {
67
  height: 22px !important;
68
  }
76
  #ajax_update_images {
77
  float: left;
78
  }
79
+ .gllr_code {
80
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0.07);
81
+ font-size: 13px;
82
+ margin: 0 1px;
83
+ padding: 3px 5px 2px;
 
 
 
84
  }
css/style_wp_before_3.8.css CHANGED
@@ -16,50 +16,11 @@
16
  .admin-color-classic #adminmenu #menu-posts-gallery div.wp-menu-image {
17
  background: url("../images/menu_b.png?ver=20100531") no-repeat scroll left -32px transparent;
18
  }
19
- /*
20
- * styles for gallery page
21
- */
22
- ul.gallery {
23
- list-style: none outside none;
24
- }
25
- .gallery_box_single .gallery.clearfix {
26
- display: table;
27
- margin: 0 auto;
28
- }
29
- .gallery_box ul {
30
- list-style: none outside none !important;
31
- margin:0;
32
- }
33
- .gallery_box li {
34
- padding: 10px 10px 0 0;
35
- clear: both;
36
- list-style: none;
37
- }
38
- .gallery_box li img {
39
- padding: 5px;
40
- margin:0 10px 10px 0;
41
- float:left;
42
- border: 1px solid #BDBDBD;
43
- }
44
- .gallery_box p {
45
- margin-bottom:0px;
46
- }
47
- .gallery_detail_box {
48
- float:left;
49
- }
50
- .gallery_box .gallery_detail_box p.title {
51
- color: #000000;
52
- line-height: 1.5em;
53
- margin: 0 0 10px;
54
- font-weight: bold;
55
- }
56
  .gllr_clear {
57
  clear: both;
58
  height: 0;
59
  }
60
- .clear {
61
- clear: both;
62
- }
63
  .gllr_image_text {
64
  width:150px;
65
  }
@@ -67,17 +28,7 @@ ul.gallery {
67
  width:170px;
68
  }
69
  .gllr_order_text {
70
- width:20px;
71
- }
72
- .gallery .gllr_image_block {
73
- float: left;
74
- }
75
- #content .gallery .gllr_image_block a img {
76
- border: 10px solid #F1F1F1;
77
- margin-top: 0;
78
- box-sizing: content-box;
79
- -moz-box-sizing: content-box; /*Firefox 1-3*/
80
- -webkit-box-sizing: content-box; /* Safari */
81
  }
82
  #Upload-File .gllr_order_message{
83
  padding-bottom:10px;
@@ -96,50 +47,15 @@ ul.gallery {
96
  color:grey;
97
  }
98
  .gallery .delete {
99
- padding-top:2px;
100
- text-align:center;
101
- }
102
- #content .gallery_box_single .gallery .gllr_image_block p {
103
- border: 1px solid #BDBDBD;
104
- margin:5px 6px 0 0;
105
- padding: 0;
106
- }
107
- .gllr_single_image_text {
108
- font-size:12px;
109
- color:#888;
110
  }
111
- .gllr_image_row {
112
- clear:both;
113
- }
114
- .gallery li {
115
- float: left;
116
- margin:5px 6px 10px 0;
117
- }
118
- .gallery .gllr_image_container {
119
- border: 1px solid #BDBDBD;
120
- }
121
- .gallery .delete {
122
- padding-top:2px;
123
- text-align:center;
124
  }
125
  .pp_social {
126
  display:none;
127
  }
128
- #gllr_form_image_size .gllr_width_labels label {
129
- min-width:115px;
130
- float:left;
131
- margin-right:5px;
132
- }
133
- #gllr_form_image_size input[type="radio"] {
134
- float:left;
135
- position:relative;
136
- top:5px;
137
- margin-right:5px;
138
- }
139
- #gllr_form_image_size .label_radio {
140
- width:540px;
141
- cursor: default;
142
- }
143
  #gllr_border_images_color_small {
144
  background: none repeat scroll 0 0 transparent;
145
  box-shadow: 0 9px 0 rgba(255, 255, 255, 0.1) inset;
@@ -151,29 +67,6 @@ ul.gallery {
151
  width: 20px;
152
  top: -2px;
153
  }
154
- #fancybox-wrap {
155
- box-sizing: content-box;
156
- -moz-box-sizing: content-box; /*Firefox 1-3*/
157
- -webkit-box-sizing: content-box; /* Safari */
158
- }
159
- #fancybox-wrap * {
160
- box-sizing: content-box;
161
- -moz-box-sizing: content-box; /*Firefox 1-3*/
162
- -webkit-box-sizing: content-box; /* Safari */
163
- }
164
- .gllr_image_block img {
165
- border-style: solid;
166
- }
167
- /* template fix for theme 2015 */
168
- .page-template-gallery-template .site-content .site-content,
169
- .single-gallery .site-content .site-content {
170
- margin-left: 0;
171
- width: auto;
172
- }
173
-
174
- #Upload-File .gllr_image_block img {
175
- border-style: none;
176
- }
177
  #gllr_loader,
178
  #gllr_img_loader {
179
  float: left;
@@ -184,12 +77,9 @@ ul.gallery {
184
  #ajax_update_images {
185
  float: left;
186
  }
187
- #gllr_date_additional_field, #gllr_link_additional_field,
188
- #gllr_shrdescription_additional_field, #gllr_description_additional_field,
189
- #gllr_svn_additional_field, #gllr_executor_additional_field,
190
- #gllr_technologies_additional_field {
191
- float: left;
192
- position: relative;
193
- top: 2px;
194
- margin-right: 3px;
195
  }
16
  .admin-color-classic #adminmenu #menu-posts-gallery div.wp-menu-image {
17
  background: url("../images/menu_b.png?ver=20100531") no-repeat scroll left -32px transparent;
18
  }
19
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  .gllr_clear {
21
  clear: both;
22
  height: 0;
23
  }
 
 
 
24
  .gllr_image_text {
25
  width:150px;
26
  }
28
  width:170px;
29
  }
30
  .gllr_order_text {
31
+ width: 20px;
 
 
 
 
 
 
 
 
 
 
32
  }
33
  #Upload-File .gllr_order_message{
34
  padding-bottom:10px;
47
  color:grey;
48
  }
49
  .gallery .delete {
50
+ padding-top: 2px;
51
+ text-align: center;
 
 
 
 
 
 
 
 
 
52
  }
53
+ li.gllr_image_block {
54
+ margin: 5px 6px 10px 0;
 
 
 
 
 
 
 
 
 
 
 
55
  }
56
  .pp_social {
57
  display:none;
58
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  #gllr_border_images_color_small {
60
  background: none repeat scroll 0 0 transparent;
61
  box-shadow: 0 9px 0 rgba(255, 255, 255, 0.1) inset;
67
  width: 20px;
68
  top: -2px;
69
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  #gllr_loader,
71
  #gllr_img_loader {
72
  float: left;
77
  #ajax_update_images {
78
  float: left;
79
  }
80
+ .gllr_code {
81
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0.07);
82
+ font-size: 13px;
83
+ margin: 0 1px;
84
+ padding: 3px 5px 2px;
 
 
 
85
  }
gallery-plugin.php CHANGED
@@ -4,12 +4,12 @@ Plugin Name: Gallery
4
  Plugin URI: http://bestwebsoft.com/products/
5
  Description: This plugin allows you to implement gallery page into web site.
6
  Author: BestWebSoft
7
- Version: 4.2.6
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
11
 
12
- /* © Copyright 2014 BestWebSoft ( http://support.bestwebsoft.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, version 2, as
@@ -25,6 +25,13 @@ License: GPLv2 or later
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  */
27
 
 
 
 
 
 
 
 
28
  if ( ! function_exists( 'add_gllr_admin_menu' ) ) {
29
  function add_gllr_admin_menu() {
30
  global $bstwbsftwppdtplgns_options, $bstwbsftwppdtplgns_added_menu;
@@ -180,76 +187,69 @@ if ( ! function_exists ( 'gllr_version_check' ) ) {
180
 
181
  if ( ! function_exists( 'gllr_plugin_install' ) ) {
182
  function gllr_plugin_install() {
183
- $filename_1 = WP_PLUGIN_DIR . '/gallery-plugin/template/gallery-template.php';
184
- $filename_2 = WP_PLUGIN_DIR . '/gallery-plugin/template/gallery-single-template.php';
185
-
186
- $filename_theme_1 = get_stylesheet_directory() . '/gallery-template.php';
187
- $filename_theme_2 = get_stylesheet_directory() . '/gallery-single-template.php';
188
-
189
- if ( ! file_exists( $filename_theme_1 ) ) {
190
- $handle = @fopen( $filename_1, "r" );
191
- $contents = @fread( $handle, filesize( $filename_1 ) );
192
- @fclose( $handle );
193
- if ( ! ( $handle = @fopen( $filename_theme_1, 'w' ) ) )
194
- return false;
195
- @fwrite( $handle, $contents );
196
- @fclose( $handle );
197
- chmod( $filename_theme_1, octdec( 755 ) );
198
- } else {
199
- $handle = @fopen( $filename_theme_1, "r" );
200
- $contents = @fread( $handle, filesize( $filename_theme_1 ) );
201
- @fclose( $handle );
202
- if ( ! ( $handle = @fopen( $filename_theme_1.'.bak', 'w' ) ) )
203
- return false;
204
- @fwrite( $handle, $contents );
205
- @fclose( $handle );
206
-
207
- $handle = @fopen( $filename_1, "r" );
208
- $contents = @fread( $handle, filesize( $filename_1 ) );
209
- @fclose( $handle );
210
- if ( ! ( $handle = @fopen( $filename_theme_1, 'w' ) ) )
211
- return false;
212
- @fwrite( $handle, $contents );
213
- @fclose( $handle );
214
- chmod( $filename_theme_1, octdec( 755 ) );
215
  }
216
- if ( ! file_exists( $filename_theme_2 ) ) {
217
- $handle = @fopen( $filename_2, "r" );
218
- $contents = @fread( $handle, filesize( $filename_2 ) );
219
- @fclose( $handle );
220
- if ( ! ( $handle = @fopen( $filename_theme_2, 'w' ) ) )
221
- return false;
222
- @fwrite( $handle, $contents );
223
- @fclose( $handle );
224
- chmod( $filename_theme_2, octdec( 755 ) );
225
- } else {
226
- $handle = @fopen( $filename_theme_2, "r" );
227
- $contents = @fread( $handle, filesize( $filename_theme_2 ) );
228
- @fclose( $handle );
229
- if ( ! ( $handle = @fopen( $filename_theme_2.'.bak', 'w' ) ) )
230
- return false;
231
- @fwrite( $handle, $contents );
232
- @fclose( $handle );
233
-
234
- $handle = @fopen( $filename_2, "r" );
235
- $contents = @fread( $handle, filesize( $filename_2 ) );
236
- @fclose( $handle );
237
- if ( ! ( $handle = @fopen( $filename_theme_2, 'w' ) ) )
238
- return false;
239
- @fwrite( $handle, $contents );
240
- @fclose( $handle );
241
- chmod( $filename_theme_2, octdec( 755 ) );
242
  }
 
 
243
  }
244
  }
245
 
246
  if ( ! function_exists( 'gllr_admin_error' ) ) {
247
  function gllr_admin_error() {
 
 
248
  $post = isset( $_REQUEST['post'] ) ? $_REQUEST['post'] : "" ;
249
- $post_type = isset( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : "" ;
250
- if ( ( 'gallery' == get_post_type( $post ) || 'gallery' == $post_type ) && ( ! file_exists( get_stylesheet_directory() .'/gallery-template.php' ) || ! file_exists( get_stylesheet_directory() .'/gallery-single-template.php' ) ) )
251
- gllr_plugin_install();
252
- if ( ( 'gallery' == get_post_type( $post ) || 'gallery' == $post_type ) && ( ! file_exists( get_stylesheet_directory() .'/gallery-template.php' ) || ! file_exists( get_stylesheet_directory() .'/gallery-single-template.php' ) ) )
 
 
 
 
 
 
253
  echo '<div class="error"><p><strong>' . __( 'The following files "gallery-template.php" and "gallery-single-template.php" were not found in the directory of your theme. Please copy them from the directory `/wp-content/plugins/gallery-plugin/template/` to the directory of your theme for the correct work of the Gallery plugin', 'gallery' ) . '</strong></p></div>';
254
  }
255
  }
@@ -279,7 +279,8 @@ if ( ! function_exists( 'gllr_post_type_images' ) ) {
279
  'has_archive' => false,
280
  'hierarchical' => true,
281
  'supports' => array( 'title', 'editor', 'thumbnail', 'author', 'page-attributes', 'comments' ),
282
- 'register_meta_box_cb' => 'init_metaboxes_gallery'
 
283
  ) );
284
  }
285
  }
@@ -306,8 +307,7 @@ if ( ! function_exists( 'gllr_addImageAncestorToMenu' ) ) {
306
  $post_ancestors = $post->ancestors;
307
  }
308
 
309
- $menuQuery = "SELECT DISTINCT post_id FROM $wpdb->postmeta WHERE meta_key = '_menu_item_object_id' AND meta_value IN (" . implode( ',', $post_ancestors ) . ")";
310
- $menuItems = $wpdb->get_col( $menuQuery );
311
 
312
  if ( is_array( $menuItems ) ) {
313
  foreach ( $menuItems as $menuItem ) {
@@ -317,7 +317,6 @@ if ( ! function_exists( 'gllr_addImageAncestorToMenu' ) ) {
317
  }
318
  }
319
  }
320
-
321
  return $classes;
322
  }
323
  }
@@ -325,7 +324,7 @@ if ( ! function_exists( 'gllr_addImageAncestorToMenu' ) ) {
325
  if ( ! function_exists( 'init_metaboxes_gallery' ) ) {
326
  function init_metaboxes_gallery() {
327
  add_meta_box( 'Upload-File', __( 'Upload File', 'gallery' ), 'gllr_post_custom_box', 'gallery', 'normal', 'high' );
328
- add_meta_box( 'Gallery-Shortcode', __( 'Gallery Shortcode', 'gallery' ), 'gllr_post_shortcode_box', 'gallery', 'side', 'high' );
329
  }
330
  }
331
 
@@ -345,6 +344,13 @@ if ( ! function_exists( 'gllr_post_custom_box' ) ) {
345
  if ( ! is_writable ( plugin_dir_path( __FILE__ ) ."upload/files/" ) ) {
346
  $error = __( "The gallery temp directory (gallery-plugin/upload/files) is not available for record on your webserver. Please use the standard WP functionality to upload images (media library)", 'gallery' );
347
  $uploader = false;
 
 
 
 
 
 
 
348
  } ?>
349
  <div style="padding-top:10px;"><label for="uploadscreen"><?php _e( 'Choose an image for upload:', 'gallery' ); ?></label>
350
  <input name="MAX_FILE_SIZE" value="1048576" type="hidden" />
@@ -366,7 +372,7 @@ if ( ! function_exists( 'gllr_post_custom_box' ) ) {
366
  </div>
367
  <script type="text/javascript">
368
  <?php if ( true === $uploader ) { ?>
369
- jQuery(document).ready( function(){
370
  var uploader = new qq.FileUploader({
371
  element: document.getElementById('file-uploader-demo1'),
372
  action: '../wp-admin/admin-ajax.php?action=upload_gallery_image&gllr_ajax_nonce_field=' + '<?php echo wp_create_nonce( plugin_basename( __FILE__ ), 'gllr_ajax_nonce_field' ); ?>',
@@ -409,16 +415,22 @@ if ( ! function_exists( 'gllr_post_custom_box' ) ) {
409
  echo '<br />' . __( "URL", "gallery" ) . '<br /><input type="text" name="gllr_link_url[' . $page->ID . ']" value="' . get_post_meta( $page->ID, $link_key, TRUE ) . '" class="gllr_link_text" /><br /><span class="small_text">' . __( "(by click on image opens a link in a new window)", "gallery" ) . '</span>';
410
  echo '<a class="bws_plugin_pro_version" href="http://bestwebsoft.com/products/gallery/?k=63a36f6bf5de0726ad6a43a165f38fe5&pn=79&v=' . $gllr_plugin_info["Version"] . '&wp_v=' . $wp_version . '" target="_blank" title="' . __( 'This setting is available in Pro version', 'gallery' ) . '">' .
411
  '<div>' . __( "Open the URL", "gallery" ) . '<br/><input disabled type="radio" value="_self" > ' . __( "Current window", "gallery" ) . '<br/><input disabled type="radio" value="_blank" > ' . __( "New window", "gallery" ) . '<br/>' .
412
- __( "Lightbox button URL", "gallery" ) . '<br><input class="gllrprfssnl_link_text" disabled type="text" value="" name="gllrprfssnl_lightbox_button_url"><br/>' .
413
- __( "Description", "gallery" ) . '<br><input class="gllrprfssnl_link_text" disabled type="text" value="" name="gllrprfssnl_description"></div></a>';
414
  echo '<div class="delete"><a href="javascript:void(0);" onclick="img_delete(' . $page->ID . ');">' . __( "Delete", "gallery" ) . '</a><div/>';
 
 
 
 
 
 
 
415
  echo '</div></li>';
416
  endforeach; ?>
417
  </ul>
418
  <div class="gllr_clear"></div>
419
  <div id="delete_images"></div>
420
- <?php
421
- }
422
  }
423
 
424
  /* Create shortcode meta box for gallery post type */
@@ -426,9 +438,9 @@ if ( ! function_exists( 'gllr_post_shortcode_box' ) ) {
426
  function gllr_post_shortcode_box( $obj = '', $box = '' ) {
427
  global $post; ?>
428
  <p><?php _e( 'You can add a Single Gallery to the page or post by inserting this shortcode into the content', 'gallery' ); ?>:</p>
429
- <p><code>[print_gllr id=<?php echo $post->ID; ?>]</code></p>
430
  <p><?php _e( 'If you want to display a short description containing a screenshot and the link to the Single Gallery Page', 'gallery' ); ?>:</p>
431
- <p><code>[print_gllr id=<?php echo $post->ID; ?> display=short]</code></p>
432
  <?php }
433
  }
434
 
@@ -466,10 +478,10 @@ if ( ! function_exists ( 'gllr_save_postdata' ) ) {
466
 
467
  $wp_filetype = wp_check_filetype( $filename, null );
468
  $attachment = array(
469
- 'post_mime_type' => $wp_filetype['type'],
470
- 'post_title' => $filename,
471
- 'post_content' => '',
472
- 'post_status' => 'inherit'
473
  );
474
  $attach_id = wp_insert_attachment( $attachment, $file );
475
  $attach_data = wp_generate_attachment_metadata( $attach_id, $file );
@@ -479,7 +491,7 @@ if ( ! function_exists ( 'gllr_save_postdata' ) ) {
479
  }
480
  }
481
  if ( isset( $_REQUEST['delete_images'] ) ) {
482
- foreach( $_REQUEST['delete_images'] as $delete_id ) {
483
  delete_post_meta( $delete_id, $key );
484
  wp_delete_attachment( $delete_id );
485
  if ( isset( $_REQUEST['gllr_order_text'][ $delete_id ] ) )
@@ -612,10 +624,17 @@ if ( ! function_exists( 'gllr_flush_rules' ) ) {
612
 
613
  if ( ! function_exists( 'gllr_template_redirect' ) ) {
614
  function gllr_template_redirect() {
615
- global $wp_query, $post, $posts;
616
  if ( 'gallery' == get_post_type() && "" == $wp_query->query_vars["s"] ) {
617
- include( STYLESHEETPATH . '/gallery-single-template.php' );
618
- exit();
 
 
 
 
 
 
 
619
  }
620
  }
621
  }
@@ -648,7 +667,6 @@ if ( ! function_exists( 'gllr_custom_columns' ) ) {
648
  )
649
  ORDER BY $wpdb->posts.post_title ASC" );
650
  switch ( $column ) {
651
- /*case "category":*/
652
  case "autor":
653
  $author_id = $post->post_author;
654
  echo '<a href="edit.php?post_type=post&amp;author=' . $author_id . '">' . get_the_author_meta( 'user_nicename' , $author_id ) . '</a>';
@@ -706,7 +724,7 @@ if ( ! function_exists( 'gllr_page_css_class' ) ) {
706
  $post_type = get_query_var( 'post_type' );
707
  $parent_id = 0;
708
  if ( "gallery" == $post_type ) {
709
- $parent_id = $wpdb->get_var( "SELECT $wpdb->posts.ID FROM $wpdb->posts, $wpdb->postmeta WHERE meta_key = '_wp_page_template' AND meta_value = 'gallery-template.php' AND post_status = 'publish' AND $wpdb->posts.ID = $wpdb->postmeta.post_id" );
710
  while ( $parent_id ) {
711
  $page = get_page( $parent_id );
712
  if ( 0 < $page->post_parent )
@@ -730,14 +748,15 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
730
 
731
  if ( get_option( 'cstmsrch_options' ) )
732
  $cstmsrch_options = get_option( 'cstmsrch_options' );
 
 
733
  elseif ( get_option( 'bws_custom_search' ) )
734
  $cstmsrch_options = get_option( 'bws_custom_search' );
735
 
736
- if ( ! function_exists( 'get_plugins' ) || ! function_exists( 'is_plugin_active_for_network' ) )
737
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
738
 
739
- $all_plugins = get_plugins();
740
- $active_plugins = get_option( 'active_plugins' );
741
 
742
  /* Save data for settings page */
743
  if ( isset( $_REQUEST['gllr_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'gllr_nonce_name' ) ) {
@@ -787,6 +806,8 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
787
  }
788
  if ( get_option( 'cstmsrch_options' ) )
789
  update_option( 'cstmsrch_options', $cstmsrch_options, '', 'yes' );
 
 
790
  elseif ( get_option( 'bws_custom_search' ) )
791
  update_option( 'bws_custom_search', $cstmsrch_options, '', 'yes' );
792
 
@@ -798,13 +819,6 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
798
  $message = __( "Settings are saved", 'gallery' );
799
  }
800
 
801
- if ( ! file_exists( get_stylesheet_directory() . '/gallery-template.php' ) || ! file_exists( get_stylesheet_directory() . '/gallery-single-template.php' ) ) {
802
- gllr_plugin_install();
803
- }
804
- if ( ! file_exists( get_stylesheet_directory() . '/gallery-template.php' ) || ! file_exists( get_stylesheet_directory() . '/gallery-single-template.php' ) ) {
805
- $error .= __( 'The following files "gallery-template.php" and "gallery-single-template.php" were not found in the directory of your theme. Please copy them from the directory `/wp-content/plugins/gallery-plugin/template/` to the directory of your theme for the correct work of the Gallery plugin', 'gallery' );
806
- }
807
-
808
  /* GO PRO */
809
  if ( isset( $_GET['action'] ) && 'go_pro' == $_GET['action'] ) {
810
  global $bstwbsftwppdtplgns_options;
@@ -862,29 +876,40 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
862
  $url = 'http://bestwebsoft.com/wp-content/plugins/paid-products/plugins/downloads/?bws_first_download=' . $bws_license_plugin . '&bws_license_key=' . $bws_license_key . '&download_from=5';
863
  $uploadDir = wp_upload_dir();
864
  $zip_name = explode( '/', $bws_license_plugin );
865
- if ( file_put_contents( $uploadDir["path"] . "/" . $zip_name[0] . ".zip", file_get_contents( $url ) ) ) {
866
- @chmod( $uploadDir["path"] . "/" . $zip_name[0] . ".zip", octdec( 755 ) );
867
- if ( class_exists( 'ZipArchive' ) ) {
868
- $zip = new ZipArchive();
869
- if ( $zip->open( $uploadDir["path"] . "/" . $zip_name[0] . ".zip" ) === TRUE ) {
870
- $zip->extractTo( WP_PLUGIN_DIR );
871
- $zip->close();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
872
  } else {
873
- $error = __( "Failed to open the zip archive. Please, upload the plugin manually", 'gallery' );
874
- }
875
- } elseif ( class_exists( 'Phar' ) ) {
876
- $phar = new PharData( $uploadDir["path"] . "/" . $zip_name[0] . ".zip" );
877
- $phar->extractTo( WP_PLUGIN_DIR );
878
  } else {
879
- $error = __( "Your server does not support either ZipArchive or Phar. Please, upload the plugin manually", 'gallery' );
880
  }
881
- @unlink( $uploadDir["path"] . "/" . $zip_name[0] . ".zip" );
882
- } else {
883
- $error = __( "Failed to download the zip archive. Please, upload the plugin manually", 'gallery' );
884
  }
885
 
886
  /* activate Pro */
887
- if ( file_exists( WP_PLUGIN_DIR . '/' . $zip_name[0] ) ) {
 
888
  array_push( $active_plugins, $bws_license_plugin );
889
  update_option( 'active_plugins', $active_plugins );
890
  $pro_plugin_is_activated = true;
@@ -899,7 +924,8 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
899
  }
900
  } else {
901
  /* activate Pro */
902
- if ( ! ( in_array( $bws_license_plugin, $active_plugins ) || is_plugin_active_for_network( $bws_license_plugin ) ) ) {
 
903
  array_push( $active_plugins, $bws_license_plugin );
904
  update_option( 'active_plugins', $active_plugins );
905
  $pro_plugin_is_activated = true;
@@ -1126,10 +1152,10 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
1126
  <tr valign="top">
1127
  <th scope="row"><?php _e( 'Add gallery to the search', 'gallery' ); ?></th>
1128
  <td>
1129
- <?php if ( array_key_exists( 'custom-search-plugin/custom-search-plugin.php', $all_plugins ) ) {
1130
- if ( 0 < count( preg_grep( '/custom-search-plugin\/custom-search-plugin.php/', $active_plugins ) ) || is_plugin_active_for_network( 'custom-search-plugin/custom-search-plugin.php' ) ) { ?>
1131
  <input type="checkbox" name="gllr_add_to_search" value="1" <?php if ( isset( $cstmsrch_options ) && in_array( 'gallery', $cstmsrch_options ) ) echo "checked=\"checked\""; ?> />
1132
- <span style="color: #888888;font-size: 10px;"> (<?php _e( 'Using', 'gallery' ); ?> <a href="admin.php?page=custom_search.php">Custom Search</a> <?php _e( 'powered by', 'gallery' ); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>)</span>
1133
  <?php } else { ?>
1134
  <input disabled="disabled" type="checkbox" name="gllr_add_to_search" value="1" <?php if ( isset( $cstmsrch_options ) && in_array( 'gallery', $cstmsrch_options ) ) echo "checked=\"checked\""; ?> />
1135
  <span style="color: #888888;font-size: 10px;">(<?php _e( 'Using Custom Search powered by', 'gallery' ); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="<?php echo bloginfo("url"); ?>/wp-admin/plugins.php"><?php _e( 'Activate Custom Search', 'gallery' ); ?></a></span>
@@ -1297,57 +1323,56 @@ if ( ! function_exists( 'gllr_plugin_action_links' ) ) {
1297
  return $links;
1298
  }
1299
  }
1300
- // end function gllr_plugin_action_links
1301
 
1302
  if ( ! function_exists ( 'gllr_add_admin_script' ) ) {
1303
  function gllr_add_admin_script() {
1304
  global $wp_version; ?>
1305
  <script type="text/javascript">
1306
- (function($) {
1307
- $(document).ready( function() {
1308
- $( '.gllr_image_block img' ).css( 'cursor', 'all-scroll' );
1309
- $( '.gllr_order_message' ).removeClass( 'hidden' );
1310
- var d = false;
1311
- if ( $.fn.sortable ) {
1312
- $( '#Upload-File .gallery' ).sortable( {
1313
- stop: function( event, ui ) {
1314
- $( '.gllr_order_text' ).removeClass( 'hidden' );
1315
- var g = $( '#Upload-File .gallery' ).sortable( 'toArray' );
1316
- var f = g.length;
1317
- $.each( g,
1318
- function( k,l ){
1319
- var j = d?(f-k):(1+k);
1320
- $( '.gllr_order_text[name^="gllr_order_text[' + l + ']"]' ).val( j );
1321
- }
1322
- )
1323
- }
1324
- });
1325
- $( '#Upload-File .gallery input' ).bind( 'click.sortable mousedown.sortable',function( ev ) {
1326
- ev.target.focus();
1327
- });
1328
- }
1329
- <?php if ( 3.5 > $wp_version && 'gallery-plugin.php' == $_REQUEST['page'] ) { ?>
1330
- var gllr_farbtastic = $.farbtastic( '#colorPickerDiv', function( color ) {
1331
- gllr_farbtastic.setColor( color );
1332
- $( '#gllr_border_images_color' ).val( color );
1333
- $( '#gllr_border_images_color_small' ).css( 'background-color', color );
1334
- });
1335
- $( '#gllr_border_images_color' ).click( function() {
1336
- $( '#colorPickerDiv' ).show();
1337
- });
1338
- $( '#gllr_border_images_color_small' ).click( function() {
1339
- $( '#colorPickerDiv' ).show();
1340
- });
1341
- $(document).mousedown( function() {
1342
- $( '#colorPickerDiv' ).each( function() {
1343
- var display = $( this ).css( 'display' );
1344
- if ( display == 'block' )
1345
- jQuery( this ).fadeOut(2);
1346
  });
1347
- });
1348
- <?php } ?>
1349
- });
1350
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
1351
  </script>
1352
  <?php }
1353
  }
@@ -1391,7 +1416,7 @@ if ( ! function_exists ( 'gllr_admin_head' ) ) {
1391
 
1392
  if ( ! function_exists ( 'gllr_wp_head' ) ) {
1393
  function gllr_wp_head() {
1394
- wp_enqueue_style( 'gllr_stylesheet', plugins_url( 'css/style.css', __FILE__ ) );
1395
  wp_enqueue_style( 'gllr_fancybox_stylesheet', plugins_url( 'fancybox/jquery.fancybox-1.3.4.css', __FILE__ ) );
1396
  wp_enqueue_script( 'gllr_fancybox_mousewheel_js', plugins_url( 'fancybox/jquery.mousewheel-3.0.4.pack.js', __FILE__ ), array( 'jquery' ) );
1397
  wp_enqueue_script( 'gllr_fancybox_js', plugins_url( 'fancybox/jquery.fancybox-1.3.4.pack.js', __FILE__ ), array( 'jquery' ) );
@@ -1419,146 +1444,192 @@ if ( ! function_exists ( 'gllr_shortcode' ) ) {
1419
  $gllr_download_link_title = addslashes( __( 'Download high resolution image', 'gallery' ) );
1420
  extract( shortcode_atts( array(
1421
  'id' => '',
1422
- 'display' => 'full'
 
1423
  ), $attr )
1424
  );
1425
- $args = array(
1426
- 'post_type' => 'gallery',
1427
- 'post_status' => 'publish',
1428
- 'p' => $id,
1429
- 'posts_per_page' => 1
1430
- );
1431
  ob_start();
1432
- $second_query = new WP_Query( $args );
1433
  $gllr_options = get_option( 'gllr_options' );
1434
- if ( $display == 'short' ) { ?>
1435
- <div class="gallery_box">
1436
- <ul>
1437
- <?php global $post, $wpdb, $wp_query;
1438
- if ( $second_query->have_posts() ) : $second_query->the_post();
1439
- $attachments = get_post_thumbnail_id( $post->ID );
1440
- if ( empty ( $attachments ) ) {
1441
- $attachments = get_children( 'post_parent=' . $post->ID . '&post_type=attachment&post_mime_type=image&numberposts=1' );
1442
- $id = key( $attachments );
1443
- $image_attributes = wp_get_attachment_image_src( $id, 'album-thumb' );
1444
- } else {
1445
- $image_attributes = wp_get_attachment_image_src( $attachments, 'album-thumb' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1446
  } ?>
1447
- <li>
1448
- <a rel="bookmark" href="<?php echo get_permalink(); ?>" title="<?php the_title(); ?>">
1449
- <img style="width:<?php echo $gllr_options['gllr_custom_size_px'][0][0]; ?>px;" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php echo $image_attributes[0]; ?>" />
1450
- </a>
1451
- <div class="gallery_detail_box">
1452
- <div><?php the_title(); ?></div>
1453
- <div><?php echo the_excerpt_max_charlength( 100 ); ?></div>
1454
- <a href="<?php echo get_permalink( $post->ID ); ?>"><?php echo $gllr_options["read_more_link_text"]; ?></a>
1455
- </div><!-- .gallery_detail_box -->
1456
- <div class="gllr_clear"></div>
1457
- </li>
1458
- <?php endif; ?>
1459
- </ul>
1460
- </div><!-- .gallery_box -->
1461
- <?php } else {
1462
- if ( $second_query->have_posts() ) :
1463
- while ( $second_query->have_posts() ) :
1464
- global $post;
1465
- $second_query->the_post(); ?>
1466
- <div class="gallery_box_single">
1467
- <?php echo do_shortcode( get_the_content() );
1468
- $posts = get_posts( array(
1469
- "showposts" => -1,
1470
- "what_to_show" => "posts",
1471
- "post_status" => "inherit",
1472
- "post_type" => "attachment",
1473
- "orderby" => $gllr_options['order_by'],
1474
- "order" => $gllr_options['order'],
1475
- "post_mime_type" => "image/jpeg,image/gif,image/jpg,image/png",
1476
- "post_parent" => $post->ID
1477
- ));
1478
- if ( 0 < count( $posts ) ) {
1479
- $count_image_block = 0; ?>
1480
- <div class="gallery clearfix">
1481
- <?php foreach ( $posts as $attachment ) {
1482
- $key = "gllr_image_text";
1483
- $link_key = "gllr_link_url";
1484
- $alt_tag_key = "gllr_image_alt_tag";
1485
- $image_attributes = wp_get_attachment_image_src( $attachment->ID, 'photo-thumb' );
1486
- $image_attributes_large = wp_get_attachment_image_src( $attachment->ID, 'large' );
1487
- $image_attributes_full = wp_get_attachment_image_src( $attachment->ID, 'full' );
1488
- if ( 1 == $gllr_options['border_images'] ) {
1489
- $gllr_border = 'border-width: ' . $gllr_options['border_images_width'] . 'px; border-color:' . $gllr_options['border_images_color'] . '';
1490
- $gllr_border_images = $gllr_options['border_images_width'] * 2;
1491
- } else {
1492
- $gllr_border = '';
1493
- $gllr_border_images = 0;
1494
- }
1495
- if ( $count_image_block % $gllr_options['custom_image_row_count'] == 0 ) { ?>
1496
- <div class="gllr_image_row">
1497
- <?php } ?>
1498
- <div class="gllr_image_block">
1499
- <p style="width:<?php echo $gllr_options['gllr_custom_size_px'][1][0] + $gllr_border_images; ?>px;height:<?php echo $gllr_options['gllr_custom_size_px'][1][1] + $gllr_border_images; ?>px;">
1500
- <?php if ( ( $url_for_link = get_post_meta( $attachment->ID, $link_key, true ) ) != "" ) { ?>
1501
- <a href="<?php echo $url_for_link; ?>" title="<?php echo get_post_meta( $attachment->ID, $key, true ); ?>" target="_blank">
1502
- <img style="width:<?php echo $gllr_options['gllr_custom_size_px'][1][0]; ?>px;height:<?php echo $gllr_options['gllr_custom_size_px'][1][1]; ?>px; <?php echo $gllr_border; ?>" alt="<?php echo get_post_meta( $attachment->ID, $alt_tag_key, true ); ?>" title="<?php echo get_post_meta( $attachment->ID, $key, true ); ?>" src="<?php echo $image_attributes[0]; ?>" />
1503
- </a>
1504
- <?php } else { ?>
1505
- <a rel="gallery_fancybox<?php if ( 0 == $gllr_options['single_lightbox_for_multiple_galleries'] ) echo '_' . $post->ID; ?>" href="<?php echo $image_attributes_large[0]; ?>" title="<?php echo get_post_meta( $attachment->ID, $key, true ); ?>">
1506
- <img style="width:<?php echo $gllr_options['gllr_custom_size_px'][1][0]; ?>px;height:<?php echo $gllr_options['gllr_custom_size_px'][1][1]; ?>px; <?php echo $gllr_border; ?>" alt="<?php echo get_post_meta( $attachment->ID, $alt_tag_key, true ); ?>" title="<?php echo get_post_meta( $attachment->ID, $key, true ); ?>" src="<?php echo $image_attributes[0]; ?>" rel="<?php echo $image_attributes_full[0]; ?>" />
1507
- </a>
1508
- <?php } ?>
1509
- </p>
1510
- <div style="width:<?php echo $gllr_options['gllr_custom_size_px'][1][0] + $gllr_border_images; ?>px; <?php if ( 0 == $gllr_options["image_text"] ) echo "display:none;"; ?>" class="gllr_single_image_text"><?php echo get_post_meta( $attachment->ID, $key, true ); ?>&nbsp;</div>
1511
- </div><!-- .gllr_image_block -->
1512
- <?php if ( $count_image_block%$gllr_options['custom_image_row_count'] == $gllr_options['custom_image_row_count']-1 ) { ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1513
  </div><!-- .gllr_image_row -->
1514
- <?php }
1515
- $count_image_block++;
1516
- }
1517
- if ( 0 < $count_image_block && $count_image_block%$gllr_options['custom_image_row_count'] != 0 ) { ?>
1518
- </div><!-- .gllr_image_row -->
1519
- <?php } ?>
1520
- </div><!-- .gallery.clearfix -->
1521
- <?php } ?>
 
1522
  </div><!-- .gallery_box_single -->
1523
- <div class="gllr_clear"></div>
1524
- <?php endwhile;
1525
- else: ?>
1526
- <div class="gallery_box_single">
1527
- <p class="not_found"><?php _e( 'Sorry, nothing found.', 'gallery' ); ?></p>
1528
- </div><!-- .gallery_box_single -->
1529
- <?php endif; ?>
1530
- <?php if ( 1 == $gllr_options['return_link_shortcode'] ) {
1531
- if ( 'gallery_template_url' == $gllr_options["return_link_page"] ) {
1532
- global $wpdb;
1533
- $parent = $wpdb->get_var( "SELECT $wpdb->posts.ID FROM $wpdb->posts, $wpdb->postmeta WHERE meta_key = '_wp_page_template' AND meta_value = 'gallery-template.php' AND (post_status = 'publish' OR post_status = 'private') AND $wpdb->posts.ID = $wpdb->postmeta.post_id" ); ?>
1534
- <div class="return_link"><a href="<?php echo ( ! empty( $parent ) ? get_permalink( $parent ) : '' ); ?>"><?php echo $gllr_options['return_link_text']; ?></a></div>
1535
- <?php } else { ?>
1536
- <div class="return_link"><a href="<?php echo $gllr_options["return_link_url"]; ?>"><?php echo $gllr_options['return_link_text']; ?></a></div>
1537
- <?php }
1538
- } ?>
1539
- <script type="text/javascript">
1540
- (function($) {
1541
- $(document).ready( function() {
1542
- $( "a[rel=gallery_fancybox<?php if ( 0 == $gllr_options['single_lightbox_for_multiple_galleries'] ) echo '_' . $post->ID; ?>]" ).fancybox( {
1543
- 'transitionIn' : 'elastic',
1544
- 'transitionOut' : 'elastic',
1545
- 'titlePosition' : 'inside',
1546
- 'speedIn' : 500,
1547
- 'speedOut' : 300,
1548
- 'titleFormat' : function( title, currentArray, currentIndex, currentOpts ) {
1549
- return '<div id="fancybox-title-inside">' + ( title.length ? '<span id="bws_gallery_image_title">' + title + '</span><br />' : '' ) + '<span id="bws_gallery_image_counter"><?php _e( "Image", "gallery"); ?> ' + ( currentIndex + 1 ) + ' / ' + currentArray.length + '</span></div><?php if( get_post_meta( $post->ID, 'gllr_download_link', true ) != '' ){?><a id="bws_gallery_download_link" href="' + $( currentOpts.orig ).attr( 'rel' ) + '" target="_blank"><?php echo $gllr_download_link_title; ?> </a><?php } ?>';
1550
- }<?php if ( 1 == $gllr_options['start_slideshow'] ) { ?>,
1551
- 'onComplete': function() {
1552
- clearTimeout( jQuery.fancybox.slider );
1553
- jQuery.fancybox.slider = setTimeout( "jQuery.fancybox.next()",<?php echo empty( $gllr_options['slideshow_interval'] ) ? 2000 : $gllr_options['slideshow_interval'] ; ?> );
1554
- }<?php } ?>
1555
  });
1556
- });
1557
- })(jQuery);
1558
- </script>
1559
- <?php }
 
1560
  $gllr_output = ob_get_clean();
1561
- wp_reset_query();
1562
  return $gllr_output;
1563
  }
1564
  }
@@ -1966,13 +2037,14 @@ if ( ! function_exists ( 'gllr_plugin_banner' ) ) {
1966
  if ( 'plugins.php' == $hook_suffix ) {
1967
  global $bstwbsftwppdtplgns_cookie_add, $gllr_plugin_info;
1968
  $banner_array = array(
 
1969
  array( 'lmtttmpts_hide_banner_on_plugin_page', 'limit-attempts/limit-attempts.php', '1.0.2' ),
1970
  array( 'sndr_hide_banner_on_plugin_page', 'sender/sender.php', '0.5' ),
1971
  array( 'srrl_hide_banner_on_plugin_page', 'user-role/user-role.php', '1.4' ),
1972
  array( 'pdtr_hide_banner_on_plugin_page', 'updater/updater.php', '1.12' ),
1973
  array( 'cntctfrmtdb_hide_banner_on_plugin_page', 'contact-form-to-db/contact_form_to_db.php', '1.2' ),
1974
- array( 'cntctfrmmlt_hide_banner_on_plugin_page', 'contact-form-multi/contact-form-multi.php', '1.0.7' ),
1975
- array( 'gglmps_hide_banner_on_plugin_page', 'bws-google-maps/bws-google-maps.php', '1.2' ),
1976
  array( 'fcbkbttn_hide_banner_on_plugin_page', 'facebook-button-plugin/facebook-button-plugin.php', '2.29' ),
1977
  array( 'twttr_hide_banner_on_plugin_page', 'twitter-plugin/twitter.php', '2.34' ),
1978
  array( 'pdfprnt_hide_banner_on_plugin_page', 'pdf-print/pdf-print.php', '1.7.1' ),
@@ -1980,16 +2052,13 @@ if ( ! function_exists ( 'gllr_plugin_banner' ) ) {
1980
  array( 'gglstmp_hide_banner_on_plugin_page', 'google-sitemap-plugin/google-sitemap-plugin.php', '2.8.4' ),
1981
  array( 'cntctfrmpr_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-pro/contact_form_pro.php', '1.14' ),
1982
  array( 'cntctfrm_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.62' ),
1983
- array( 'cntctfrm_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.47' ),
1984
  array( 'cptch_hide_banner_on_plugin_page', 'captcha/captcha.php', '3.8.4' ),
1985
- array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' )
1986
  );
1987
  if ( ! $gllr_plugin_info )
1988
  $gllr_plugin_info = get_plugin_data( __FILE__ );
1989
 
1990
- if ( ! function_exists( 'is_plugin_active_for_network' ) )
1991
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
1992
-
1993
  $active_plugins = get_option( 'active_plugins' );
1994
  $all_plugins = get_plugins();
1995
  $this_banner = 'gllr_hide_banner_on_plugin_page';
@@ -2033,7 +2102,7 @@ if ( ! function_exists ( 'gllr_plugin_banner' ) ) {
2033
  </div>
2034
  <?php break;
2035
  }
2036
- if ( isset( $all_plugins[ $value[1] ] ) && $all_plugins[ $value[1] ]["Version"] >= $value[2] && ( 0 < count( preg_grep( '/' . str_replace( '/', '\/', $value[1] ) . '/', $active_plugins ) ) || is_plugin_active_for_network( $value[1] ) ) && ! isset( $_COOKIE[ $value[0] ] ) ) {
2037
  break;
2038
  }
2039
  }
@@ -2043,11 +2112,12 @@ if ( ! function_exists ( 'gllr_plugin_banner' ) ) {
2043
 
2044
  if ( ! function_exists( 'gllr_plugin_uninstall' ) ) {
2045
  function gllr_plugin_uninstall() {
2046
- if ( file_exists( get_stylesheet_directory() . '/gallery-template.php' ) && ! unlink( get_stylesheet_directory() . '/gallery-template.php' ) ) {
2047
- add_action( 'admin_notices', create_function( '', ' return "Error delete template file";' ) );
2048
- }
2049
- if ( file_exists( get_stylesheet_directory() . '/gallery-single-template.php' ) && ! unlink( get_stylesheet_directory() . '/gallery-single-template.php' ) ) {
2050
- add_action( 'admin_notices', create_function( '', ' return "Error delete template file";' ) );
 
2051
  }
2052
  delete_option( 'gllr_options' );
2053
  }
@@ -2065,6 +2135,8 @@ add_action( 'admin_menu', 'add_gllr_admin_menu' );
2065
  add_action( 'init', 'gllr_init' );
2066
  add_action( 'admin_init', 'gllr_admin_init' );
2067
 
 
 
2068
  add_filter( 'rewrite_rules_array', 'gllr_custom_permalinks' ); /* Add custom permalink for gallery */
2069
  add_action( 'wp_loaded', 'gllr_flush_rules' );
2070
  /* Add themplate for single gallery page */
4
  Plugin URI: http://bestwebsoft.com/products/
5
  Description: This plugin allows you to implement gallery page into web site.
6
  Author: BestWebSoft
7
+ Version: 4.2.7
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
11
 
12
+ /* © Copyright 2015 BestWebSoft ( http://support.bestwebsoft.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, version 2, as
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  */
27
 
28
+ global $gllr_filenames, $gllr_filepath, $gllr_themepath;
29
+ $gllr_filepath = WP_PLUGIN_DIR . '/gallery-plugin/template/';
30
+ $gllr_themepath = get_stylesheet_directory() . '/';
31
+
32
+ $gllr_filenames[] = 'gallery-single-template.php';
33
+ $gllr_filenames[] = 'gallery-template.php';
34
+
35
  if ( ! function_exists( 'add_gllr_admin_menu' ) ) {
36
  function add_gllr_admin_menu() {
37
  global $bstwbsftwppdtplgns_options, $bstwbsftwppdtplgns_added_menu;
187
 
188
  if ( ! function_exists( 'gllr_plugin_install' ) ) {
189
  function gllr_plugin_install() {
190
+ global $gllr_filenames, $gllr_filepath, $gllr_themepath;
191
+ @chmod( $gllr_themepath, octdec( 755 ) );
192
+ foreach ( $gllr_filenames as $filename ) {
193
+ if ( ! file_exists( $gllr_themepath . $filename ) ) {
194
+ $handle = @fopen( $gllr_filepath . $filename, "r" );
195
+ $contents = @fread( $handle, filesize( $gllr_filepath . $filename ) );
196
+ @fclose( $handle );
197
+ if ( ! ( $handle = @fopen( $gllr_themepath . $filename, 'w' ) ) )
198
+ return false;
199
+ @fwrite( $handle, $contents );
200
+ @fclose( $handle );
201
+ @chmod( $gllr_themepath . $filename, octdec( 755 ) );
202
+ } else {
203
+ $handle = @fopen( $gllr_themepath . $filename, "r" );
204
+ $contents = @fread( $handle, filesize( $gllr_themepath . $filename ) );
205
+ @fclose( $handle );
206
+ if ( ! ( $handle = @fopen( $gllr_themepath . $filename . '.bak', 'w' ) ) )
207
+ return false;
208
+ @fwrite( $handle, $contents );
209
+ @fclose( $handle );
210
+
211
+ $handle = @fopen( $gllr_filepath . $filename, "r" );
212
+ $contents = @fread( $handle, filesize( $gllr_filepath . $filename ) );
213
+ @fclose( $handle );
214
+ if ( ! ( $handle = @fopen( $gllr_themepath . $filename, 'w' ) ) )
215
+ return false;
216
+ @fwrite( $handle, $contents );
217
+ @fclose( $handle );
218
+ @chmod( $gllr_themepath . $filename, octdec( 755 ) );
219
+ }
 
 
220
  }
221
+ @chmod( $gllr_themepath, octdec( 644 ) );
222
+ }
223
+ }
224
+
225
+ if ( ! function_exists ( 'gllr_after_switch_theme' ) ) {
226
+ function gllr_after_switch_theme() {
227
+ global $gllr_filenames, $gllr_themepath;
228
+ $file_exists_flag = true;
229
+ foreach ( $gllr_filenames as $filename ) {
230
+ if ( ! file_exists( $gllr_themepath . $filename ) )
231
+ $file_exists_flag = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  }
233
+ if ( ! $file_exists_flag )
234
+ gllr_plugin_install();
235
  }
236
  }
237
 
238
  if ( ! function_exists( 'gllr_admin_error' ) ) {
239
  function gllr_admin_error() {
240
+ global $gllr_filenames, $gllr_filepath, $gllr_themepath;
241
+
242
  $post = isset( $_REQUEST['post'] ) ? $_REQUEST['post'] : "" ;
243
+ $post_type = isset( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : get_post_type( $post );
244
+
245
+ $file_exists_flag = true;
246
+ if ( 'gallery' == $post_type || ( isset( $_REQUEST['page'] ) && 'gallery-plugin.php' == $_REQUEST['page'] ) ) {
247
+ foreach ( $gllr_filenames as $filename ) {
248
+ if ( ! file_exists( $gllr_themepath . $filename ) )
249
+ $file_exists_flag = false;
250
+ }
251
+ }
252
+ if ( ! $file_exists_flag )
253
  echo '<div class="error"><p><strong>' . __( 'The following files "gallery-template.php" and "gallery-single-template.php" were not found in the directory of your theme. Please copy them from the directory `/wp-content/plugins/gallery-plugin/template/` to the directory of your theme for the correct work of the Gallery plugin', 'gallery' ) . '</strong></p></div>';
254
  }
255
  }
279
  'has_archive' => false,
280
  'hierarchical' => true,
281
  'supports' => array( 'title', 'editor', 'thumbnail', 'author', 'page-attributes', 'comments' ),
282
+ 'register_meta_box_cb' => 'init_metaboxes_gallery',
283
+ 'taxonomy' => array( 'gallery_categories' )
284
  ) );
285
  }
286
  }
307
  $post_ancestors = $post->ancestors;
308
  }
309
 
310
+ $menuItems = $wpdb->get_col( "SELECT DISTINCT post_id FROM $wpdb->postmeta WHERE meta_key = '_menu_item_object_id' AND meta_value IN (" . implode( ',', $post_ancestors ) . ")" );
 
311
 
312
  if ( is_array( $menuItems ) ) {
313
  foreach ( $menuItems as $menuItem ) {
317
  }
318
  }
319
  }
 
320
  return $classes;
321
  }
322
  }
324
  if ( ! function_exists( 'init_metaboxes_gallery' ) ) {
325
  function init_metaboxes_gallery() {
326
  add_meta_box( 'Upload-File', __( 'Upload File', 'gallery' ), 'gllr_post_custom_box', 'gallery', 'normal', 'high' );
327
+ add_meta_box( 'Gallery-Shortcode', __( 'Gallery Shortcode', 'gallery' ), 'gllr_post_shortcode_box', 'gallery', 'side', 'high' );
328
  }
329
  }
330
 
344
  if ( ! is_writable ( plugin_dir_path( __FILE__ ) ."upload/files/" ) ) {
345
  $error = __( "The gallery temp directory (gallery-plugin/upload/files) is not available for record on your webserver. Please use the standard WP functionality to upload images (media library)", 'gallery' );
346
  $uploader = false;
347
+ }
348
+ /* Add link for Re-attached plugin */
349
+ if ( current_user_can( 'edit_posts' ) ) {
350
+ if ( function_exists( 'rttchr_add_button_in_gallery' ) )
351
+ rttchr_add_button_in_gallery();
352
+ elseif ( function_exists( 'rttchrpr_add_button_in_gallery' ) )
353
+ rttchrpr_add_button_in_gallery();
354
  } ?>
355
  <div style="padding-top:10px;"><label for="uploadscreen"><?php _e( 'Choose an image for upload:', 'gallery' ); ?></label>
356
  <input name="MAX_FILE_SIZE" value="1048576" type="hidden" />
372
  </div>
373
  <script type="text/javascript">
374
  <?php if ( true === $uploader ) { ?>
375
+ jQuery(document).ready( function() {
376
  var uploader = new qq.FileUploader({
377
  element: document.getElementById('file-uploader-demo1'),
378
  action: '../wp-admin/admin-ajax.php?action=upload_gallery_image&gllr_ajax_nonce_field=' + '<?php echo wp_create_nonce( plugin_basename( __FILE__ ), 'gllr_ajax_nonce_field' ); ?>',
415
  echo '<br />' . __( "URL", "gallery" ) . '<br /><input type="text" name="gllr_link_url[' . $page->ID . ']" value="' . get_post_meta( $page->ID, $link_key, TRUE ) . '" class="gllr_link_text" /><br /><span class="small_text">' . __( "(by click on image opens a link in a new window)", "gallery" ) . '</span>';
416
  echo '<a class="bws_plugin_pro_version" href="http://bestwebsoft.com/products/gallery/?k=63a36f6bf5de0726ad6a43a165f38fe5&pn=79&v=' . $gllr_plugin_info["Version"] . '&wp_v=' . $wp_version . '" target="_blank" title="' . __( 'This setting is available in Pro version', 'gallery' ) . '">' .
417
  '<div>' . __( "Open the URL", "gallery" ) . '<br/><input disabled type="radio" value="_self" > ' . __( "Current window", "gallery" ) . '<br/><input disabled type="radio" value="_blank" > ' . __( "New window", "gallery" ) . '<br/>' .
418
+ __( "Lightbox button URL", "gallery" ) . '<br><input class="gllr_link_text" disabled type="text" value="" name="gllrprfssnl_lightbox_button_url"><br/>' .
419
+ __( "Description", "gallery" ) . '<br><input class="gllr_link_text" disabled type="text" value="" name="gllrprfssnl_description"></div></a>';
420
  echo '<div class="delete"><a href="javascript:void(0);" onclick="img_delete(' . $page->ID . ');">' . __( "Delete", "gallery" ) . '</a><div/>';
421
+ /**
422
+ * Add link for Re-attached plugin
423
+ */
424
+ if ( function_exists( 'rttchr_add_button_unattach_gallery' ) )
425
+ rttchr_add_button_unattach_gallery( $page->ID );
426
+ elseif ( function_exists( 'rttchrpr_add_button_unattach_gallery' ) )
427
+ rttchrpr_add_button_unattach_gallery( $page->ID );
428
  echo '</div></li>';
429
  endforeach; ?>
430
  </ul>
431
  <div class="gllr_clear"></div>
432
  <div id="delete_images"></div>
433
+ <?php }
 
434
  }
435
 
436
  /* Create shortcode meta box for gallery post type */
438
  function gllr_post_shortcode_box( $obj = '', $box = '' ) {
439
  global $post; ?>
440
  <p><?php _e( 'You can add a Single Gallery to the page or post by inserting this shortcode into the content', 'gallery' ); ?>:</p>
441
+ <p><span class="gllr_code">[print_gllr id=<?php echo $post->ID; ?>]</span></p>
442
  <p><?php _e( 'If you want to display a short description containing a screenshot and the link to the Single Gallery Page', 'gallery' ); ?>:</p>
443
+ <p><span class="gllr_code">[print_gllr id=<?php echo $post->ID; ?> display=short]</span></p>
444
  <?php }
445
  }
446
 
478
 
479
  $wp_filetype = wp_check_filetype( $filename, null );
480
  $attachment = array(
481
+ 'post_mime_type' => $wp_filetype['type'],
482
+ 'post_title' => $filename,
483
+ 'post_content' => '',
484
+ 'post_status' => 'inherit'
485
  );
486
  $attach_id = wp_insert_attachment( $attachment, $file );
487
  $attach_data = wp_generate_attachment_metadata( $attach_id, $file );
491
  }
492
  }
493
  if ( isset( $_REQUEST['delete_images'] ) ) {
494
+ foreach ( $_REQUEST['delete_images'] as $delete_id ) {
495
  delete_post_meta( $delete_id, $key );
496
  wp_delete_attachment( $delete_id );
497
  if ( isset( $_REQUEST['gllr_order_text'][ $delete_id ] ) )
624
 
625
  if ( ! function_exists( 'gllr_template_redirect' ) ) {
626
  function gllr_template_redirect() {
627
+ global $wp_query, $post, $posts, $gllr_filenames, $gllr_themepath;
628
  if ( 'gallery' == get_post_type() && "" == $wp_query->query_vars["s"] ) {
629
+ $file_exists_flag = true;
630
+ foreach ( $gllr_filenames as $filename ) {
631
+ if ( ! file_exists( $gllr_themepath . $filename ) )
632
+ $file_exists_flag = false;
633
+ }
634
+ if ( $file_exists_flag ) {
635
+ include( STYLESHEETPATH . '/gallery-single-template.php' );
636
+ exit();
637
+ }
638
  }
639
  }
640
  }
667
  )
668
  ORDER BY $wpdb->posts.post_title ASC" );
669
  switch ( $column ) {
 
670
  case "autor":
671
  $author_id = $post->post_author;
672
  echo '<a href="edit.php?post_type=post&amp;author=' . $author_id . '">' . get_the_author_meta( 'user_nicename' , $author_id ) . '</a>';
724
  $post_type = get_query_var( 'post_type' );
725
  $parent_id = 0;
726
  if ( "gallery" == $post_type ) {
727
+ $parent_id = $wpdb->get_var( "SELECT $wpdb->posts.ID FROM $wpdb->posts, $wpdb->postmeta WHERE `meta_key` = '_wp_page_template' AND `meta_value` = 'gallery-template.php' AND `post_status` = 'publish' AND $wpdb->posts.ID = $wpdb->postmeta.post_id" );
728
  while ( $parent_id ) {
729
  $page = get_page( $parent_id );
730
  if ( 0 < $page->post_parent )
748
 
749
  if ( get_option( 'cstmsrch_options' ) )
750
  $cstmsrch_options = get_option( 'cstmsrch_options' );
751
+ elseif ( get_option( 'cstmsrchpr_options' ) )
752
+ $cstmsrch_options = get_option( 'cstmsrchpr_options' );
753
  elseif ( get_option( 'bws_custom_search' ) )
754
  $cstmsrch_options = get_option( 'bws_custom_search' );
755
 
756
+ if ( ! function_exists( 'get_plugins' ) )
757
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
758
 
759
+ $all_plugins = get_plugins();
 
760
 
761
  /* Save data for settings page */
762
  if ( isset( $_REQUEST['gllr_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'gllr_nonce_name' ) ) {
806
  }
807
  if ( get_option( 'cstmsrch_options' ) )
808
  update_option( 'cstmsrch_options', $cstmsrch_options, '', 'yes' );
809
+ elseif ( get_option( 'cstmsrchpr_options' ) )
810
+ update_option( 'cstmsrchpr_options', $cstmsrch_options, '', 'yes' );
811
  elseif ( get_option( 'bws_custom_search' ) )
812
  update_option( 'bws_custom_search', $cstmsrch_options, '', 'yes' );
813
 
819
  $message = __( "Settings are saved", 'gallery' );
820
  }
821
 
 
 
 
 
 
 
 
822
  /* GO PRO */
823
  if ( isset( $_GET['action'] ) && 'go_pro' == $_GET['action'] ) {
824
  global $bstwbsftwppdtplgns_options;
876
  $url = 'http://bestwebsoft.com/wp-content/plugins/paid-products/plugins/downloads/?bws_first_download=' . $bws_license_plugin . '&bws_license_key=' . $bws_license_key . '&download_from=5';
877
  $uploadDir = wp_upload_dir();
878
  $zip_name = explode( '/', $bws_license_plugin );
879
+ $received_content = file_get_contents( $url );
880
+ if ( ! $received_content ) {
881
+ $error = __( "Failed to download the zip archive. Please, upload the plugin manually", 'gallery' );
882
+ } else {
883
+ if ( is_writable( $uploadDir["path"] ) ) {
884
+ $file_put_contents = $uploadDir["path"] . "/" . $zip_name[0] . ".zip";
885
+ if ( file_put_contents( $file_put_contents, $received_content ) ) {
886
+ @chmod( $file_put_contents, octdec( 755 ) );
887
+ if ( class_exists( 'ZipArchive' ) ) {
888
+ $zip = new ZipArchive();
889
+ if ( $zip->open( $file_put_contents ) === TRUE ) {
890
+ $zip->extractTo( WP_PLUGIN_DIR );
891
+ $zip->close();
892
+ } else {
893
+ $error = __( "Failed to open the zip archive. Please, upload the plugin manually", 'gallery' );
894
+ }
895
+ } elseif ( class_exists( 'Phar' ) ) {
896
+ $phar = new PharData( $file_put_contents );
897
+ $phar->extractTo( WP_PLUGIN_DIR );
898
+ } else {
899
+ $error = __( "Your server does not support either ZipArchive or Phar. Please, upload the plugin manually", 'gallery' );
900
+ }
901
+ @unlink( $file_put_contents );
902
  } else {
903
+ $error = __( "Failed to download the zip archive. Please, upload the plugin manually", 'gallery' );
904
+ }
 
 
 
905
  } else {
906
+ $error = __( "UploadDir is not writable. Please, upload the plugin manually", 'gallery' );
907
  }
 
 
 
908
  }
909
 
910
  /* activate Pro */
911
+ if ( file_exists( WP_PLUGIN_DIR . '/' . $zip_name[0] ) ) {
912
+ $active_plugins = get_option( 'active_plugins' );
913
  array_push( $active_plugins, $bws_license_plugin );
914
  update_option( 'active_plugins', $active_plugins );
915
  $pro_plugin_is_activated = true;
924
  }
925
  } else {
926
  /* activate Pro */
927
+ if ( ! in_array( $bws_license_plugin, $active_plugins ) ) {
928
+ $active_plugins = get_option( 'active_plugins' );
929
  array_push( $active_plugins, $bws_license_plugin );
930
  update_option( 'active_plugins', $active_plugins );
931
  $pro_plugin_is_activated = true;
1152
  <tr valign="top">
1153
  <th scope="row"><?php _e( 'Add gallery to the search', 'gallery' ); ?></th>
1154
  <td>
1155
+ <?php if ( array_key_exists( 'custom-search-plugin/custom-search-plugin.php', $all_plugins ) || array_key_exists( 'custom-search-pro/custom-search-pro.php', $all_plugins ) ) {
1156
+ if ( is_plugin_active( 'custom-search-plugin/custom-search-plugin.php' ) || is_plugin_active( 'custom-search-pro/custom-search-pro.php' ) ) { ?>
1157
  <input type="checkbox" name="gllr_add_to_search" value="1" <?php if ( isset( $cstmsrch_options ) && in_array( 'gallery', $cstmsrch_options ) ) echo "checked=\"checked\""; ?> />
1158
+ <span style="color: #888888;font-size: 10px;"> (<?php _e( 'Using', 'gallery' ); ?> Custom Search <?php _e( 'powered by', 'gallery' ); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>)</span>
1159
  <?php } else { ?>
1160
  <input disabled="disabled" type="checkbox" name="gllr_add_to_search" value="1" <?php if ( isset( $cstmsrch_options ) && in_array( 'gallery', $cstmsrch_options ) ) echo "checked=\"checked\""; ?> />
1161
  <span style="color: #888888;font-size: 10px;">(<?php _e( 'Using Custom Search powered by', 'gallery' ); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="<?php echo bloginfo("url"); ?>/wp-admin/plugins.php"><?php _e( 'Activate Custom Search', 'gallery' ); ?></a></span>
1323
  return $links;
1324
  }
1325
  }
 
1326
 
1327
  if ( ! function_exists ( 'gllr_add_admin_script' ) ) {
1328
  function gllr_add_admin_script() {
1329
  global $wp_version; ?>
1330
  <script type="text/javascript">
1331
+ (function($) {
1332
+ $(document).ready( function() {
1333
+ $( '.gllr_image_block img' ).css( 'cursor', 'all-scroll' );
1334
+ $( '.gllr_order_message' ).removeClass( 'hidden' );
1335
+ var d = false;
1336
+ if ( $.fn.sortable ) {
1337
+ $( '#Upload-File .gallery' ).sortable( {
1338
+ stop: function( event, ui ) {
1339
+ $( '.gllr_order_text' ).removeClass( 'hidden' );
1340
+ var g = $( '#Upload-File .gallery' ).sortable( 'toArray' );
1341
+ var f = g.length;
1342
+ $.each( g,
1343
+ function( k,l ) {
1344
+ var j = d?(f-k):(1+k);
1345
+ $( '.gllr_order_text[name^="gllr_order_text[' + l + ']"]' ).val( j );
1346
+ }
1347
+ )
1348
+ }
1349
+ });
1350
+ $( '#Upload-File .gallery input' ).bind( 'click.sortable mousedown.sortable',function( ev ) {
1351
+ ev.target.focus();
1352
+ });
1353
+ }
1354
+ <?php if ( 3.5 > $wp_version && 'gallery-plugin.php' == $_REQUEST['page'] ) { ?>
1355
+ var gllr_farbtastic = $.farbtastic( '#colorPickerDiv', function( color ) {
1356
+ gllr_farbtastic.setColor( color );
1357
+ $( '#gllr_border_images_color' ).val( color );
1358
+ $( '#gllr_border_images_color_small' ).css( 'background-color', color );
 
 
 
 
 
 
 
 
 
 
 
 
1359
  });
1360
+ $( '#gllr_border_images_color' ).click( function() {
1361
+ $( '#colorPickerDiv' ).show();
1362
+ });
1363
+ $( '#gllr_border_images_color_small' ).click( function() {
1364
+ $( '#colorPickerDiv' ).show();
1365
+ });
1366
+ $(document).mousedown( function() {
1367
+ $( '#colorPickerDiv' ).each( function() {
1368
+ var display = $( this ).css( 'display' );
1369
+ if ( display == 'block' )
1370
+ jQuery( this ).fadeOut(2);
1371
+ });
1372
+ });
1373
+ <?php } ?>
1374
+ });
1375
+ })(jQuery);
1376
  </script>
1377
  <?php }
1378
  }
1416
 
1417
  if ( ! function_exists ( 'gllr_wp_head' ) ) {
1418
  function gllr_wp_head() {
1419
+ wp_enqueue_style( 'gllr_stylesheet', plugins_url( 'css/frontend_style.css', __FILE__ ) );
1420
  wp_enqueue_style( 'gllr_fancybox_stylesheet', plugins_url( 'fancybox/jquery.fancybox-1.3.4.css', __FILE__ ) );
1421
  wp_enqueue_script( 'gllr_fancybox_mousewheel_js', plugins_url( 'fancybox/jquery.mousewheel-3.0.4.pack.js', __FILE__ ), array( 'jquery' ) );
1422
  wp_enqueue_script( 'gllr_fancybox_js', plugins_url( 'fancybox/jquery.fancybox-1.3.4.pack.js', __FILE__ ), array( 'jquery' ) );
1444
  $gllr_download_link_title = addslashes( __( 'Download high resolution image', 'gallery' ) );
1445
  extract( shortcode_atts( array(
1446
  'id' => '',
1447
+ 'display' => 'full',
1448
+ 'cat_id' => ''
1449
  ), $attr )
1450
  );
 
 
 
 
 
 
1451
  ob_start();
 
1452
  $gllr_options = get_option( 'gllr_options' );
1453
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1454
+ if ( ! empty( $cat_id ) && ( is_plugin_active( 'gallery-categories/gallery-categories.php' ) || is_plugin_active( 'gallery-categories-pro/gallery-categories-pro.php' ) ) ) {
1455
+ global $first_query;
1456
+ $term = get_term( $cat_id, 'gallery_categories' );
1457
+ if ( !empty ( $term ) ) {
1458
+ $args = array(
1459
+ 'post_type' => 'gallery',
1460
+ 'post_status' => 'publish',
1461
+ 'posts_per_page' => -1,
1462
+ 'gallery_categories'=> $term->slug
1463
+ );
1464
+ $first_query = new WP_Query( $args ); ?>
1465
+ <div class="gallery_box">
1466
+ <ul>
1467
+ <?php global $post, $wpdb, $wp_query;
1468
+ if ( $first_query->have_posts() ) {
1469
+ while ( $first_query->have_posts() ) {
1470
+ $first_query->the_post();
1471
+ $attachments = get_post_thumbnail_id( $post->ID );
1472
+ if ( empty ( $attachments ) ) {
1473
+ $attachments = get_children( 'post_parent=' . $post->ID . '&post_type=attachment&post_mime_type=image&numberposts=1' );
1474
+ $id = key( $attachments );
1475
+ $image_attributes = wp_get_attachment_image_src( $id, 'album-thumb' );
1476
+ } else {
1477
+ $image_attributes = wp_get_attachment_image_src( $attachments, 'album-thumb' );
1478
+ } ?>
1479
+ <li>
1480
+ <a rel="bookmark" href="<?php echo get_permalink(); ?>" title="<?php the_title(); ?>">
1481
+ <img style="width:<?php echo $gllr_options['gllr_custom_size_px'][0][0]; ?>px;" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php echo $image_attributes[0]; ?>" />
1482
+ </a>
1483
+ <div class="gallery_detail_box">
1484
+ <div><?php the_title(); ?></div>
1485
+ <div><?php echo the_excerpt_max_charlength( 100 ); ?></div>
1486
+ <a href="<?php echo get_permalink( $post->ID ); ?>"><?php echo $gllr_options["read_more_link_text"]; ?></a>
1487
+ </div><!-- .gallery_detail_box -->
1488
+ <div class="gllr_clear"></div>
1489
+ </li>
1490
+ <?php }
1491
  } ?>
1492
+ </ul>
1493
+ </div><!-- .gallery_box -->
1494
+ <?php wp_reset_query();
1495
+ }
1496
+ } else {
1497
+ $args = array(
1498
+ 'post_type' => 'gallery',
1499
+ 'post_status' => 'publish',
1500
+ 'p' => $id,
1501
+ 'posts_per_page' => 1
1502
+ );
1503
+ $second_query = new WP_Query( $args );
1504
+ if ( $display == 'short' ) { ?>
1505
+ <div class="gallery_box">
1506
+ <ul>
1507
+ <?php global $post, $wpdb, $wp_query;
1508
+ if ( $second_query->have_posts() ) : $second_query->the_post();
1509
+ $attachments = get_post_thumbnail_id( $post->ID );
1510
+ if ( empty ( $attachments ) ) {
1511
+ $attachments = get_children( 'post_parent=' . $post->ID . '&post_type=attachment&post_mime_type=image&numberposts=1' );
1512
+ $id = key( $attachments );
1513
+ $image_attributes = wp_get_attachment_image_src( $id, 'album-thumb' );
1514
+ } else {
1515
+ $image_attributes = wp_get_attachment_image_src( $attachments, 'album-thumb' );
1516
+ } ?>
1517
+ <li>
1518
+ <a rel="bookmark" href="<?php echo get_permalink(); ?>" title="<?php the_title(); ?>">
1519
+ <img style="width:<?php echo $gllr_options['gllr_custom_size_px'][0][0]; ?>px;" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php echo $image_attributes[0]; ?>" />
1520
+ </a>
1521
+ <div class="gallery_detail_box">
1522
+ <div><?php the_title(); ?></div>
1523
+ <div><?php echo the_excerpt_max_charlength( 100 ); ?></div>
1524
+ <a href="<?php echo get_permalink( $post->ID ); ?>"><?php echo $gllr_options["read_more_link_text"]; ?></a>
1525
+ </div><!-- .gallery_detail_box -->
1526
+ <div class="gllr_clear"></div>
1527
+ </li>
1528
+ <?php endif; ?>
1529
+ </ul>
1530
+ </div><!-- .gallery_box -->
1531
+ <?php } else {
1532
+ if ( $second_query->have_posts() ) :
1533
+ while ( $second_query->have_posts() ) :
1534
+ global $post;
1535
+ $second_query->the_post(); ?>
1536
+ <div class="gallery_box_single">
1537
+ <?php echo do_shortcode( get_the_content() );
1538
+ $posts = get_posts( array(
1539
+ "showposts" => -1,
1540
+ "what_to_show" => "posts",
1541
+ "post_status" => "inherit",
1542
+ "post_type" => "attachment",
1543
+ "orderby" => $gllr_options['order_by'],
1544
+ "order" => $gllr_options['order'],
1545
+ "post_mime_type" => "image/jpeg,image/gif,image/jpg,image/png",
1546
+ "post_parent" => $post->ID
1547
+ ));
1548
+ if ( 0 < count( $posts ) ) {
1549
+ $count_image_block = 0; ?>
1550
+ <div class="gallery clearfix">
1551
+ <?php foreach ( $posts as $attachment ) {
1552
+ $key = "gllr_image_text";
1553
+ $link_key = "gllr_link_url";
1554
+ $alt_tag_key = "gllr_image_alt_tag";
1555
+ $image_attributes = wp_get_attachment_image_src( $attachment->ID, 'photo-thumb' );
1556
+ $image_attributes_large = wp_get_attachment_image_src( $attachment->ID, 'large' );
1557
+ $image_attributes_full = wp_get_attachment_image_src( $attachment->ID, 'full' );
1558
+ if ( 1 == $gllr_options['border_images'] ) {
1559
+ $gllr_border = 'border-width: ' . $gllr_options['border_images_width'] . 'px; border-color:' . $gllr_options['border_images_color'] . '';
1560
+ $gllr_border_images = $gllr_options['border_images_width'] * 2;
1561
+ } else {
1562
+ $gllr_border = '';
1563
+ $gllr_border_images = 0;
1564
+ }
1565
+ if ( $count_image_block % $gllr_options['custom_image_row_count'] == 0 ) { ?>
1566
+ <div class="gllr_image_row">
1567
+ <?php } ?>
1568
+ <div class="gllr_image_block">
1569
+ <p style="width:<?php echo $gllr_options['gllr_custom_size_px'][1][0] + $gllr_border_images; ?>px;height:<?php echo $gllr_options['gllr_custom_size_px'][1][1] + $gllr_border_images; ?>px;">
1570
+ <?php if ( ( $url_for_link = get_post_meta( $attachment->ID, $link_key, true ) ) != "" ) { ?>
1571
+ <a href="<?php echo $url_for_link; ?>" title="<?php echo get_post_meta( $attachment->ID, $key, true ); ?>" target="_blank">
1572
+ <img style="width:<?php echo $gllr_options['gllr_custom_size_px'][1][0]; ?>px;height:<?php echo $gllr_options['gllr_custom_size_px'][1][1]; ?>px; <?php echo $gllr_border; ?>" alt="<?php echo get_post_meta( $attachment->ID, $alt_tag_key, true ); ?>" title="<?php echo get_post_meta( $attachment->ID, $key, true ); ?>" src="<?php echo $image_attributes[0]; ?>" />
1573
+ </a>
1574
+ <?php } else { ?>
1575
+ <a rel="gallery_fancybox<?php if ( 0 == $gllr_options['single_lightbox_for_multiple_galleries'] ) echo '_' . $post->ID; ?>" href="<?php echo $image_attributes_large[0]; ?>" title="<?php echo get_post_meta( $attachment->ID, $key, true ); ?>">
1576
+ <img style="width:<?php echo $gllr_options['gllr_custom_size_px'][1][0]; ?>px;height:<?php echo $gllr_options['gllr_custom_size_px'][1][1]; ?>px; <?php echo $gllr_border; ?>" alt="<?php echo get_post_meta( $attachment->ID, $alt_tag_key, true ); ?>" title="<?php echo get_post_meta( $attachment->ID, $key, true ); ?>" src="<?php echo $image_attributes[0]; ?>" rel="<?php echo $image_attributes_full[0]; ?>" />
1577
+ </a>
1578
+ <?php } ?>
1579
+ </p>
1580
+ <div style="width:<?php echo $gllr_options['gllr_custom_size_px'][1][0] + $gllr_border_images; ?>px; <?php if ( 0 == $gllr_options["image_text"] ) echo "display:none;"; ?>" class="gllr_single_image_text"><?php echo get_post_meta( $attachment->ID, $key, true ); ?>&nbsp;</div>
1581
+ </div><!-- .gllr_image_block -->
1582
+ <?php if ( $count_image_block%$gllr_options['custom_image_row_count'] == $gllr_options['custom_image_row_count']-1 ) { ?>
1583
+ </div><!-- .gllr_image_row -->
1584
+ <?php }
1585
+ $count_image_block++;
1586
+ }
1587
+ if ( 0 < $count_image_block && $count_image_block%$gllr_options['custom_image_row_count'] != 0 ) { ?>
1588
  </div><!-- .gllr_image_row -->
1589
+ <?php } ?>
1590
+ </div><!-- .gallery.clearfix -->
1591
+ <?php } ?>
1592
+ </div><!-- .gallery_box_single -->
1593
+ <div class="gllr_clear"></div>
1594
+ <?php endwhile;
1595
+ else: ?>
1596
+ <div class="gallery_box_single">
1597
+ <p class="not_found"><?php _e( 'Sorry, nothing found.', 'gallery' ); ?></p>
1598
  </div><!-- .gallery_box_single -->
1599
+ <?php endif;
1600
+ if ( 1 == $gllr_options['return_link_shortcode'] ) {
1601
+ if ( 'gallery_template_url' == $gllr_options["return_link_page"] ) {
1602
+ global $wpdb;
1603
+ $parent = $wpdb->get_var( "SELECT $wpdb->posts.ID FROM $wpdb->posts, $wpdb->postmeta WHERE meta_key = '_wp_page_template' AND meta_value = 'gallery-template.php' AND (post_status = 'publish' OR post_status = 'private') AND $wpdb->posts.ID = $wpdb->postmeta.post_id" ); ?>
1604
+ <div class="return_link"><a href="<?php echo ( ! empty( $parent ) ? get_permalink( $parent ) : '' ); ?>"><?php echo $gllr_options['return_link_text']; ?></a></div>
1605
+ <?php } else { ?>
1606
+ <div class="return_link"><a href="<?php echo $gllr_options["return_link_url"]; ?>"><?php echo $gllr_options['return_link_text']; ?></a></div>
1607
+ <?php }
1608
+ } ?>
1609
+ <script type="text/javascript">
1610
+ (function($) {
1611
+ $(document).ready( function() {
1612
+ $( "a[rel=gallery_fancybox<?php if ( 0 == $gllr_options['single_lightbox_for_multiple_galleries'] ) echo '_' . $post->ID; ?>]" ).fancybox( {
1613
+ 'transitionIn' : 'elastic',
1614
+ 'transitionOut' : 'elastic',
1615
+ 'titlePosition' : 'inside',
1616
+ 'speedIn' : 500,
1617
+ 'speedOut' : 300,
1618
+ 'titleFormat' : function( title, currentArray, currentIndex, currentOpts ) {
1619
+ return '<div id="fancybox-title-inside">' + ( title.length ? '<span id="bws_gallery_image_title">' + title + '</span><br />' : '' ) + '<span id="bws_gallery_image_counter"><?php _e( "Image", "gallery"); ?> ' + ( currentIndex + 1 ) + ' / ' + currentArray.length + '</span></div><?php if( get_post_meta( $post->ID, 'gllr_download_link', true ) != '' ){?><a id="bws_gallery_download_link" href="' + $( currentOpts.orig ).attr( 'rel' ) + '" target="_blank"><?php echo $gllr_download_link_title; ?> </a><?php } ?>';
1620
+ }<?php if ( 1 == $gllr_options['start_slideshow'] ) { ?>,
1621
+ 'onComplete': function() {
1622
+ clearTimeout( jQuery.fancybox.slider );
1623
+ jQuery.fancybox.slider = setTimeout( "jQuery.fancybox.next()",<?php echo empty( $gllr_options['slideshow_interval'] ) ? 2000 : $gllr_options['slideshow_interval'] ; ?> );
1624
+ }<?php } ?>
1625
+ });
 
 
 
 
 
1626
  });
1627
+ })(jQuery);
1628
+ </script>
1629
+ <?php }
1630
+ wp_reset_query();
1631
+ }
1632
  $gllr_output = ob_get_clean();
 
1633
  return $gllr_output;
1634
  }
1635
  }
2037
  if ( 'plugins.php' == $hook_suffix ) {
2038
  global $bstwbsftwppdtplgns_cookie_add, $gllr_plugin_info;
2039
  $banner_array = array(
2040
+ array( 'sbscrbr_hide_banner_on_plugin_page', 'subscriber/subscriber.php', '1.1.8' ),
2041
  array( 'lmtttmpts_hide_banner_on_plugin_page', 'limit-attempts/limit-attempts.php', '1.0.2' ),
2042
  array( 'sndr_hide_banner_on_plugin_page', 'sender/sender.php', '0.5' ),
2043
  array( 'srrl_hide_banner_on_plugin_page', 'user-role/user-role.php', '1.4' ),
2044
  array( 'pdtr_hide_banner_on_plugin_page', 'updater/updater.php', '1.12' ),
2045
  array( 'cntctfrmtdb_hide_banner_on_plugin_page', 'contact-form-to-db/contact_form_to_db.php', '1.2' ),
2046
+ array( 'cntctfrmmlt_hide_banner_on_plugin_page', 'contact-form-multi/contact-form-multi.php', '1.0.7' ),
2047
+ array( 'gglmps_hide_banner_on_plugin_page', 'bws-google-maps/bws-google-maps.php', '1.2' ),
2048
  array( 'fcbkbttn_hide_banner_on_plugin_page', 'facebook-button-plugin/facebook-button-plugin.php', '2.29' ),
2049
  array( 'twttr_hide_banner_on_plugin_page', 'twitter-plugin/twitter.php', '2.34' ),
2050
  array( 'pdfprnt_hide_banner_on_plugin_page', 'pdf-print/pdf-print.php', '1.7.1' ),
2052
  array( 'gglstmp_hide_banner_on_plugin_page', 'google-sitemap-plugin/google-sitemap-plugin.php', '2.8.4' ),
2053
  array( 'cntctfrmpr_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-pro/contact_form_pro.php', '1.14' ),
2054
  array( 'cntctfrm_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.62' ),
2055
+ array( 'cntctfrm_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.47' ),
2056
  array( 'cptch_hide_banner_on_plugin_page', 'captcha/captcha.php', '3.8.4' ),
2057
+ array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' )
2058
  );
2059
  if ( ! $gllr_plugin_info )
2060
  $gllr_plugin_info = get_plugin_data( __FILE__ );
2061
 
 
 
 
2062
  $active_plugins = get_option( 'active_plugins' );
2063
  $all_plugins = get_plugins();
2064
  $this_banner = 'gllr_hide_banner_on_plugin_page';
2102
  </div>
2103
  <?php break;
2104
  }
2105
+ if ( isset( $all_plugins[ $value[1] ] ) && $all_plugins[ $value[1] ]["Version"] >= $value[2] && 0 < count( preg_grep( '/' . str_replace( '/', '\/', $value[1] ) . '/', $active_plugins ) ) && ! isset( $_COOKIE[ $value[0] ] ) ) {
2106
  break;
2107
  }
2108
  }
2112
 
2113
  if ( ! function_exists( 'gllr_plugin_uninstall' ) ) {
2114
  function gllr_plugin_uninstall() {
2115
+ global $gllr_filenames, $gllr_themepath;
2116
+
2117
+ foreach ( $gllr_filenames as $filename ) {
2118
+ if ( file_exists( $gllr_themepath . $filename ) && ! unlink( $gllr_themepath . $filename ) ) {
2119
+ add_action( 'admin_notices', create_function( '', ' return "Error delete template file";' ) );
2120
+ }
2121
  }
2122
  delete_option( 'gllr_options' );
2123
  }
2135
  add_action( 'init', 'gllr_init' );
2136
  add_action( 'admin_init', 'gllr_admin_init' );
2137
 
2138
+ add_action( 'after_switch_theme', 'gllr_after_switch_theme', 10, 2 );
2139
+
2140
  add_filter( 'rewrite_rules_array', 'gllr_custom_permalinks' ); /* Add custom permalink for gallery */
2141
  add_action( 'wp_loaded', 'gllr_flush_rules' );
2142
  /* Add themplate for single gallery page */
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=1&
4
  Tags: add album, add gallery, add picture, add pictures, album, foto, fotoalbum, gallery, galery, galary, gallary, gellery, gellary, gelary, gallerie, gallery decription, gallery image, image, multiple pictures, photo, photoalbum, photogallery, pictures, slide show, slideshow, upload images, upload photos, view images, view pictures, website gallery
5
  Requires at least: 3.2
6
  Tested up to: 4.1
7
- Stable tag: 4.2.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -129,16 +129,8 @@ After that your theme will support thumbnail option and the error will disappear
129
 
130
  = How to change image order on the single gallery page? =
131
 
132
- 1. Please open the menu "Galleries" and choose random gallery from the list. It will take you to the gallery editing page.
133
- Please use the drag and drop function to change the order of the images and do not forget to save the post.
134
- Please do not forget to select `Sort images by` -> `sort images` in the plugin settings (http://your_domain/wp-admin/admin.php?page=gallery-plugin.php)
135
-
136
- 2. Please go to the "Galleries" menu and select random gallery in the list. It will take you to the gallery editing page.
137
- There will be one or several media upload icons between the title and the content blocks. Please choose any icon.
138
- After that you'll see a popup window containing three or four tabs.
139
- Go to the Gallery tab and you will see attachments related to this gallery.
140
- You can change their order using the drag and drop option.
141
- Just set an order and click the 'Save' button.
142
 
143
  = I am using WP with rtl language and I have a problem with the lightbox displaying on iPad/iPhone. =
144
 
@@ -173,6 +165,10 @@ Please make sure that the problem hasn't been discussed yet on our forum (<a hre
173
 
174
  == Changelog ==
175
 
 
 
 
 
176
  = V4.2.6 - 24.12.2014 =
177
  * Update : The Dutch and Chinese language files are updated.
178
  * Update : We updated all functionality for wordpress 4.1.
@@ -464,6 +460,9 @@ Please make sure that the problem hasn't been discussed yet on our forum (<a hre
464
 
465
  == Upgrade Notice ==
466
 
 
 
 
467
  = V4.2.6 =
468
  The Dutch and Chinese language files are updated. We updated all functionality for wordpress 4.1. Templates are updated.
469
 
4
  Tags: add album, add gallery, add picture, add pictures, album, foto, fotoalbum, gallery, galery, galary, gallary, gellery, gellary, gelary, gallerie, gallery decription, gallery image, image, multiple pictures, photo, photoalbum, photogallery, pictures, slide show, slideshow, upload images, upload photos, view images, view pictures, website gallery
5
  Requires at least: 3.2
6
  Tested up to: 4.1
7
+ Stable tag: 4.2.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
129
 
130
  = How to change image order on the single gallery page? =
131
 
132
+ 1. If you have WordPress version 3.5 and higher, please open the menu "Galleries" and choose random gallery from the list. It will take you to the gallery editing page. Use the drag and drop function to change the order of the images and do not forget to save the post. Do not forget to select `Sort images by` -> `sort images` in the plugin settings.
133
+ 2. If you have WordPress version older than 3.5, please go to the "Galleries" menu and select random gallery in the list. It will take you to the gallery editing page. There will be one or several media upload icons between the title and the content blocks. Choose any icon. After that you'll see a popup window containing three or four tabs. Go to the Gallery tab and you will see attachments related to this gallery. You can change their order using the drag and drop option. Just set an order and click the 'Save' button.
 
 
 
 
 
 
 
 
134
 
135
  = I am using WP with rtl language and I have a problem with the lightbox displaying on iPad/iPhone. =
136
 
165
 
166
  == Changelog ==
167
 
168
+ = V4.2.7 - 09.02.2015 =
169
+ * Update : Plugin functionality was updated for compatibility with Gallery Categories Plugin and Re-attacher Plugin.
170
+ * Update : Gallery template checking functionality was updated.
171
+
172
  = V4.2.6 - 24.12.2014 =
173
  * Update : The Dutch and Chinese language files are updated.
174
  * Update : We updated all functionality for wordpress 4.1.
460
 
461
  == Upgrade Notice ==
462
 
463
+ = V4.2.7 =
464
+ Plugin functionality was updated for compatibility with Gallery Categories Plugin and Re-attacher Plugin. Gallery template checking functionality was updated.
465
+
466
  = V4.2.6 =
467
  The Dutch and Chinese language files are updated. We updated all functionality for wordpress 4.1. Templates are updated.
468
 
template/gallery-single-template.php CHANGED
@@ -4,7 +4,7 @@
4
  * Version: 1.2
5
  */
6
  get_header(); ?>
7
- <div id="primary" class="content-area">
8
  <div id="container" class="site-content site-main">
9
  <div id="content" class="hentry">
10
  <?php global $post, $wp_query;
4
  * Version: 1.2
5
  */
6
  get_header(); ?>
7
+ <div class="content-area">
8
  <div id="container" class="site-content site-main">
9
  <div id="content" class="hentry">
10
  <?php global $post, $wp_query;