Gallery by BestWebSoft - Version 4.1.0

Version Description

  • 6.12.2013 =
  • NEW : A notice when changing settings on the plugin's settings page was added.
  • NEW : Ability to use shortcode in a text-widget.
  • Bugfix : We fixed the bug of adding gallery to the search.
Download this release

Release Info

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

Code changes from version 4.0.9 to 4.1.0

css/stylesheet.css CHANGED
File without changes
gallery-plugin.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Gallery
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: This plugin allows you to implement gallery page into web site.
6
  Author: BestWebSoft
7
- Version: 4.0.9
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
@@ -691,6 +691,18 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
691
  global $gllr_options, $wp_version, $wpmu;
692
  $error = "";
693
  $plugin_info = get_plugin_data( __FILE__ );
 
 
 
 
 
 
 
 
 
 
 
 
694
 
695
  /* Save data for settings page */
696
  if ( isset( $_REQUEST['gllr_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'gllr_nonce_name' ) ) {
@@ -728,36 +740,30 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
728
  $gllr_request_options["read_more_link_text"] = $_REQUEST['gllr_read_more_link_text'];
729
 
730
  if ( isset( $_REQUEST['gllr_add_to_search'] ) ) {
731
- if ( 0 == $wpmu && get_option( 'bws_custom_search' ) ) {
732
- $cstmsrch_options = get_option( 'bws_custom_search' );
733
- if ( ! in_array( 'gallery', $cstmsrch_options ) ) {
734
  array_push( $cstmsrch_options, 'gallery' );
735
- update_option( 'bws_custom_search', $cstmsrch_options, '', 'yes' );
736
- }
737
- } elseif ( 1 == $wpmu && get_site_option( 'bws_custom_search' ) ) {
738
- $cstmsrch_options = get_site_option( 'bws_custom_search' );
739
- if ( ! in_array( 'gallery', $cstmsrch_options ) ) {
740
  array_push( $cstmsrch_options, 'gallery' );
741
- update_option( 'bws_custom_search', $cstmsrch_options, '', 'yes' );
742
- }
743
  }
744
  } else {
745
- if ( 0 == $wpmu && get_option( 'bws_custom_search' ) ) {
746
- $cstmsrch_options = get_option( 'bws_custom_search' );
747
  if ( in_array( 'gallery', $cstmsrch_options ) ) {
748
  $key = array_search( 'gallery', $cstmsrch_options );
749
  unset( $cstmsrch_options[ $key ] );
750
- update_option( 'bws_custom_search', $cstmsrch_options, '', 'yes' );
751
  }
752
- } elseif ( 1 == $wpmu && get_site_option( 'bws_custom_search' ) ) {
753
- $cstmsrch_options = get_site_option( 'bws_custom_search' );
754
  if ( ! in_array( 'gallery', $cstmsrch_options ) ) {
755
  $key = array_search( 'gallery', $cstmsrch_options );
756
  unset( $cstmsrch_options[ $key ] );
757
- update_option( 'bws_custom_search', $cstmsrch_options, '', 'yes' );
758
  }
759
  }
760
- }
 
 
 
 
761
 
762
  // array merge incase this version has added new options
763
  $gllr_options = array_merge( $gllr_options, $gllr_request_options );
@@ -780,8 +786,9 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
780
  <h2><?php _e( 'Gallery Settings', 'gallery' ); ?></h2>
781
  <div class="updated fade" <?php if( ! isset( $_REQUEST['gllr_form_submit'] ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
782
  <div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
 
783
  <p><?php _e( "If you would like to add a Single Gallery to your page or post, just copy and paste this shortcode into your post or page:", 'gallery' ); ?> [print_gllr id=Your_gallery_post_id]</p>
784
- <form method="post" action="admin.php?page=gallery-plugin.php" id="gllr_form_image_size">
785
  <table class="form-table">
786
  <tr valign="top" class="gllr_width_labels">
787
  <th scope="row"><?php _e( 'Image size for the album cover', 'gallery' ); ?> </th>
@@ -950,14 +957,7 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
950
  <?php $all_plugins = get_plugins();
951
  $active_plugins = get_option( 'active_plugins' );
952
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
953
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
954
- if ( 1 == $wpmu ) {
955
- if ( get_site_option( 'bws_custom_search' ) )
956
- $cstmsrch_options = get_site_option( 'bws_custom_search' );
957
- } else {
958
- if ( get_option( 'bws_custom_search' ) )
959
- $cstmsrch_options = get_option( 'bws_custom_search' );
960
- }
961
  if ( array_key_exists( 'custom-search-plugin/custom-search-plugin.php', $all_plugins ) ) {
962
  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' ) ) { ?>
963
  <input type="checkbox" name="gllr_add_to_search" value="1" <?php if ( isset( $cstmsrch_options ) && in_array( 'gallery', $cstmsrch_options ) ) echo "checked=\"checked\""; ?> />
@@ -1064,25 +1064,32 @@ if ( ! function_exists ( 'gllr_add_admin_script' ) ) {
1064
  });
1065
  }
1066
  <?php if ( $wp_version < 3.5 && $_REQUEST['page'] == 'gallery-plugin.php' ) { ?>
1067
- var gllr_farbtastic = $.farbtastic( '#colorPickerDiv', function( color ) {
1068
- gllr_farbtastic.setColor( color );
1069
- $( '#gllr_border_images_color' ).val( color );
1070
- $( '#gllr_border_images_color_small' ).css( 'background-color', color );
1071
- });
1072
- $( '#gllr_border_images_color' ).click( function() {
1073
- $( '#colorPickerDiv' ).show();
1074
- });
1075
- $( '#gllr_border_images_color_small' ).click( function() {
1076
- $( '#colorPickerDiv' ).show();
1077
- });
1078
- $(document).mousedown( function() {
1079
- $( '#colorPickerDiv' ).each( function() {
1080
- var display = $( this ).css( 'display' );
1081
- if ( display == 'block' )
1082
- jQuery(this).fadeOut(2);
 
1083
  });
1084
- });
1085
  <?php } ?>
 
 
 
 
 
 
 
1086
  });
1087
  })(jQuery);
1088
  </script>
@@ -1538,6 +1545,7 @@ add_action( 'admin_enqueue_scripts', 'gllr_admin_head' );
1538
  add_action( 'wp_enqueue_scripts', 'gllr_wp_head' );
1539
 
1540
  add_shortcode( 'print_gllr', 'gllr_shortcode' );
 
1541
 
1542
  add_action( 'wp_ajax_upload_gallery_image', 'upload_gallery_image' );
1543
 
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: This plugin allows you to implement gallery page into web site.
6
  Author: BestWebSoft
7
+ Version: 4.1.0
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
691
  global $gllr_options, $wp_version, $wpmu;
692
  $error = "";
693
  $plugin_info = get_plugin_data( __FILE__ );
694
+
695
+ if ( 1 == $wpmu ) {
696
+ if ( get_site_option( 'cstmsrch_options' ) )
697
+ $cstmsrch_options = get_site_option( 'cstmsrch_options' );
698
+ elseif ( get_site_option( 'bws_custom_search' ) )
699
+ $cstmsrch_options = get_site_option( 'bws_custom_search' );
700
+ } else {
701
+ if ( get_option( 'cstmsrch_options' ) )
702
+ $cstmsrch_options = get_option( 'cstmsrch_options' );
703
+ elseif ( get_option( 'bws_custom_search' ) )
704
+ $cstmsrch_options = get_option( 'bws_custom_search' );
705
+ }
706
 
707
  /* Save data for settings page */
708
  if ( isset( $_REQUEST['gllr_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'gllr_nonce_name' ) ) {
740
  $gllr_request_options["read_more_link_text"] = $_REQUEST['gllr_read_more_link_text'];
741
 
742
  if ( isset( $_REQUEST['gllr_add_to_search'] ) ) {
743
+ if ( 0 == $wpmu && isset( $cstmsrch_options ) ) {
744
+ if ( ! in_array( 'gallery', $cstmsrch_options ) )
 
745
  array_push( $cstmsrch_options, 'gallery' );
746
+ } elseif ( 1 == $wpmu && isset( $cstmsrch_options ) ) {
747
+ if ( ! in_array( 'gallery', $cstmsrch_options ) )
 
 
 
748
  array_push( $cstmsrch_options, 'gallery' );
 
 
749
  }
750
  } else {
751
+ if ( 0 == $wpmu && isset( $cstmsrch_options ) ) {
 
752
  if ( in_array( 'gallery', $cstmsrch_options ) ) {
753
  $key = array_search( 'gallery', $cstmsrch_options );
754
  unset( $cstmsrch_options[ $key ] );
 
755
  }
756
+ } elseif ( 1 == $wpmu && isset( $cstmsrch_options ) ) {
 
757
  if ( ! in_array( 'gallery', $cstmsrch_options ) ) {
758
  $key = array_search( 'gallery', $cstmsrch_options );
759
  unset( $cstmsrch_options[ $key ] );
 
760
  }
761
  }
762
+ }
763
+ if ( get_option( 'cstmsrch_options' ) )
764
+ update_option( 'cstmsrch_options', $cstmsrch_options, '', 'yes' );
765
+ elseif ( get_option( 'bws_custom_search' ) )
766
+ update_option( 'bws_custom_search', $cstmsrch_options, '', 'yes' );
767
 
768
  // array merge incase this version has added new options
769
  $gllr_options = array_merge( $gllr_options, $gllr_request_options );
786
  <h2><?php _e( 'Gallery Settings', 'gallery' ); ?></h2>
787
  <div class="updated fade" <?php if( ! isset( $_REQUEST['gllr_form_submit'] ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
788
  <div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
789
+ <div id="gllr_settings_notice" class="updated fade" style="display:none"><p><strong><?php _e( "Notice:", 'gallery' ); ?></strong> <?php _e( "The plugin's settings have been changed. In order to save them please don't forget to click the 'Save Changes' button.", 'gallery' ); ?></p></div>
790
  <p><?php _e( "If you would like to add a Single Gallery to your page or post, just copy and paste this shortcode into your post or page:", 'gallery' ); ?> [print_gllr id=Your_gallery_post_id]</p>
791
+ <form id="gllr_settings_form" method="post" action="admin.php?page=gallery-plugin.php">
792
  <table class="form-table">
793
  <tr valign="top" class="gllr_width_labels">
794
  <th scope="row"><?php _e( 'Image size for the album cover', 'gallery' ); ?> </th>
957
  <?php $all_plugins = get_plugins();
958
  $active_plugins = get_option( 'active_plugins' );
959
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
960
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
 
 
 
 
 
 
 
961
  if ( array_key_exists( 'custom-search-plugin/custom-search-plugin.php', $all_plugins ) ) {
962
  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' ) ) { ?>
963
  <input type="checkbox" name="gllr_add_to_search" value="1" <?php if ( isset( $cstmsrch_options ) && in_array( 'gallery', $cstmsrch_options ) ) echo "checked=\"checked\""; ?> />
1064
  });
1065
  }
1066
  <?php if ( $wp_version < 3.5 && $_REQUEST['page'] == 'gallery-plugin.php' ) { ?>
1067
+ var gllr_farbtastic = $.farbtastic( '#colorPickerDiv', function( color ) {
1068
+ gllr_farbtastic.setColor( color );
1069
+ $( '#gllr_border_images_color' ).val( color );
1070
+ $( '#gllr_border_images_color_small' ).css( 'background-color', color );
1071
+ });
1072
+ $( '#gllr_border_images_color' ).click( function() {
1073
+ $( '#colorPickerDiv' ).show();
1074
+ });
1075
+ $( '#gllr_border_images_color_small' ).click( function() {
1076
+ $( '#colorPickerDiv' ).show();
1077
+ });
1078
+ $(document).mousedown( function() {
1079
+ $( '#colorPickerDiv' ).each( function() {
1080
+ var display = $( this ).css( 'display' );
1081
+ if ( display == 'block' )
1082
+ jQuery(this).fadeOut(2);
1083
+ });
1084
  });
 
1085
  <?php } ?>
1086
+ /* add notice about changing in the settings page */
1087
+ $( '#gllr_settings_form input' ).bind( "change click select", function() {
1088
+ if ( $( this ).attr( 'type' ) != 'submit' ) {
1089
+ $( '.updated.fade' ).css( 'display', 'none' );
1090
+ $( '#gllr_settings_notice' ).css( 'display', 'block' );
1091
+ };
1092
+ });
1093
  });
1094
  })(jQuery);
1095
  </script>
1545
  add_action( 'wp_enqueue_scripts', 'gllr_wp_head' );
1546
 
1547
  add_shortcode( 'print_gllr', 'gllr_shortcode' );
1548
+ add_filter( 'widget_text', 'do_shortcode' );
1549
 
1550
  add_action( 'wp_ajax_upload_gallery_image', 'upload_gallery_image' );
1551
 
images/arrow.png CHANGED
File without changes
languages/gallery-bg_BG.mo CHANGED
File without changes
languages/gallery-bg_BG.po CHANGED
File without changes
languages/gallery-de_DE.mo CHANGED
File without changes
languages/gallery-de_DE.po CHANGED
File without changes
languages/gallery-fr_FR.mo CHANGED
File without changes
languages/gallery-fr_FR.po CHANGED
File without changes
languages/gallery-pt_BR.mo CHANGED
File without changes
languages/gallery-pt_BR.po CHANGED
File without changes
languages/gallery-ru_RU.mo CHANGED
File without changes
languages/gallery-ru_RU.po CHANGED
File without changes
languages/gallery-sr_RS.mo CHANGED
File without changes
languages/gallery-sr_RS.po CHANGED
File without changes
languages/gallery-tr.mo CHANGED
File without changes
languages/gallery-tr.po CHANGED
File without changes
languages/gallery-uk.mo CHANGED
File without changes
languages/gallery-uk.po CHANGED
File without changes
languages/gallery-zh_CN.mo CHANGED
File without changes
languages/gallery-zh_CN.po CHANGED
File without changes
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=10
4
  Tags: gallery, image, gallery image, album, foto, fotoalbum, website gallery, multiple pictures, pictures, photo, photoalbum, photogallery
5
  Requires at least: 3.0
6
  Tested up to: 3.7.1
7
- Stable tag: 4.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -69,6 +69,8 @@ We can fix some things for free for the users who provide translation of our plu
69
  2. Activate the plugin using the 'Plugins' menu in WordPress.
70
  3. Please check if you have the template file `gallery-template.php` as well as the template `gallery-single-template.php` in the templates directory. If you can't find these files, then just copy them from the directory `/wp-content/plugins/gallery/template/` to your templates directory.
71
 
 
 
72
  == Frequently Asked Questions ==
73
 
74
  = I cannot view my Gallery page =
@@ -112,7 +114,6 @@ After that your theme will support thumbnail option and the error will disappear
112
  Please use the drag and drop function to change the order of the images and do not forget to save the post.
113
  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)
114
 
115
-
116
  2. Please go to the "Galleries" menu and select random gallery in the list. It will take you to the gallery editing page.
117
  There will be one or several media upload icons between the title and the content blocks. Please choose any icon.
118
  After that you'll see a popup window containing three or four tabs.
@@ -145,6 +146,11 @@ and add (for the themes Twenty Eleven or Twenty Ten):
145
 
146
  == Changelog ==
147
 
 
 
 
 
 
148
  = V4.0.9 - 29.11.2013 =
149
  * Update : The Ukrainian language file is updated.
150
 
@@ -362,6 +368,9 @@ and add (for the themes Twenty Eleven or Twenty Ten):
362
 
363
  == Upgrade Notice ==
364
 
 
 
 
365
  = V4.0.9 =
366
  The Ukrainian language file is updated
367
 
4
  Tags: gallery, image, gallery image, album, foto, fotoalbum, website gallery, multiple pictures, pictures, photo, photoalbum, photogallery
5
  Requires at least: 3.0
6
  Tested up to: 3.7.1
7
+ Stable tag: 4.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
69
  2. Activate the plugin using the 'Plugins' menu in WordPress.
70
  3. Please check if you have the template file `gallery-template.php` as well as the template `gallery-single-template.php` in the templates directory. If you can't find these files, then just copy them from the directory `/wp-content/plugins/gallery/template/` to your templates directory.
71
 
72
+ <a href="http://bestwebsoft.com/wp-content/uploads/manual/wp_plugin/gallery/Gallery_Installation_step-by-step_instruction.pdf" target="_blank">View a PDF version of Step-by-step Instruction on Gallery Installation</a>.
73
+
74
  == Frequently Asked Questions ==
75
 
76
  = I cannot view my Gallery page =
114
  Please use the drag and drop function to change the order of the images and do not forget to save the post.
115
  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)
116
 
 
117
  2. Please go to the "Galleries" menu and select random gallery in the list. It will take you to the gallery editing page.
118
  There will be one or several media upload icons between the title and the content blocks. Please choose any icon.
119
  After that you'll see a popup window containing three or four tabs.
146
 
147
  == Changelog ==
148
 
149
+ = V4.1.0 - 6.12.2013 =
150
+ * NEW : A notice when changing settings on the plugin's settings page was added.
151
+ * NEW : Ability to use shortcode in a text-widget.
152
+ * Bugfix : We fixed the bug of adding gallery to the search.
153
+
154
  = V4.0.9 - 29.11.2013 =
155
  * Update : The Ukrainian language file is updated.
156
 
368
 
369
  == Upgrade Notice ==
370
 
371
+ = V4.1.0 =
372
+ A notice when changing settings on the plugin's settings page was added. Ability to use shortcode in a text-widget. We fixed the bug of adding gallery to the search.
373
+
374
  = V4.0.9 =
375
  The Ukrainian language file is updated
376
 
screenshot-1.jpg CHANGED
File without changes
screenshot-3.jpg CHANGED
File without changes
template/gallery-single-template.php CHANGED
File without changes