Version Description
Download this release
Release Info
| Developer | giucu91 |
| Plugin | |
| Version | 2.5.1 |
| Comparing to | |
| See all releases | |
Code changes from version 2.5.0 to 2.5.1
- Modula.php +2 -2
- changelog.txt +5 -0
- includes/admin/class-modula-addons.php +1 -1
- includes/admin/class-modula-admin-helpers.php +4 -21
- includes/admin/class-modula-admin.php +1 -1
- includes/admin/class-modula-cpt.php +1 -1
- includes/admin/class-modula-debug.php +8 -8
- includes/admin/tabs/about.php +18 -35
- includes/class-modula-backward-compatibility.php +20 -16
- includes/class-modula-gutenberg.php +5 -5
- includes/compatibility/class-modula-compatibility.php +12 -12
- includes/public/class-modula-shortcode.php +2 -1
- includes/public/modula-helper-functions.php +1 -1
- includes/public/templates/items/item-none.php +1 -1
- includes/public/templates/items/item.php +1 -1
- readme.txt +1 -1
Modula.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
* Plugin URI: https://wp-modula.com/
|
| 5 |
* Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
|
| 6 |
* Author: WPChill
|
| 7 |
-
* Version: 2.5.
|
| 8 |
* Author URI: https://www.wpchill.com/
|
| 9 |
* License: GPLv3 or later
|
| 10 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
|
@@ -47,7 +47,7 @@
|
|
| 47 |
* @since 2.0.2
|
| 48 |
*/
|
| 49 |
|
| 50 |
-
define( 'MODULA_LITE_VERSION' , '2.5.
|
| 51 |
define( 'MODULA_PATH' , plugin_dir_path( __FILE__ ) );
|
| 52 |
define( 'MODULA_URL' , plugin_dir_url( __FILE__ ) );
|
| 53 |
defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL' , 'https://wp-modula.com' );
|
| 4 |
* Plugin URI: https://wp-modula.com/
|
| 5 |
* Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
|
| 6 |
* Author: WPChill
|
| 7 |
+
* Version: 2.5.1
|
| 8 |
* Author URI: https://www.wpchill.com/
|
| 9 |
* License: GPLv3 or later
|
| 10 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 47 |
* @since 2.0.2
|
| 48 |
*/
|
| 49 |
|
| 50 |
+
define( 'MODULA_LITE_VERSION' , '2.5.1' );
|
| 51 |
define( 'MODULA_PATH' , plugin_dir_path( __FILE__ ) );
|
| 52 |
define( 'MODULA_URL' , plugin_dir_url( __FILE__ ) );
|
| 53 |
defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL' , 'https://wp-modula.com' );
|
changelog.txt
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
= 2.5.0 - 01/04/2021 =
|
| 2 |
Added: Only allow certain users to the Extensions page - https://github.com/WPChill/modula-lite/issues/476
|
| 3 |
Added: Responsive gutters - https://github.com/WPChill/modula-lite/issues/424
|
| 1 |
+
= 2.5.1 - 05/04/2021 =
|
| 2 |
+
Fixed: Gutter for mobile and tablet after Modula update from 2.4.1 to 2.5.0. Setting was displaying OK in backend but on frontend change wasn't displayed correctly
|
| 3 |
+
Fixed: Backwards compatibility for custom grid image size after Modula update from 2.4.1 to 2.5.0. Setting showed same value although in frontend the setting worked
|
| 4 |
+
Fixed: srcset generated a nonexistent image.
|
| 5 |
+
|
| 6 |
= 2.5.0 - 01/04/2021 =
|
| 7 |
Added: Only allow certain users to the Extensions page - https://github.com/WPChill/modula-lite/issues/476
|
| 8 |
Added: Responsive gutters - https://github.com/WPChill/modula-lite/issues/424
|
includes/admin/class-modula-addons.php
CHANGED
|
@@ -96,7 +96,7 @@ class Modula_Addons {
|
|
| 96 |
/**
|
| 97 |
* Reload addons in the Extensions tab
|
| 98 |
*
|
| 99 |
-
* @moved here from class-modula.php file in version 2.
|
| 100 |
*/
|
| 101 |
public function reload_extensions() {
|
| 102 |
// Run a security check first.
|
| 96 |
/**
|
| 97 |
* Reload addons in the Extensions tab
|
| 98 |
*
|
| 99 |
+
* @moved here from class-modula.php file in version 2.5.0
|
| 100 |
*/
|
| 101 |
public function reload_extensions() {
|
| 102 |
// Run a security check first.
|
includes/admin/class-modula-admin-helpers.php
CHANGED
|
@@ -6,7 +6,7 @@ class Modula_Admin_Helpers {
|
|
| 6 |
/**
|
| 7 |
* Holds the class object.
|
| 8 |
*
|
| 9 |
-
* @since 2.
|
| 10 |
*
|
| 11 |
* @var object
|
| 12 |
*/
|
|
@@ -15,19 +15,16 @@ class Modula_Admin_Helpers {
|
|
| 15 |
/**
|
| 16 |
* Modula_Admin_Helpers constructor.
|
| 17 |
*
|
| 18 |
-
* @since 2.
|
| 19 |
*/
|
| 20 |
-
function __construct() {
|
| 21 |
-
// added by Cristi
|
| 22 |
-
add_filter( 'screen_options_show_screen', array( $this, 'modula_hide_screen_options' ) );
|
| 23 |
-
}
|
| 24 |
|
| 25 |
|
| 26 |
/**
|
| 27 |
* Returns the singleton instance of the class.
|
| 28 |
*
|
| 29 |
* @return object The Modula_Admin_Helpers object.
|
| 30 |
-
* @since 2.
|
| 31 |
*/
|
| 32 |
public static function get_instance() {
|
| 33 |
|
|
@@ -116,20 +113,6 @@ class Modula_Admin_Helpers {
|
|
| 116 |
}
|
| 117 |
}
|
| 118 |
|
| 119 |
-
/**
|
| 120 |
-
* Hide screen options when on Modula's CPT
|
| 121 |
-
*
|
| 122 |
-
* @since 2.4.2
|
| 123 |
-
*/
|
| 124 |
-
public function modula_hide_screen_options() {
|
| 125 |
-
global $pagenow;
|
| 126 |
-
|
| 127 |
-
if ( $pagenow === 'modula-gallery' ) {
|
| 128 |
-
__return_false();
|
| 129 |
-
} else {
|
| 130 |
-
__return_true();
|
| 131 |
-
}
|
| 132 |
-
}
|
| 133 |
}
|
| 134 |
|
| 135 |
$modula_admin_helpers = Modula_Admin_Helpers::get_instance();
|
| 6 |
/**
|
| 7 |
* Holds the class object.
|
| 8 |
*
|
| 9 |
+
* @since 2.5.0
|
| 10 |
*
|
| 11 |
* @var object
|
| 12 |
*/
|
| 15 |
/**
|
| 16 |
* Modula_Admin_Helpers constructor.
|
| 17 |
*
|
| 18 |
+
* @since 2.5.0
|
| 19 |
*/
|
| 20 |
+
function __construct() {}
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
/**
|
| 24 |
* Returns the singleton instance of the class.
|
| 25 |
*
|
| 26 |
* @return object The Modula_Admin_Helpers object.
|
| 27 |
+
* @since 2.5.0
|
| 28 |
*/
|
| 29 |
public static function get_instance() {
|
| 30 |
|
| 113 |
}
|
| 114 |
}
|
| 115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
}
|
| 117 |
|
| 118 |
$modula_admin_helpers = Modula_Admin_Helpers::get_instance();
|
includes/admin/class-modula-admin.php
CHANGED
|
@@ -510,7 +510,7 @@ class Modula_Admin {
|
|
| 510 |
/**
|
| 511 |
* Add LITE vs PRO page
|
| 512 |
*
|
| 513 |
-
* @since 2.
|
| 514 |
*/
|
| 515 |
public function lite_vs_pro() {
|
| 516 |
|
| 510 |
/**
|
| 511 |
* Add LITE vs PRO page
|
| 512 |
*
|
| 513 |
+
* @since 2.5.0
|
| 514 |
*/
|
| 515 |
public function lite_vs_pro() {
|
| 516 |
|
includes/admin/class-modula-cpt.php
CHANGED
|
@@ -136,7 +136,7 @@ class Modula_CPT {
|
|
| 136 |
/**
|
| 137 |
* Rest field for modula settings
|
| 138 |
*
|
| 139 |
-
* @since 2.
|
| 140 |
*/
|
| 141 |
public function register_post_meta_rest() {
|
| 142 |
register_rest_field( 'modula-gallery', 'modulaSettings', array(
|
| 136 |
/**
|
| 137 |
* Rest field for modula settings
|
| 138 |
*
|
| 139 |
+
* @since 2.5.0
|
| 140 |
*/
|
| 141 |
public function register_post_meta_rest() {
|
| 142 |
register_rest_field( 'modula-gallery', 'modulaSettings', array(
|
includes/admin/class-modula-debug.php
CHANGED
|
@@ -6,7 +6,7 @@ class Modula_Debug {
|
|
| 6 |
/**
|
| 7 |
* Holds the class object.
|
| 8 |
*
|
| 9 |
-
* @since 2.
|
| 10 |
*
|
| 11 |
* @var object
|
| 12 |
*/
|
|
@@ -15,7 +15,7 @@ class Modula_Debug {
|
|
| 15 |
/**
|
| 16 |
* Modula_Debug constructor.
|
| 17 |
*
|
| 18 |
-
* @since 2.
|
| 19 |
*/
|
| 20 |
function __construct() {
|
| 21 |
// Add Modula's debug information
|
|
@@ -33,7 +33,7 @@ class Modula_Debug {
|
|
| 33 |
* Returns the singleton instance of the class.
|
| 34 |
*
|
| 35 |
* @return object The Modula_Debug object.
|
| 36 |
-
* @since 2.
|
| 37 |
*/
|
| 38 |
public static function get_instance() {
|
| 39 |
|
|
@@ -51,7 +51,7 @@ class Modula_Debug {
|
|
| 51 |
* @param $info
|
| 52 |
*
|
| 53 |
* @return mixed
|
| 54 |
-
* @since 2.
|
| 55 |
*/
|
| 56 |
public function modula_debug_information($info){
|
| 57 |
|
|
@@ -134,7 +134,7 @@ class Modula_Debug {
|
|
| 134 |
/**
|
| 135 |
* Export single gallery
|
| 136 |
*
|
| 137 |
-
* @since 2.
|
| 138 |
*/
|
| 139 |
public function modula_export_gallery(){
|
| 140 |
|
|
@@ -262,7 +262,7 @@ class Modula_Debug {
|
|
| 262 |
* @param string $str String to wrap in XML CDATA tag.
|
| 263 |
*
|
| 264 |
* @return string
|
| 265 |
-
* @since 2.
|
| 266 |
*
|
| 267 |
*/
|
| 268 |
private function wxr_cdata( $str ){
|
|
@@ -278,7 +278,7 @@ class Modula_Debug {
|
|
| 278 |
/**
|
| 279 |
* Add Debug metabox
|
| 280 |
*
|
| 281 |
-
* @since 2.
|
| 282 |
*/
|
| 283 |
public function debug_meta_box_setup() {
|
| 284 |
|
|
@@ -290,7 +290,7 @@ class Modula_Debug {
|
|
| 290 |
/**
|
| 291 |
* Add Debug metabox
|
| 292 |
*
|
| 293 |
-
* @since 2.
|
| 294 |
*/
|
| 295 |
public function add_debug_meta_box() {
|
| 296 |
add_meta_box(
|
| 6 |
/**
|
| 7 |
* Holds the class object.
|
| 8 |
*
|
| 9 |
+
* @since 2.5.0
|
| 10 |
*
|
| 11 |
* @var object
|
| 12 |
*/
|
| 15 |
/**
|
| 16 |
* Modula_Debug constructor.
|
| 17 |
*
|
| 18 |
+
* @since 2.5.0
|
| 19 |
*/
|
| 20 |
function __construct() {
|
| 21 |
// Add Modula's debug information
|
| 33 |
* Returns the singleton instance of the class.
|
| 34 |
*
|
| 35 |
* @return object The Modula_Debug object.
|
| 36 |
+
* @since 2.5.0
|
| 37 |
*/
|
| 38 |
public static function get_instance() {
|
| 39 |
|
| 51 |
* @param $info
|
| 52 |
*
|
| 53 |
* @return mixed
|
| 54 |
+
* @since 2.5.0
|
| 55 |
*/
|
| 56 |
public function modula_debug_information($info){
|
| 57 |
|
| 134 |
/**
|
| 135 |
* Export single gallery
|
| 136 |
*
|
| 137 |
+
* @since 2.5.0
|
| 138 |
*/
|
| 139 |
public function modula_export_gallery(){
|
| 140 |
|
| 262 |
* @param string $str String to wrap in XML CDATA tag.
|
| 263 |
*
|
| 264 |
* @return string
|
| 265 |
+
* @since 2.5.0
|
| 266 |
*
|
| 267 |
*/
|
| 268 |
private function wxr_cdata( $str ){
|
| 278 |
/**
|
| 279 |
* Add Debug metabox
|
| 280 |
*
|
| 281 |
+
* @since 2.5.0
|
| 282 |
*/
|
| 283 |
public function debug_meta_box_setup() {
|
| 284 |
|
| 290 |
/**
|
| 291 |
* Add Debug metabox
|
| 292 |
*
|
| 293 |
+
* @since 2.5.0
|
| 294 |
*/
|
| 295 |
public function add_debug_meta_box() {
|
| 296 |
add_meta_box(
|
includes/admin/tabs/about.php
CHANGED
|
@@ -1,34 +1,17 @@
|
|
| 1 |
<?php
|
| 2 |
$issues = array(
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
esc_html__( '
|
| 13 |
-
esc_html__( '
|
| 14 |
-
|
| 15 |
-
esc_html__( 'Incompatibility with some themes, where the resize reset of Modula wasn\'t working correctly', 'modula-best-grid-gallery' ),
|
| 16 |
-
esc_html__( 'Modula\'s instance not being reset on tab switch', 'modula-best-grid-gallery' ),
|
| 17 |
-
esc_html__( 'Custom CSS\'s tab editor was not showing correctly if the last tab was the Custom CSS tab', 'modula-best-grid-gallery' ),
|
| 18 |
-
),
|
| 19 |
-
'added' => array(
|
| 20 |
-
esc_html__('Only allow certain users to the Extensions page','modula-best-grid-gallery'),
|
| 21 |
-
esc_html__('Responsive gutters','modula-best-grid-gallery'),
|
| 22 |
-
esc_html__('Added debug info using WordPress\' Site Health + added an export option to export single galleries, used for both debugging and export/import operations','modula-best-grid-gallery'),
|
| 23 |
-
esc_html__('FREE vs Premium page','modula-best-grid-gallery'),
|
| 24 |
-
esc_html__('Srcset and sizes for galleries images for both declared sizes and custom sizes','modula-best-grid-gallery'),
|
| 25 |
-
esc_html__('Custom size and WordPress image sizes selection for galleries grid thumbnail','modula-best-grid-gallery'),
|
| 26 |
-
),
|
| 27 |
-
'changed' => array(
|
| 28 |
-
esc_html__('Social share now gives image URL instead of page URL and title/caption of image','modula-best-grid-gallery'),
|
| 29 |
-
esc_html__('Extensions page and how it works','modula-best-grid-gallery'),
|
| 30 |
-
esc_html__('Hover effects tab had been given an UI update','modula-best-grid-gallery'),
|
| 31 |
-
)
|
| 32 |
);
|
| 33 |
|
| 34 |
?>
|
|
@@ -48,12 +31,12 @@ $issues = array(
|
|
| 48 |
<?php if (!empty($issues)) { ?>
|
| 49 |
<ul class="modula-about-list">
|
| 50 |
<?php
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
</ul>
|
| 58 |
|
| 59 |
<?php } ?>
|
| 1 |
<?php
|
| 2 |
$issues = array(
|
| 3 |
+
'added' => array(),
|
| 4 |
+
'changed' => array(),
|
| 5 |
+
'fixed' => array(
|
| 6 |
+
esc_html__( 'Gutter for mobile and tablet after Modula update from 2.4.1 to 2.5.0. Setting was displaying OK in backend but on frontend change wasn\'t displayed correctly.', 'modula-best-grid-gallery' ),
|
| 7 |
+
esc_html__( 'Backwards compatibility for custom grid image size after Modula update from 2.4.1 to 2.5.0. Setting showed same value although in frontend the setting worked.', 'modula-best-grid-gallery' ),
|
| 8 |
+
)
|
| 9 |
+
);
|
| 10 |
+
|
| 11 |
+
$status = array(
|
| 12 |
+
'fixed' => esc_html__( 'Fixed', 'modula-best-grid-gallery' ),
|
| 13 |
+
'added' => esc_html__( 'Added', 'modula-best-grid-gallery' ),
|
| 14 |
+
'changed' => esc_html__( 'Changed', 'modula-best-grid-gallery' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
);
|
| 16 |
|
| 17 |
?>
|
| 31 |
<?php if (!empty($issues)) { ?>
|
| 32 |
<ul class="modula-about-list">
|
| 33 |
<?php
|
| 34 |
+
foreach ( $issues as $key => $iss ) {
|
| 35 |
+
foreach ( $iss as $is ) {
|
| 36 |
+
echo "<li class='$key'>$status[$key]: $is</li>";
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
?>
|
| 40 |
</ul>
|
| 41 |
|
| 42 |
<?php } ?>
|
includes/class-modula-backward-compatibility.php
CHANGED
|
@@ -22,12 +22,12 @@ class Modula_Backward_Compatibility {
|
|
| 22 |
add_filter( 'modula_backbone_settings', array( $this, 'backward_compatibility_backbone_fancybox' ), 10 );
|
| 23 |
// Responsive gutter
|
| 24 |
add_filter( 'modula_admin_field_value', array( $this, 'backward_compatibility_admin_responsive_gutter' ), 10, 3 );
|
| 25 |
-
add_filter( '
|
| 26 |
add_filter( 'modula_backbone_settings', array( $this, 'backward_compatibility_backbone_responsive_gutter' ), 10 );
|
| 27 |
|
| 28 |
// Thumbnail sizes
|
| 29 |
-
add_filter( 'modula_admin_field_value', array( $this, 'backward_compatibility_admin_thumb_size' ), 10, 3 );
|
| 30 |
-
add_filter( 'modula_backbone_settings', array( $this, 'backward_compatibility_backbone_thumb_size' ), 10 );
|
| 31 |
|
| 32 |
}
|
| 33 |
|
|
@@ -144,7 +144,7 @@ class Modula_Backward_Compatibility {
|
|
| 144 |
* @param $settings
|
| 145 |
*
|
| 146 |
* @return mixed
|
| 147 |
-
* @since 2.
|
| 148 |
*/
|
| 149 |
public function backward_compatibility_admin_responsive_gutter( $value, $key, $settings ) {
|
| 150 |
|
|
@@ -163,23 +163,27 @@ class Modula_Backward_Compatibility {
|
|
| 163 |
/**
|
| 164 |
* Backwards compatibility for responsie gutter
|
| 165 |
*
|
| 166 |
-
* @param $js_config
|
| 167 |
* @param $settings
|
| 168 |
*
|
| 169 |
* @return mixed
|
| 170 |
-
* @since 2.
|
| 171 |
*/
|
| 172 |
-
public function backward_compatibility_front_responsive_gutter( $
|
| 173 |
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
|
| 178 |
-
if ( !isset( $settings[ 'tablet_gutter' ] ) && isset( $settings[ 'gutter' ] ) ) {
|
| 179 |
-
$js_config[ 'tabletGutter' ] = absint( $settings[ 'gutter' ] );
|
| 180 |
}
|
| 181 |
|
| 182 |
-
return $
|
| 183 |
|
| 184 |
}
|
| 185 |
|
|
@@ -189,7 +193,7 @@ class Modula_Backward_Compatibility {
|
|
| 189 |
* @param $settings
|
| 190 |
*
|
| 191 |
* @return mixed
|
| 192 |
-
* @since 2.
|
| 193 |
*/
|
| 194 |
public function backward_compatibility_backbone_responsive_gutter( $settings ) {
|
| 195 |
|
|
@@ -213,7 +217,7 @@ class Modula_Backward_Compatibility {
|
|
| 213 |
* @param $settings
|
| 214 |
*
|
| 215 |
* @return mixed
|
| 216 |
-
* @since 2.
|
| 217 |
*/
|
| 218 |
public function backward_compatibility_admin_thumb_size( $value, $key, $settings ){
|
| 219 |
|
|
@@ -241,7 +245,7 @@ class Modula_Backward_Compatibility {
|
|
| 241 |
* @param $settings
|
| 242 |
*
|
| 243 |
* @return mixed
|
| 244 |
-
* @since 2.
|
| 245 |
*/
|
| 246 |
public function backward_compatibility_backbone_thumb_size( $settings ){
|
| 247 |
|
| 22 |
add_filter( 'modula_backbone_settings', array( $this, 'backward_compatibility_backbone_fancybox' ), 10 );
|
| 23 |
// Responsive gutter
|
| 24 |
add_filter( 'modula_admin_field_value', array( $this, 'backward_compatibility_admin_responsive_gutter' ), 10, 3 );
|
| 25 |
+
add_filter( 'modula_backwards_compatibility_front', array( $this, 'backward_compatibility_front_responsive_gutter' ), 10 );
|
| 26 |
add_filter( 'modula_backbone_settings', array( $this, 'backward_compatibility_backbone_responsive_gutter' ), 10 );
|
| 27 |
|
| 28 |
// Thumbnail sizes
|
| 29 |
+
// add_filter( 'modula_admin_field_value', array( $this, 'backward_compatibility_admin_thumb_size' ), 10, 3 );
|
| 30 |
+
// add_filter( 'modula_backbone_settings', array( $this, 'backward_compatibility_backbone_thumb_size' ), 10 );
|
| 31 |
|
| 32 |
}
|
| 33 |
|
| 144 |
* @param $settings
|
| 145 |
*
|
| 146 |
* @return mixed
|
| 147 |
+
* @since 2.5.0
|
| 148 |
*/
|
| 149 |
public function backward_compatibility_admin_responsive_gutter( $value, $key, $settings ) {
|
| 150 |
|
| 163 |
/**
|
| 164 |
* Backwards compatibility for responsie gutter
|
| 165 |
*
|
|
|
|
| 166 |
* @param $settings
|
| 167 |
*
|
| 168 |
* @return mixed
|
| 169 |
+
* @since 2.5.0
|
| 170 |
*/
|
| 171 |
+
public function backward_compatibility_front_responsive_gutter( $settings ) {
|
| 172 |
|
| 173 |
+
// Backwards compatibility for tablet & mobile gutter.
|
| 174 |
+
if ( isset( $settings['gutter'] ) ) {
|
| 175 |
+
|
| 176 |
+
if ( ! isset( $settings['tablet_gutter'] ) ) {
|
| 177 |
+
$settings['tablet_gutter'] = absint( $settings['gutter'] );
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
if ( ! isset( $settings['mobile_gutter'] ) ) {
|
| 181 |
+
$settings['mobile_gutter'] = absint( $settings['gutter'] );
|
| 182 |
+
}
|
| 183 |
|
|
|
|
|
|
|
| 184 |
}
|
| 185 |
|
| 186 |
+
return $settings;
|
| 187 |
|
| 188 |
}
|
| 189 |
|
| 193 |
* @param $settings
|
| 194 |
*
|
| 195 |
* @return mixed
|
| 196 |
+
* @since 2.5.0
|
| 197 |
*/
|
| 198 |
public function backward_compatibility_backbone_responsive_gutter( $settings ) {
|
| 199 |
|
| 217 |
* @param $settings
|
| 218 |
*
|
| 219 |
* @return mixed
|
| 220 |
+
* @since 2.5.0
|
| 221 |
*/
|
| 222 |
public function backward_compatibility_admin_thumb_size( $value, $key, $settings ){
|
| 223 |
|
| 245 |
* @param $settings
|
| 246 |
*
|
| 247 |
* @return mixed
|
| 248 |
+
* @since 2.5.0
|
| 249 |
*/
|
| 250 |
public function backward_compatibility_backbone_thumb_size( $settings ){
|
| 251 |
|
includes/class-modula-gutenberg.php
CHANGED
|
@@ -20,7 +20,7 @@ class Modula_Gutenberg {
|
|
| 20 |
/**
|
| 21 |
* Register block type
|
| 22 |
*
|
| 23 |
-
* @since 2.
|
| 24 |
*/
|
| 25 |
public function register_block_type() {
|
| 26 |
|
|
@@ -41,7 +41,7 @@ class Modula_Gutenberg {
|
|
| 41 |
/**
|
| 42 |
* Enqueue block assets
|
| 43 |
*
|
| 44 |
-
* @since 2.
|
| 45 |
*/
|
| 46 |
public function enqueue_block_assets() {
|
| 47 |
$screen = get_current_screen();
|
|
@@ -63,7 +63,7 @@ class Modula_Gutenberg {
|
|
| 63 |
/**
|
| 64 |
* modulaVars generator
|
| 65 |
*
|
| 66 |
-
* @since 2.
|
| 67 |
*/
|
| 68 |
public function generate_js_vars() {
|
| 69 |
|
|
@@ -114,7 +114,7 @@ class Modula_Gutenberg {
|
|
| 114 |
/**
|
| 115 |
* Gallery meta ajax callback
|
| 116 |
*
|
| 117 |
-
* @since 2.
|
| 118 |
*
|
| 119 |
* @return object $images
|
| 120 |
*/
|
|
@@ -153,7 +153,7 @@ class Modula_Gutenberg {
|
|
| 153 |
/**
|
| 154 |
* Get js config ajax callback
|
| 155 |
*
|
| 156 |
-
* @since 2.
|
| 157 |
*
|
| 158 |
* @return object $js_config
|
| 159 |
*/
|
| 20 |
/**
|
| 21 |
* Register block type
|
| 22 |
*
|
| 23 |
+
* @since 2.5.0
|
| 24 |
*/
|
| 25 |
public function register_block_type() {
|
| 26 |
|
| 41 |
/**
|
| 42 |
* Enqueue block assets
|
| 43 |
*
|
| 44 |
+
* @since 2.5.0
|
| 45 |
*/
|
| 46 |
public function enqueue_block_assets() {
|
| 47 |
$screen = get_current_screen();
|
| 63 |
/**
|
| 64 |
* modulaVars generator
|
| 65 |
*
|
| 66 |
+
* @since 2.5.0
|
| 67 |
*/
|
| 68 |
public function generate_js_vars() {
|
| 69 |
|
| 114 |
/**
|
| 115 |
* Gallery meta ajax callback
|
| 116 |
*
|
| 117 |
+
* @since 2.5.0
|
| 118 |
*
|
| 119 |
* @return object $images
|
| 120 |
*/
|
| 153 |
/**
|
| 154 |
* Get js config ajax callback
|
| 155 |
*
|
| 156 |
+
* @since 2.5.0
|
| 157 |
*
|
| 158 |
* @return object $js_config
|
| 159 |
*/
|
includes/compatibility/class-modula-compatibility.php
CHANGED
|
@@ -6,7 +6,7 @@ class Modula_Compatibility {
|
|
| 6 |
/**
|
| 7 |
* Holds the class object.
|
| 8 |
*
|
| 9 |
-
* @since 2.
|
| 10 |
*
|
| 11 |
* @var object
|
| 12 |
*/
|
|
@@ -15,7 +15,7 @@ class Modula_Compatibility {
|
|
| 15 |
/**
|
| 16 |
* Modula_Compatibility constructor.
|
| 17 |
*
|
| 18 |
-
* @since 2.
|
| 19 |
*/
|
| 20 |
function __construct() {
|
| 21 |
|
|
@@ -33,7 +33,7 @@ class Modula_Compatibility {
|
|
| 33 |
* Returns the singleton instance of the class.
|
| 34 |
*
|
| 35 |
* @return object The Modula_Compatibility object.
|
| 36 |
-
* @since 2.
|
| 37 |
*/
|
| 38 |
public static function get_instance() {
|
| 39 |
|
|
@@ -52,7 +52,7 @@ class Modula_Compatibility {
|
|
| 52 |
* @param $description
|
| 53 |
*
|
| 54 |
* @return string
|
| 55 |
-
* @since 2.
|
| 56 |
*/
|
| 57 |
public function generate_compatibility_box( $description ) {
|
| 58 |
|
|
@@ -69,7 +69,7 @@ class Modula_Compatibility {
|
|
| 69 |
* @param $tab_content
|
| 70 |
*
|
| 71 |
* @return mixed
|
| 72 |
-
* @since 2.
|
| 73 |
*/
|
| 74 |
public function modula_lazyloading_compatibilty_admin( $tab_content ) {
|
| 75 |
|
|
@@ -156,7 +156,7 @@ class Modula_Compatibility {
|
|
| 156 |
* Check if other lazyloading software is used
|
| 157 |
*
|
| 158 |
* @return bool
|
| 159 |
-
* @since 2.
|
| 160 |
*/
|
| 161 |
public function check_lazyloading() {
|
| 162 |
|
|
@@ -175,7 +175,7 @@ class Modula_Compatibility {
|
|
| 175 |
* @param $field
|
| 176 |
*
|
| 177 |
* @return mixed
|
| 178 |
-
* @since 2.
|
| 179 |
*/
|
| 180 |
public function modula_lazyloading_compatibilty_admin_field( $format, $field ) {
|
| 181 |
|
|
@@ -195,7 +195,7 @@ class Modula_Compatibility {
|
|
| 195 |
* @param $js_config
|
| 196 |
*
|
| 197 |
* @return mixed
|
| 198 |
-
* @since 2.
|
| 199 |
*/
|
| 200 |
public function modula_gallery_config_compatibility( $js_config ) {
|
| 201 |
|
|
@@ -211,7 +211,7 @@ class Modula_Compatibility {
|
|
| 211 |
* Dequeue Modula's lazyload script
|
| 212 |
*
|
| 213 |
* @return bool
|
| 214 |
-
* @since 2.
|
| 215 |
*/
|
| 216 |
public function modula_lazyload_compatibility_script($return) {
|
| 217 |
|
|
@@ -231,7 +231,7 @@ class Modula_Compatibility {
|
|
| 231 |
* Return item data if other lazyloading is enabled
|
| 232 |
*
|
| 233 |
* @return bool
|
| 234 |
-
* @since 2.
|
| 235 |
*/
|
| 236 |
public function modula_lazyload_compatibility_item() {
|
| 237 |
|
|
@@ -250,7 +250,7 @@ class Modula_Compatibility {
|
|
| 250 |
* @param $settings
|
| 251 |
*
|
| 252 |
* @return int
|
| 253 |
-
* @since 2.
|
| 254 |
*/
|
| 255 |
public function lazyload_admin_compatibility( $value, $key, $settings ){
|
| 256 |
|
|
@@ -271,7 +271,7 @@ class Modula_Compatibility {
|
|
| 271 |
* @param $settings
|
| 272 |
*
|
| 273 |
* @return mixed
|
| 274 |
-
* @since 2.
|
| 275 |
*/
|
| 276 |
public function lazyload_backbone_compatibility( $settings ){
|
| 277 |
|
| 6 |
/**
|
| 7 |
* Holds the class object.
|
| 8 |
*
|
| 9 |
+
* @since 2.5.0
|
| 10 |
*
|
| 11 |
* @var object
|
| 12 |
*/
|
| 15 |
/**
|
| 16 |
* Modula_Compatibility constructor.
|
| 17 |
*
|
| 18 |
+
* @since 2.5.0
|
| 19 |
*/
|
| 20 |
function __construct() {
|
| 21 |
|
| 33 |
* Returns the singleton instance of the class.
|
| 34 |
*
|
| 35 |
* @return object The Modula_Compatibility object.
|
| 36 |
+
* @since 2.5.0
|
| 37 |
*/
|
| 38 |
public static function get_instance() {
|
| 39 |
|
| 52 |
* @param $description
|
| 53 |
*
|
| 54 |
* @return string
|
| 55 |
+
* @since 2.5.0
|
| 56 |
*/
|
| 57 |
public function generate_compatibility_box( $description ) {
|
| 58 |
|
| 69 |
* @param $tab_content
|
| 70 |
*
|
| 71 |
* @return mixed
|
| 72 |
+
* @since 2.5.0
|
| 73 |
*/
|
| 74 |
public function modula_lazyloading_compatibilty_admin( $tab_content ) {
|
| 75 |
|
| 156 |
* Check if other lazyloading software is used
|
| 157 |
*
|
| 158 |
* @return bool
|
| 159 |
+
* @since 2.5.0
|
| 160 |
*/
|
| 161 |
public function check_lazyloading() {
|
| 162 |
|
| 175 |
* @param $field
|
| 176 |
*
|
| 177 |
* @return mixed
|
| 178 |
+
* @since 2.5.0
|
| 179 |
*/
|
| 180 |
public function modula_lazyloading_compatibilty_admin_field( $format, $field ) {
|
| 181 |
|
| 195 |
* @param $js_config
|
| 196 |
*
|
| 197 |
* @return mixed
|
| 198 |
+
* @since 2.5.0
|
| 199 |
*/
|
| 200 |
public function modula_gallery_config_compatibility( $js_config ) {
|
| 201 |
|
| 211 |
* Dequeue Modula's lazyload script
|
| 212 |
*
|
| 213 |
* @return bool
|
| 214 |
+
* @since 2.5.0
|
| 215 |
*/
|
| 216 |
public function modula_lazyload_compatibility_script($return) {
|
| 217 |
|
| 231 |
* Return item data if other lazyloading is enabled
|
| 232 |
*
|
| 233 |
* @return bool
|
| 234 |
+
* @since 2.5.0
|
| 235 |
*/
|
| 236 |
public function modula_lazyload_compatibility_item() {
|
| 237 |
|
| 250 |
* @param $settings
|
| 251 |
*
|
| 252 |
* @return int
|
| 253 |
+
* @since 2.5.0
|
| 254 |
*/
|
| 255 |
public function lazyload_admin_compatibility( $value, $key, $settings ){
|
| 256 |
|
| 271 |
* @param $settings
|
| 272 |
*
|
| 273 |
* @return mixed
|
| 274 |
+
* @since 2.5.0
|
| 275 |
*/
|
| 276 |
public function lazyload_backbone_compatibility( $settings ){
|
| 277 |
|
includes/public/class-modula-shortcode.php
CHANGED
|
@@ -94,7 +94,8 @@ class Modula_Shortcode {
|
|
| 94 |
}
|
| 95 |
|
| 96 |
/* Get gallery settings */
|
| 97 |
-
$settings = get_post_meta( $atts['id'], 'modula-settings', true );
|
|
|
|
| 98 |
$default = Modula_CPT_Fields_Helper::get_defaults();
|
| 99 |
$settings = wp_parse_args( $settings, $default );
|
| 100 |
|
| 94 |
}
|
| 95 |
|
| 96 |
/* Get gallery settings */
|
| 97 |
+
$settings = apply_filters('modula_backwards_compatibility_front',get_post_meta( $atts['id'], 'modula-settings', true ));
|
| 98 |
+
|
| 99 |
$default = Modula_CPT_Fields_Helper::get_defaults();
|
| 100 |
$settings = wp_parse_args( $settings, $default );
|
| 101 |
|
includes/public/modula-helper-functions.php
CHANGED
|
@@ -285,7 +285,7 @@ function modula_add_scripts( $scripts, $settings ){
|
|
| 285 |
/**Add the powered by text and link
|
| 286 |
*
|
| 287 |
* @param $settings
|
| 288 |
-
* @moved here since 2.
|
| 289 |
*/
|
| 290 |
function powered_by_modula( $settings ) {
|
| 291 |
if( !isset($settings['powered_by']) || 0 == $settings['powered_by'] ) {
|
| 285 |
/**Add the powered by text and link
|
| 286 |
*
|
| 287 |
* @param $settings
|
| 288 |
+
* @moved here since 2.5.0
|
| 289 |
*/
|
| 290 |
function powered_by_modula( $settings ) {
|
| 291 |
if( !isset($settings['powered_by']) || 0 == $settings['powered_by'] ) {
|
includes/public/templates/items/item-none.php
CHANGED
|
@@ -12,7 +12,7 @@
|
|
| 12 |
|
| 13 |
$image_meta = wp_get_attachment_metadata( $data->link_attributes['data-image-id'] );
|
| 14 |
|
| 15 |
-
if(
|
| 16 |
$image_meta['sizes']['custom'] = array(
|
| 17 |
'file' => $data->image_info['name'] . '-' . $data->image_info['suffix'] .'.' . $data->image_info['ext'],
|
| 18 |
'width' => $data->img_attributes['width'],
|
| 12 |
|
| 13 |
$image_meta = wp_get_attachment_metadata( $data->link_attributes['data-image-id'] );
|
| 14 |
|
| 15 |
+
if( ! empty( $data->image_info ) ){
|
| 16 |
$image_meta['sizes']['custom'] = array(
|
| 17 |
'file' => $data->image_info['name'] . '-' . $data->image_info['suffix'] .'.' . $data->image_info['ext'],
|
| 18 |
'width' => $data->img_attributes['width'],
|
includes/public/templates/items/item.php
CHANGED
|
@@ -16,7 +16,7 @@
|
|
| 16 |
|
| 17 |
$image_meta = wp_get_attachment_metadata( $data->link_attributes['data-image-id'] );
|
| 18 |
|
| 19 |
-
if(
|
| 20 |
$image_meta['sizes']['custom'] = array(
|
| 21 |
'file' => $data->image_info['name'] . '-' . $data->image_info['suffix'] .'.' . $data->image_info['ext'],
|
| 22 |
'width' => $data->img_attributes['width'],
|
| 16 |
|
| 17 |
$image_meta = wp_get_attachment_metadata( $data->link_attributes['data-image-id'] );
|
| 18 |
|
| 19 |
+
if( ! empty( $data->image_info ) ){
|
| 20 |
$image_meta['sizes']['custom'] = array(
|
| 21 |
'file' => $data->image_info['name'] . '-' . $data->image_info['suffix'] .'.' . $data->image_info['ext'],
|
| 22 |
'width' => $data->img_attributes['width'],
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: best gallery plugin, image gallery, video gallery, free gallery, wordpress
|
|
| 4 |
Requires at least: 5.2
|
| 5 |
Tested up to: 5.7
|
| 6 |
Requires PHP: 5.6
|
| 7 |
-
Stable tag: 2.5.
|
| 8 |
License: GNU General Public License v3.0 or later
|
| 9 |
|
| 10 |
The WordPress gallery plugin that's highlighy customizable & you can use to impress your clients. Create beautiful image galleries in minutes.
|
| 4 |
Requires at least: 5.2
|
| 5 |
Tested up to: 5.7
|
| 6 |
Requires PHP: 5.6
|
| 7 |
+
Stable tag: 2.5.1
|
| 8 |
License: GNU General Public License v3.0 or later
|
| 9 |
|
| 10 |
The WordPress gallery plugin that's highlighy customizable & you can use to impress your clients. Create beautiful image galleries in minutes.
|
