Photo Gallery by Envira – Responsive Image Gallery for WordPress - Version 1.2.8

Version Description

  • Added: RTL Support
Download this release

Release Info

Developer n7studios
Plugin Icon 128x128 Photo Gallery by Envira – Responsive Image Gallery for WordPress
Version 1.2.8
Comparing to
See all releases

Code changes from version 1.2.7 to 1.2.8

envira-gallery-lite.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
6
  * Author: Thomas Griffin
7
  * Author URI: http://thomasgriffinmedia.com
8
- * Version: 1.2.7
9
  * Text Domain: envira-gallery
10
  * Domain Path: languages
11
  *
@@ -54,7 +54,7 @@ class Envira_Gallery_Lite {
54
  *
55
  * @var string
56
  */
57
- public $version = '1.2.7';
58
 
59
  /**
60
  * The name of the plugin.
5
  * Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
6
  * Author: Thomas Griffin
7
  * Author URI: http://thomasgriffinmedia.com
8
+ * Version: 1.2.8
9
  * Text Domain: envira-gallery
10
  * Domain Path: languages
11
  *
54
  *
55
  * @var string
56
  */
57
+ public $version = '1.2.8';
58
 
59
  /**
60
  * The name of the plugin.
includes/admin/metaboxes.php CHANGED
@@ -709,6 +709,15 @@ class Envira_Gallery_Metaboxes_Lite {
709
  <p class="description"><?php _e( 'Adds custom CSS classes to this gallery. Enter one class per line.', 'envira-gallery' ); ?></p>
710
  </td>
711
  </tr>
 
 
 
 
 
 
 
 
 
712
  <?php do_action( 'envira_gallery_misc_box', $post ); ?>
713
  </tbody>
714
  </table>
@@ -784,6 +793,7 @@ class Envira_Gallery_Metaboxes_Lite {
784
  $settings['config']['title'] = trim( strip_tags( $_POST['_envira_gallery']['title'] ) );
785
  $settings['config']['slug'] = sanitize_text_field( $_POST['_envira_gallery']['slug'] );
786
  $settings['config']['title_display']= preg_replace( '#[^a-z0-9-_]#', '', $_POST['_envira_gallery']['title_display'] );
 
787
 
788
  // If on an envira post type, map the title and slug of the post object to the custom fields if no value exists yet.
789
  if ( isset( $post->post_type ) && 'envira' == $post->post_type ) {
709
  <p class="description"><?php _e( 'Adds custom CSS classes to this gallery. Enter one class per line.', 'envira-gallery' ); ?></p>
710
  </td>
711
  </tr>
712
+ <tr id="envira-config-rtl-box">
713
+ <th scope="row">
714
+ <label for="envira-config-rtl"><?php _e( 'Enable RTL Support?', 'envira-gallery' ); ?></label>
715
+ </th>
716
+ <td>
717
+ <input id="envira-config-rtl" type="checkbox" name="_envira_gallery[rtl]" value="<?php echo $this->get_config( 'rtl', $this->get_config_default( 'rtl' ) ); ?>" <?php checked( $this->get_config( 'rtl', $this->get_config_default( 'rtl' ) ), 1 ); ?> />
718
+ <span class="description"><?php _e( 'Enables or disables RTL support in Envira for right-to-left languages.', 'envira-gallery' ); ?></span>
719
+ </td>
720
+ </tr>
721
  <?php do_action( 'envira_gallery_misc_box', $post ); ?>
722
  </tbody>
723
  </table>
793
  $settings['config']['title'] = trim( strip_tags( $_POST['_envira_gallery']['title'] ) );
794
  $settings['config']['slug'] = sanitize_text_field( $_POST['_envira_gallery']['slug'] );
795
  $settings['config']['title_display']= preg_replace( '#[^a-z0-9-_]#', '', $_POST['_envira_gallery']['title_display'] );
796
+ $settings['config']['rtl'] = isset( $_POST['_envira_gallery']['rtl'] ) ? 1 : 0;
797
 
798
  // If on an envira post type, map the title and slug of the post object to the custom fields if no value exists yet.
799
  if ( isset( $post->post_type ) && 'envira' == $post->post_type ) {
includes/global/common.php CHANGED
@@ -191,7 +191,8 @@ class Envira_Gallery_Common_Lite {
191
  'loop' => 1,
192
  'classes' => array(),
193
  'title' => '',
194
- 'slug' => ''
 
195
  );
196
 
197
  // Allow devs to filter the defaults.
191
  'loop' => 1,
192
  'classes' => array(),
193
  'title' => '',
194
+ 'slug' => '',
195
+ 'rtl' => 0,
196
  );
197
 
198
  // Allow devs to filter the defaults.
includes/global/shortcode.php CHANGED
@@ -365,6 +365,11 @@ class Envira_Gallery_Shortcode_Lite {
365
  $classes[] = $class;
366
  }
367
 
 
 
 
 
 
368
  // Allow filtering of classes and then return what's left.
369
  $classes = apply_filters( 'envira_gallery_output_classes', $classes, $data );
370
  return trim( implode( ' ', array_map( 'trim', array_map( 'sanitize_html_class', array_unique( $classes ) ) ) ) );
365
  $classes[] = $class;
366
  }
367
 
368
+ // If the gallery has RTL support, add a class for it.
369
+ if ( $this->get_config( 'rtl', $data ) ) {
370
+ $classes[] = 'envira-gallery-rtl';
371
+ }
372
+
373
  // Allow filtering of classes and then return what's left.
374
  $classes = apply_filters( 'envira_gallery_output_classes', $classes, $data );
375
  return trim( implode( ' ', array_map( 'trim', array_map( 'sanitize_html_class', array_unique( $classes ) ) ) ) );
readme.txt CHANGED
@@ -57,6 +57,9 @@ Also, I'm an <a href="https://thomasgriffin.io" rel="me" title="WordPress Develo
57
 
58
  == Changelog ==
59
 
 
 
 
60
  = 1.2.7 =
61
  * Added: Caption Position Float (Wrapped) option, to wrap Lightbox Caption text to match width of image.
62
 
57
 
58
  == Changelog ==
59
 
60
+ = 1.2.8 =
61
+ * Added: RTL Support
62
+
63
  = 1.2.7 =
64
  * Added: Caption Position Float (Wrapped) option, to wrap Lightbox Caption text to match width of image.
65