Skip to content

Commit 4a02a62

Browse files
authored
Merge pull request #1153 from WPChill/2.11.5
2.11.5
2 parents 2d86217 + 33699b3 commit 4a02a62

File tree

11 files changed

+35
-15
lines changed

11 files changed

+35
-15
lines changed

Modula.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin URI: https://wp-modula.com/
55
* Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
66
* Author: WPChill
7-
* Version: 2.11.4
7+
* Version: 2.11.5
88
* Author URI: https://www.wpchill.com/
99
* License: GPLv3 or later
1010
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -47,7 +47,7 @@
4747
* @since 2.0.2
4848
*/
4949

50-
define( 'MODULA_LITE_VERSION', '2.11.4' );
50+
define( 'MODULA_LITE_VERSION', '2.11.5' );
5151
define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) );
5252
define( 'MODULA_URL', plugin_dir_url( __FILE__ ) );
5353
defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL', 'https://wp-modula.com' );
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
import { QueryClient } from '@tanstack/react-query';
22

3-
export const queryClient = new QueryClient();
3+
export const queryClient = new QueryClient( {
4+
defaultOptions: {
5+
queries: {
6+
retry: ( failureCount ) => failureCount < 5,
7+
},
8+
},
9+
} );

apps/notification-system/query/useNotificationQuery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ export const useNotificationQuery = () => {
1010
});
1111
return data;
1212
},
13-
refetchInterval: 5000,
13+
refetchInterval: ( query ) => query?.state?.fetchFailureCount < 5 ? 5000 : false,
1414
});
1515
};

assets/js/admin/modula-edit.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,16 @@
168168
}
169169
});
170170

171-
const sideSortables = document.getElementById('side-sortables');
172-
const submitDiv = document.getElementById('submitdiv');
173-
const offsetTop = submitDiv.offsetTop + 100;
174-
const stickyClass = 'is-sticky';
175171
const checkSticky = () => {
172+
const sideSortables = document.getElementById('side-sortables');
173+
const submitDiv = document.getElementById('submitdiv');
174+
175+
if ( ! submitDiv || ! sideSortables ) {
176+
return;
177+
}
178+
179+
const offsetTop = submitDiv.offsetTop + 100;
180+
const stickyClass = 'is-sticky';
176181
if (window.scrollY >= offsetTop) {
177182
sideSortables.classList.add(stickyClass);
178183
} else {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '5bdd671c336974c091d6');
1+
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'c106a42061a7c2230c5c');

assets/js/admin/notification-system/notification-system.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
== Changelog ==
2+
= 2.11.5 - 05.12.2024 =
3+
Fixed: Resolved infinite REST notification retries when the user lacks the manage_options capability.
4+
Fixed: Addressed an undefined JavaScript error that occurred outside the Modula edit screen.
5+
26
= 2.11.4 - 04.12.2024 =
37
Fixed: Search for galleries with numeric title. ( [#1135]( https://github.com/WPChill/modula-lite/issues/1135) )
48
Fixed: Incompatibility with "Multisite Shared Media Library" plugin ( [#1143]( https://github.com/WPChill/modula-lite/issues/1143) )

includes/class-modula.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ public function after_modula_update() {
779779
*/
780780
public function notification_system_scripts( ) {
781781

782-
if ( ! $this->is_modula_admin_page() ) {
782+
if ( ! $this->is_modula_admin_page() || ! current_user_can( 'manage_options' ) ) {
783783
return;
784784
}
785785

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "modula-best-grid-gallery",
3-
"version": "2.11.4",
3+
"version": "2.11.5",
44
"description": "Modula Image Gallery build tools",
55
"author": "WPChill",
66
"license": "GPL-2.0-or-later",

0 commit comments

Comments
 (0)