Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix text domain; version bump; changelog update; #1161

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Modula.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://wp-modula.com/
* Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
* Author: WPChill
* Version: 2.11.8
* Version: 2.11.9
* Author URI: https://www.wpchill.com/
* License: GPLv3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -47,7 +47,7 @@
* @since 2.0.2
*/

define( 'MODULA_LITE_VERSION', '2.11.8' );
define( 'MODULA_LITE_VERSION', '2.11.9' );
define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) );
define( 'MODULA_URL', plugin_dir_url( __FILE__ ) );
defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL', 'https://wp-modula.com' );
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
== Changelog ==
= 2.11.9 - 19.12.2024 =
Fixed: Text domain loading

= 2.11.8 - 17.12.2024 =
Update: Seasonal promotions notifications

Expand Down
101 changes: 63 additions & 38 deletions includes/admin/class-modula-addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,20 @@ class Modula_Addons {

public $free_addons = array();

function __construct() {
/**
* Holds the class object.
*
* @since 2.5.0
*
* @var object
*/
public static $instance;

private function __construct() {
// Add ajax action to reload extensions
add_action( 'wp_ajax_modula_reload_extensions', array( $this, 'reload_extensions' ), 20 );
add_filter( 'modula_free_extensions', array( $this, 'check_for_release' ), 999 );

// Add free
$this->free_addons = apply_filters( 'modula_free_extensions', array(
'modula-foo-migrator' => array(
'slug' => 'modula-foo-migrator',
'name' => __( 'Migrate away from FooGallery', 'modula-best-grid-gallery' ),
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
'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')
),
'modula-nextgen-migrator' => array(
'slug' => 'modula-nextgen-migrator',
'name' => __( 'Migrate away from NextGEN', 'modula-best-grid-gallery' ),
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
'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')
),
'modula-envira-migrator' => array(
'slug' => 'modula-envira-migrator',
'name' => __( 'Migrate away from Envira', 'modula-best-grid-gallery' ),
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
'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')
),
'modula-photoblocks-gallery-migrator' => array(
'slug' => 'modula-photoblocks-gallery-migrator',
'name' => __( 'Migrate away from PhotoBlocks', 'modula-best-grid-gallery' ),
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
'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')
),
'modula-final-tiles-migrator' => array(
'slug' => 'modula-final-tiles-migrator',
'name' => __( 'Migrate away from Final Tiles', 'modula-best-grid-gallery' ),
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
'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')
)
) );
add_action( 'init', array( $this, 'set_free_addons' ) );
}

private function check_for_addons() {
Expand Down Expand Up @@ -109,7 +85,6 @@ public function render_addons() {
* @since 2.5.5
*/
public function render_free_addons() {

if ( ! empty( $this->free_addons ) ) {

foreach ( $this->free_addons as $addon ) {
Expand Down Expand Up @@ -213,7 +188,6 @@ public function reload_extensions() {
* @since 2.5.5
*/
public function check_free_addons() {

return !empty( $this->free_addons );
}

Expand Down Expand Up @@ -261,6 +235,57 @@ public function render_addon_top( $addon = false, $addons_images = false ) {
public function check_for_release( $addons ) {
return $addons;
}

public function set_free_addons() {
// Add free
$this->free_addons = apply_filters( 'modula_free_extensions', array(
'modula-foo-migrator' => array(
'slug' => 'modula-foo-migrator',
'name' => __( 'Migrate away from FooGallery', 'modula-best-grid-gallery' ),
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
'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')
),
'modula-nextgen-migrator' => array(
'slug' => 'modula-nextgen-migrator',
'name' => __( 'Migrate away from NextGEN', 'modula-best-grid-gallery' ),
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
'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')
),
'modula-envira-migrator' => array(
'slug' => 'modula-envira-migrator',
'name' => __( 'Migrate away from Envira', 'modula-best-grid-gallery' ),
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
'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')
),
'modula-photoblocks-gallery-migrator' => array(
'slug' => 'modula-photoblocks-gallery-migrator',
'name' => __( 'Migrate away from PhotoBlocks', 'modula-best-grid-gallery' ),
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
'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')
),
'modula-final-tiles-migrator' => array(
'slug' => 'modula-final-tiles-migrator',
'name' => __( 'Migrate away from Final Tiles', 'modula-best-grid-gallery' ),
'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
'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')
)
) );
}

/**
* Returns the singleton instance of the class.
*
* @return object The Modula_Addons object.
* @since 2.11.19
*/
public static function get_instance() {

if ( !isset( self::$instance ) || !( self::$instance instanceof Modula_Addons ) ) {
self::$instance = new Modula_Addons();
}

return self::$instance;
}
}

$addons = new Modula_Addons();
$addons = Modula_Addons::get_instance();
2 changes: 1 addition & 1 deletion includes/admin/class-modula-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class="dashicons dashicons-update"></span><?php esc_html_e( 'Reload Extensions',

if ( 'extensions' == $active_tab ) {

$addons = new Modula_Addons();
$addons = Modula_Addons::get_instance();
$pro_ext = false;

if(!isset($_GET['extensions']) || 'pro' === $_GET['extensions']){
Expand Down
29 changes: 18 additions & 11 deletions includes/class-modula-upgrades.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,7 @@ class Modula_Upgrades {
private $completed_upgrades = array();

function __construct() {
$upgrades = array(
'modula_v2' => array(
'notice' => esc_html__( 'Modula needs to upgrade the database, click %shere%s to start the upgrade.', 'modula-best-grid-gallery' ),
'id' => 'modula-upgrade-v2',
'version' => '2.0.0',
'compare' => '<',
'title' => esc_html__( 'Modula V2 Upgrade', 'modula-best-grid-gallery' ),
'callback' => 'modula_upgrade_v2',
),
);
$this->upgrades = apply_filters( 'modula_upgrades', $upgrades );
add_action( 'init', array( $this, 'init' ) );
}

/**
Expand Down Expand Up @@ -477,4 +467,21 @@ public function dismiss_notices_script() {
<?php
}
}

/**
* Set upgrades
*/
public function init() {
$upgrades = array(
'modula_v2' => array(
'notice' => esc_html__( 'Modula needs to upgrade the database, click %shere%s to start the upgrade.', 'modula-best-grid-gallery' ),
'id' => 'modula-upgrade-v2',
'version' => '2.0.0',
'compare' => '<',
'title' => esc_html__( 'Modula V2 Upgrade', 'modula-best-grid-gallery' ),
'callback' => 'modula_upgrade_v2',
),
);
$this->upgrades = apply_filters( 'modula_upgrades', $upgrades );
}
}
15 changes: 7 additions & 8 deletions includes/libraries/class-modula-review.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ class Modula_Review {
private $slug = 'modula-best-grid-gallery';

function __construct() {
add_action( 'init', array( $this, 'init' ) );
}

public function init() {
if ( ! is_admin() ) {
return;
}

$this->messages = array(
'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' ),
Expand All @@ -20,14 +27,6 @@ function __construct() {
$this->messages = wp_parse_args( $args['messages'], $this->messages );
}

add_action( 'init', array( $this, 'init' ) );
}

public function init() {
if ( ! is_admin() ) {
return;
}

$this->value = $this->value();

if ( $this->check() ) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modula-best-grid-gallery",
"version": "2.11.8",
"version": "2.11.9",
"description": "Modula Image Gallery build tools",
"author": "WPChill",
"license": "GPL-2.0-or-later",
Expand Down
4 changes: 3 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: best gallery plugin, image gallery, video gallery, free gallery, wordpress
Requires at least: 5.3
Tested up to: 6.7
Requires PHP: 5.6
Stable tag: 2.11.8
Stable tag: 2.11.9

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

== Changelog ==
= 2.11.9 - 19.12.2024 =
Fixed: Text domain loading

= 2.11.8 - 17.12.2024 =
Update: Seasonal promotions notifications.
Expand Down
Loading