Skip to content

Commit 5bbb4bc

Browse files
committed
fix text domain; version bump; changelog update;
1 parent b1e86dd commit 5bbb4bc

File tree

8 files changed

+98
-62
lines changed

8 files changed

+98
-62
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.8
7+
* Version: 2.11.9
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.8' );
50+
define( 'MODULA_LITE_VERSION', '2.11.9' );
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' );

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
== Changelog ==
2+
= 2.11.9 - 19.12.2024 =
3+
Fixed: Text domain loading
4+
25
= 2.11.8 - 17.12.2024 =
36
Update: Seasonal promotions notifications
47

includes/admin/class-modula-addons.php

Lines changed: 63 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,20 @@ class Modula_Addons {
66

77
public $free_addons = array();
88

9-
function __construct() {
9+
/**
10+
* Holds the class object.
11+
*
12+
* @since 2.5.0
13+
*
14+
* @var object
15+
*/
16+
public static $instance;
17+
18+
private function __construct() {
1019
// Add ajax action to reload extensions
1120
add_action( 'wp_ajax_modula_reload_extensions', array( $this, 'reload_extensions' ), 20 );
1221
add_filter( 'modula_free_extensions', array( $this, 'check_for_release' ), 999 );
13-
14-
// Add free
15-
$this->free_addons = apply_filters( 'modula_free_extensions', array(
16-
'modula-foo-migrator' => array(
17-
'slug' => 'modula-foo-migrator',
18-
'name' => __( 'Migrate away from FooGallery', 'modula-best-grid-gallery' ),
19-
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
20-
'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'modula-best-grid-gallery')
21-
),
22-
'modula-nextgen-migrator' => array(
23-
'slug' => 'modula-nextgen-migrator',
24-
'name' => __( 'Migrate away from NextGEN', 'modula-best-grid-gallery' ),
25-
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
26-
'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'modula-best-grid-gallery')
27-
),
28-
'modula-envira-migrator' => array(
29-
'slug' => 'modula-envira-migrator',
30-
'name' => __( 'Migrate away from Envira', 'modula-best-grid-gallery' ),
31-
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
32-
'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'modula-best-grid-gallery')
33-
),
34-
'modula-photoblocks-gallery-migrator' => array(
35-
'slug' => 'modula-photoblocks-gallery-migrator',
36-
'name' => __( 'Migrate away from PhotoBlocks', 'modula-best-grid-gallery' ),
37-
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
38-
'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'modula-best-grid-gallery')
39-
),
40-
'modula-final-tiles-migrator' => array(
41-
'slug' => 'modula-final-tiles-migrator',
42-
'name' => __( 'Migrate away from Final Tiles', 'modula-best-grid-gallery' ),
43-
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
44-
'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'modula-best-grid-gallery')
45-
)
46-
) );
22+
add_action( 'init', array( $this, 'set_free_addons' ) );
4723
}
4824

4925
private function check_for_addons() {
@@ -109,7 +85,6 @@ public function render_addons() {
10985
* @since 2.5.5
11086
*/
11187
public function render_free_addons() {
112-
11388
if ( ! empty( $this->free_addons ) ) {
11489

11590
foreach ( $this->free_addons as $addon ) {
@@ -213,7 +188,6 @@ public function reload_extensions() {
213188
* @since 2.5.5
214189
*/
215190
public function check_free_addons() {
216-
217191
return !empty( $this->free_addons );
218192
}
219193

@@ -261,6 +235,57 @@ public function render_addon_top( $addon = false, $addons_images = false ) {
261235
public function check_for_release( $addons ) {
262236
return $addons;
263237
}
238+
239+
public function set_free_addons() {
240+
// Add free
241+
$this->free_addons = apply_filters( 'modula_free_extensions', array(
242+
'modula-foo-migrator' => array(
243+
'slug' => 'modula-foo-migrator',
244+
'name' => __( 'Migrate away from FooGallery', 'modula-best-grid-gallery' ),
245+
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
246+
'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'modula-best-grid-gallery')
247+
),
248+
'modula-nextgen-migrator' => array(
249+
'slug' => 'modula-nextgen-migrator',
250+
'name' => __( 'Migrate away from NextGEN', 'modula-best-grid-gallery' ),
251+
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
252+
'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'modula-best-grid-gallery')
253+
),
254+
'modula-envira-migrator' => array(
255+
'slug' => 'modula-envira-migrator',
256+
'name' => __( 'Migrate away from Envira', 'modula-best-grid-gallery' ),
257+
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
258+
'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'modula-best-grid-gallery')
259+
),
260+
'modula-photoblocks-gallery-migrator' => array(
261+
'slug' => 'modula-photoblocks-gallery-migrator',
262+
'name' => __( 'Migrate away from PhotoBlocks', 'modula-best-grid-gallery' ),
263+
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
264+
'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'modula-best-grid-gallery')
265+
),
266+
'modula-final-tiles-migrator' => array(
267+
'slug' => 'modula-final-tiles-migrator',
268+
'name' => __( 'Migrate away from Final Tiles', 'modula-best-grid-gallery' ),
269+
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
270+
'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'modula-best-grid-gallery')
271+
)
272+
) );
273+
}
274+
275+
/**
276+
* Returns the singleton instance of the class.
277+
*
278+
* @return object The Modula_Addons object.
279+
* @since 2.11.19
280+
*/
281+
public static function get_instance() {
282+
283+
if ( !isset( self::$instance ) || !( self::$instance instanceof Modula_Addons ) ) {
284+
self::$instance = new Modula_Addons();
285+
}
286+
287+
return self::$instance;
288+
}
264289
}
265290

266-
$addons = new Modula_Addons();
291+
$addons = Modula_Addons::get_instance();

includes/admin/class-modula-admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class="dashicons dashicons-update"></span><?php esc_html_e( 'Reload Extensions',
340340

341341
if ( 'extensions' == $active_tab ) {
342342

343-
$addons = new Modula_Addons();
343+
$addons = Modula_Addons::get_instance();
344344
$pro_ext = false;
345345

346346
if(!isset($_GET['extensions']) || 'pro' === $_GET['extensions']){

includes/class-modula-upgrades.php

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,7 @@ class Modula_Upgrades {
1010
private $completed_upgrades = array();
1111

1212
function __construct() {
13-
$upgrades = array(
14-
'modula_v2' => array(
15-
'notice' => esc_html__( 'Modula needs to upgrade the database, click %shere%s to start the upgrade.', 'modula-best-grid-gallery' ),
16-
'id' => 'modula-upgrade-v2',
17-
'version' => '2.0.0',
18-
'compare' => '<',
19-
'title' => esc_html__( 'Modula V2 Upgrade', 'modula-best-grid-gallery' ),
20-
'callback' => 'modula_upgrade_v2',
21-
),
22-
);
23-
$this->upgrades = apply_filters( 'modula_upgrades', $upgrades );
13+
add_action( 'init', array( $this, 'init' ) );
2414
}
2515

2616
/**
@@ -477,4 +467,21 @@ public function dismiss_notices_script() {
477467
<?php
478468
}
479469
}
470+
471+
/**
472+
* Set upgrades
473+
*/
474+
public function init() {
475+
$upgrades = array(
476+
'modula_v2' => array(
477+
'notice' => esc_html__( 'Modula needs to upgrade the database, click %shere%s to start the upgrade.', 'modula-best-grid-gallery' ),
478+
'id' => 'modula-upgrade-v2',
479+
'version' => '2.0.0',
480+
'compare' => '<',
481+
'title' => esc_html__( 'Modula V2 Upgrade', 'modula-best-grid-gallery' ),
482+
'callback' => 'modula_upgrade_v2',
483+
),
484+
);
485+
$this->upgrades = apply_filters( 'modula_upgrades', $upgrades );
486+
}
480487
}

includes/libraries/class-modula-review.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ class Modula_Review {
88
private $slug = 'modula-best-grid-gallery';
99

1010
function __construct() {
11+
add_action( 'init', array( $this, 'init' ) );
12+
}
13+
14+
public function init() {
15+
if ( ! is_admin() ) {
16+
return;
17+
}
1118

1219
$this->messages = array(
1320
'notice' => esc_html__( "Hi there! Stoked to see you're using Modula for a few days now - hope you like it! And if you do, please consider rating it. It would mean the world to us. Keep on rocking!", 'modula-best-grid-gallery' ),
@@ -20,14 +27,6 @@ function __construct() {
2027
$this->messages = wp_parse_args( $args['messages'], $this->messages );
2128
}
2229

23-
add_action( 'init', array( $this, 'init' ) );
24-
}
25-
26-
public function init() {
27-
if ( ! is_admin() ) {
28-
return;
29-
}
30-
3130
$this->value = $this->value();
3231

3332
if ( $this->check() ) {

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.8",
3+
"version": "2.11.9",
44
"description": "Modula Image Gallery build tools",
55
"author": "WPChill",
66
"license": "GPL-2.0-or-later",

readme.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: best gallery plugin, image gallery, video gallery, free gallery, wordpress
44
Requires at least: 5.3
55
Tested up to: 6.7
66
Requires PHP: 5.6
7-
Stable tag: 2.11.8
7+
Stable tag: 2.11.9
88

99
License: GNU General Public License v3.0 or later
1010
The WordPress gallery plugin that's highly customizable & you can use to impress your clients. Create beautiful image galleries in minutes.
@@ -158,6 +158,8 @@ Free support is included only with a PRO license: [Buy Modula PRO](https://wp-mo
158158
4. Responsive galleries created with Modula
159159

160160
== Changelog ==
161+
= 2.11.9 - 19.12.2024 =
162+
Fixed: Text domain loading
161163

162164
= 2.11.8 - 17.12.2024 =
163165
Update: Seasonal promotions notifications.

0 commit comments

Comments
 (0)