FooGallery – Image Gallery WordPress Plugin - Version 1.4.29

Version Description

  • New : Added an album setting to set the gallery title size (h2,h3,h4,h5,h6)
  • Fix : media modal issues with Elementor
  • Fix : media modal issues with Thrive Architect
  • Fix : caption override fix for single thumbnail galleries
  • Update : media modal improvements
Download this release

Release Info

Developer bradvin
Plugin Icon 128x128 FooGallery – Image Gallery WordPress Plugin
Version 1.4.29
Comparing to
See all releases

Code changes from version 1.4.27 to 1.4.29

README.txt CHANGED
@@ -150,6 +150,14 @@ Update now to get all the latest features, bug fixes and improvements!
150
 
151
  == Changelog ==
152
 
 
 
 
 
 
 
 
 
153
  = 1.4.27 =
154
 
155
  * Fix : Justified gallery issues in certain browsers / devices
150
 
151
  == Changelog ==
152
 
153
+ = 1.4.29 =
154
+
155
+ * New : Added an album setting to set the gallery title size (h2,h3,h4,h5,h6)
156
+ * Fix : media modal issues with Elementor
157
+ * Fix : media modal issues with Thrive Architect
158
+ * Fix : caption override fix for single thumbnail galleries
159
+ * Update : media modal improvements
160
+
161
  = 1.4.27 =
162
 
163
  * Fix : Justified gallery issues in certain browsers / devices
css/admin-tinymce.css CHANGED
@@ -61,6 +61,7 @@
61
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
62
  overflow: hidden;
63
  background: #CCC;
 
64
  }
65
 
66
  /* Stacks creted by the use of generated content */
61
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
62
  overflow: hidden;
63
  background: #CCC;
64
+ font-size: 0;
65
  }
66
 
67
  /* Stacks creted by the use of generated content */
extensions/albums/admin/class-metaboxes.php CHANGED
@@ -146,9 +146,14 @@ if ( ! class_exists( 'FooGallery_Admin_Album_MetaBoxes' ) ) {
146
  }
147
 
148
  public function get_ordered_galleries( $album ) {
 
 
 
 
 
149
 
150
  //get all other galleries
151
- $galleries = foogallery_get_all_galleries( $album->gallery_ids );
152
 
153
  $album_galleries = $album->galleries();
154
 
146
  }
147
 
148
  public function get_ordered_galleries( $album ) {
149
+ //exclude the galleries already added to the album
150
+ $excluded_galleries = $album->gallery_ids;
151
+
152
+ //allow more galleries to be excluded
153
+ $excluded_galleries = apply_filters( 'foogallery_album_exlcuded_galleries', $excluded_galleries, $album );
154
 
155
  //get all other galleries
156
+ $galleries = foogallery_get_all_galleries( $excluded_galleries );
157
 
158
  $album_galleries = $album->galleries();
159
 
extensions/albums/album-default.php CHANGED
@@ -20,9 +20,10 @@ if ( !empty( $gallery ) ) {
20
 
21
  if ( false !== $foogallery ) {
22
  $album_url = foogallery_album_remove_gallery_from_link();
 
23
  echo '<div id="' . $current_foogallery_album->slug . '" class="foogallery-album-header">';
24
  echo '<p><a href="' . esc_url( $album_url ) . '">' . foogallery_get_setting( 'language_back_to_album_text', __( '&laquo; back to album', 'foogallery' ) ) . '</a></p>';
25
- echo '<h2>' . $foogallery->name . '</h2>';
26
  echo apply_filters('foogallery_album_default_gallery_content', '', $foogallery);
27
  echo '</div>';
28
  echo do_shortcode('[foogallery id="' . $foogallery->ID . '"]');
20
 
21
  if ( false !== $foogallery ) {
22
  $album_url = foogallery_album_remove_gallery_from_link();
23
+ $gallery_title_size = foogallery_album_template_setting('gallery_title_size', 'h2');
24
  echo '<div id="' . $current_foogallery_album->slug . '" class="foogallery-album-header">';
25
  echo '<p><a href="' . esc_url( $album_url ) . '">' . foogallery_get_setting( 'language_back_to_album_text', __( '&laquo; back to album', 'foogallery' ) ) . '</a></p>';
26
+ echo '<' . $gallery_title_size . '>' . $foogallery->name . '</'. $gallery_title_size . '>';
27
  echo apply_filters('foogallery_album_default_gallery_content', '', $foogallery);
28
  echo '</div>';
29
  echo do_shortcode('[foogallery id="' . $foogallery->ID . '"]');
extensions/albums/functions.php CHANGED
@@ -115,7 +115,22 @@ function foogallery_album_templates() {
115
  'remember' => __('Remember Scroll Position', 'foogallery')
116
  ),
117
  'default' => 'none'
118
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  )
120
  );
121
 
115
  'remember' => __('Remember Scroll Position', 'foogallery')
116
  ),
117
  'default' => 'none'
118
+ ),
119
+ array(
120
+ 'id' => 'gallery_title_size',
121
+ 'title' => __( 'Gallery Title Size', 'foogallery' ),
122
+ 'desc' => __( 'The size of the title when displaying a gallery page.', 'foogallery' ),
123
+ 'section' => __( 'Gallery Settings', 'foogallery' ),
124
+ 'default' => 'h2',
125
+ 'type' => 'select',
126
+ 'choices' => array(
127
+ 'h2' => __( 'H2', 'foogallery' ),
128
+ 'h3' => __( 'H3', 'foogallery' ),
129
+ 'h4' => __( 'H4', 'foogallery' ),
130
+ 'h5' => __( 'H5', 'foogallery' ),
131
+ 'h6' => __( 'H6', 'foogallery' ),
132
+ )
133
+ ),
134
  )
135
  );
136
 
extensions/default-templates/thumbnail/gallery-thumbnail.php CHANGED
@@ -14,8 +14,8 @@ $position = foogallery_gallery_template_setting( 'position', 'fg-center' );
14
  $caption_bgcolor = foogallery_gallery_template_setting( 'caption_bgcolor', 'rgba(0, 0, 0, 0.8)' );
15
  $caption_color = foogallery_gallery_template_setting( 'caption_color', '#fff' );
16
  $featured_attachment = $current_foogallery->featured_attachment( $args );
17
- $args['override_caption_title'] = $featured_attachment->caption = foogallery_gallery_template_setting( 'caption_title', '' );
18
- $args['override_caption_desc'] = $featured_attachment->description = foogallery_gallery_template_setting( 'caption_description', '' );
19
 
20
  $thumb_url = $featured_attachment->url;
21
  if ( foogallery_gallery_template_setting( 'link_custom_url', '' ) == 'on' ) {
@@ -33,9 +33,12 @@ $foogallery_single_thumbnail_attributes = foogallery_build_container_attributes_
33
  <div <?php echo $foogallery_single_thumbnail_attributes; ?>>
34
  <?php echo foogallery_attachment_html( $featured_attachment, $args ); ?>
35
  <div class="fg-st-hidden">
36
- <?php foreach ( foogallery_current_gallery_attachments_for_rendering() as $attachment ) {
 
 
 
37
  if ( $attachment->ID !== $featured_attachment->ID ) {
38
- echo $attachment->html( $args, false, true );
39
  }
40
  } ?>
41
  </div>
14
  $caption_bgcolor = foogallery_gallery_template_setting( 'caption_bgcolor', 'rgba(0, 0, 0, 0.8)' );
15
  $caption_color = foogallery_gallery_template_setting( 'caption_color', '#fff' );
16
  $featured_attachment = $current_foogallery->featured_attachment( $args );
17
+ $args['override_caption_title'] = foogallery_gallery_template_setting( 'caption_title', '' );
18
+ $args['override_caption_desc'] = foogallery_gallery_template_setting( 'caption_description', '' );
19
 
20
  $thumb_url = $featured_attachment->url;
21
  if ( foogallery_gallery_template_setting( 'link_custom_url', '' ) == 'on' ) {
33
  <div <?php echo $foogallery_single_thumbnail_attributes; ?>>
34
  <?php echo foogallery_attachment_html( $featured_attachment, $args ); ?>
35
  <div class="fg-st-hidden">
36
+ <?php
37
+ unset( $args['override_caption_title'] );
38
+ unset( $args['override_caption_desc'] );
39
+ foreach ( foogallery_current_gallery_attachments_for_rendering() as $attachment ) {
40
  if ( $attachment->ID !== $featured_attachment->ID ) {
41
+ echo foogallery_attachment_html( $attachment, $args );
42
  }
43
  } ?>
44
  </div>
foogallery.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: FooGallery
5
  Description: FooGallery is the most intuitive and extensible gallery management tool ever created for WordPress
6
- Version: 1.4.27
7
  Author: FooPlugins
8
  Plugin URI: https://foo.gallery
9
  Author URI: http://fooplugins.com
@@ -23,7 +23,7 @@ if ( !class_exists( 'FooGallery_Plugin' ) ) {
23
  define( 'FOOGALLERY_PATH', plugin_dir_path( __FILE__ ) );
24
  define( 'FOOGALLERY_URL', plugin_dir_url( __FILE__ ) );
25
  define( 'FOOGALLERY_FILE', __FILE__ );
26
- define( 'FOOGALLERY_VERSION', '1.4.27' );
27
  define( 'FOOGALLERY_SETTINGS_VERSION', '2' );
28
  require_once FOOGALLERY_PATH . 'includes/constants.php';
29
  // Create a helper function for easy SDK access.
3
  /*
4
  Plugin Name: FooGallery
5
  Description: FooGallery is the most intuitive and extensible gallery management tool ever created for WordPress
6
+ Version: 1.4.29
7
  Author: FooPlugins
8
  Plugin URI: https://foo.gallery
9
  Author URI: http://fooplugins.com
23
  define( 'FOOGALLERY_PATH', plugin_dir_path( __FILE__ ) );
24
  define( 'FOOGALLERY_URL', plugin_dir_url( __FILE__ ) );
25
  define( 'FOOGALLERY_FILE', __FILE__ );
26
+ define( 'FOOGALLERY_VERSION', '1.4.29' );
27
  define( 'FOOGALLERY_SETTINGS_VERSION', '2' );
28
  require_once FOOGALLERY_PATH . 'includes/constants.php';
29
  // Create a helper function for easy SDK access.
includes/admin/class-gallery-editor.php CHANGED
@@ -43,6 +43,7 @@ if ( ! class_exists( 'FooGallery_Admin_Gallery_Editor' ) ) {
43
 
44
  //render the gallery modal
45
  add_action( 'admin_footer', array( $this, 'render_gallery_modal' ) );
 
46
 
47
  $foogallery = FooGallery_Plugin::get_instance();
48
  $foogallery->register_and_enqueue_js( 'admin-foogallery-editor.js' );
@@ -233,7 +234,7 @@ if ( ! class_exists( 'FooGallery_Admin_Gallery_Editor' ) ) {
233
 
234
  .foogallery-gallery-select-inner span {
235
  display: block;
236
- font-size: 0.6em;
237
  }
238
 
239
  .foogallery-add-gallery {
@@ -273,12 +274,12 @@ if ( ! class_exists( 'FooGallery_Admin_Gallery_Editor' ) ) {
273
  <?php wp_nonce_field( 'foogallery_load_galleries', 'foogallery_load_galleries', false ); ?>
274
  <div class="foogallery-modal-wrapper" style="display: none;">
275
  <div class="media-modal wp-core-ui">
276
- <button type="button" class="button-link media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text">Close media panel</span></span></button>
277
  <div class="media-modal-content">
278
  <div class="media-frame wp-core-ui hide-menu hide-router foogallery-meta-wrap">
279
  <div class="media-frame-title">
280
  <h1>
281
- <?php _e( 'Choose a Gallery to Insert', 'foogallery' ); ?>
282
  <div class="foogallery-modal-reload-container">
283
  <div class="spinner"></div>
284
  <a class="foogallery-modal-reload button" href="#"><span class="dashicons dashicons-update"></span> <?php _e( 'Reload', 'foogallery' ); ?></a>
43
 
44
  //render the gallery modal
45
  add_action( 'admin_footer', array( $this, 'render_gallery_modal' ) );
46
+ add_action( 'wp_footer', array( $this, 'render_gallery_modal' ) );
47
 
48
  $foogallery = FooGallery_Plugin::get_instance();
49
  $foogallery->register_and_enqueue_js( 'admin-foogallery-editor.js' );
234
 
235
  .foogallery-gallery-select-inner span {
236
  display: block;
237
+ font-size: 0.9em;
238
  }
239
 
240
  .foogallery-add-gallery {
274
  <?php wp_nonce_field( 'foogallery_load_galleries', 'foogallery_load_galleries', false ); ?>
275
  <div class="foogallery-modal-wrapper" style="display: none;">
276
  <div class="media-modal wp-core-ui">
277
+ <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text">Close media panel</span></span></button>
278
  <div class="media-modal-content">
279
  <div class="media-frame wp-core-ui hide-menu hide-router foogallery-meta-wrap">
280
  <div class="media-frame-title">
281
  <h1>
282
+ <?php _e( 'Choose a gallery to insert', 'foogallery' ); ?>
283
  <div class="foogallery-modal-reload-container">
284
  <div class="spinner"></div>
285
  <a class="foogallery-modal-reload button" href="#"><span class="dashicons dashicons-update"></span> <?php _e( 'Reload', 'foogallery' ); ?></a>
js/admin-foogallery-editor.js CHANGED
@@ -26,7 +26,7 @@
26
 
27
  //hook up the extensions search
28
  FOOGALLERY.bindEditorButton = function() {
29
- $(document).on('click', '.foogallery-modal-trigger', function(e) {
30
  e.preventDefault();
31
  //set the active editor
32
  FOOGALLERY.activeEditor = $(this).data('editor');
@@ -40,16 +40,16 @@
40
  };
41
 
42
  FOOGALLERY.bindModalElements = function() {
43
- $('.media-modal-close, .foogallery-modal-cancel').on('click', function() {
44
  $('.foogallery-modal-wrapper').hide();
45
  });
46
 
47
- $('.foogallery-modal-reload').on('click', function(e) {
48
  e.preventDefault();
49
  FOOGALLERY.loadGalleries();
50
  });
51
 
52
- $('.foogallery-modal-wrapper').on('click', '.foogallery-gallery-select', function(e) {
53
  var $this = $(this);
54
  if ( $this.is('.foogallery-add-gallery') ) {
55
  //if the add icon is click then do nothing
@@ -61,7 +61,7 @@
61
  }
62
  });
63
 
64
- $('.foogallery-modal-insert').on('click', function(e) {
65
  e.preventDefault();
66
  if ( $(this).attr('disabled') ) {
67
  return;
@@ -95,8 +95,10 @@
95
  };
96
 
97
  $(function() { //wait for ready
98
- FOOGALLERY.bindEditorButton();
99
- FOOGALLERY.bindModalElements();
100
- FOOGALLERY.activeEditor = 'content';
101
  });
 
 
 
 
 
102
  }(window.FOOGALLERY = window.FOOGALLERY || {}, jQuery));
26
 
27
  //hook up the extensions search
28
  FOOGALLERY.bindEditorButton = function() {
29
+ $(document.body).on('click', '.foogallery-modal-trigger', function(e) {
30
  e.preventDefault();
31
  //set the active editor
32
  FOOGALLERY.activeEditor = $(this).data('editor');
40
  };
41
 
42
  FOOGALLERY.bindModalElements = function() {
43
+ $(document.body).on('click', '.media-modal-close, .foogallery-modal-cancel', function(e) {
44
  $('.foogallery-modal-wrapper').hide();
45
  });
46
 
47
+ $(document.body).on('click', '.foogallery-modal-reload', function(e) {
48
  e.preventDefault();
49
  FOOGALLERY.loadGalleries();
50
  });
51
 
52
+ $(document.body).on('click', '.foogallery-gallery-select', function(e) {
53
  var $this = $(this);
54
  if ( $this.is('.foogallery-add-gallery') ) {
55
  //if the add icon is click then do nothing
61
  }
62
  });
63
 
64
+ $(document.body).on('click', '.foogallery-modal-insert', function(e) {
65
  e.preventDefault();
66
  if ( $(this).attr('disabled') ) {
67
  return;
95
  };
96
 
97
  $(function() { //wait for ready
 
 
 
98
  });
99
+
100
+ FOOGALLERY.bindEditorButton();
101
+ FOOGALLERY.bindModalElements();
102
+ FOOGALLERY.activeEditor = 'content';
103
+
104
  }(window.FOOGALLERY = window.FOOGALLERY || {}, jQuery));