Skip to content

Commit

Permalink
Tt 3169 auto install block art and magzine blocks while demo import (#95
Browse files Browse the repository at this point in the history
)

* auto install blockart and magazine blocks

* change log update
  • Loading branch information
som3669 authored Mar 19, 2024
1 parent 01b2b92 commit a1d361d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
18 changes: 18 additions & 0 deletions includes/class-demo-importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,24 @@ public function ajax_query_demos( $return = true ) {
continue;
}

$plugins_list = is_object( $plugins_list ) ? $plugins_list : new stdClass();

// Zakra: check if BlockArt is in plugin list if not add it.
if ( 'Zakra' === $current_theme_name && ! isset( $plugins_list->{'blockart-blocks'} ) ) {
$plugins_list->{'blockart-blocks'} = (object) array(
'name' => 'BlockArt',
'slug' => 'blockart-blocks/blockart.php'
);
}

// CM: check if Magazine blocks is in plugin list if not add it.
if ( 'ColorMag' === $current_theme_name && ! isset( $plugins_list->{'magazine-blocks'} ) ) {
$plugins_list->{'magazine-blocks'} = (object) array(
'name' => 'Magazine Blocks',
'slug' => 'magazine-blocks/magazine-blocks.php'
);
}

// Plugins status.
foreach ( $plugins_list as $plugin => $plugin_data ) {
$plugin_data->is_active = 'learning-management-system/lms.php' === $plugin_data->slug ? ( is_plugin_active( 'learning-management-system/lms.php' ) || is_plugin_active( 'learning-management-system-pro/lms.php' ) ) : is_plugin_active( $plugin_data->slug );
Expand Down
2 changes: 1 addition & 1 deletion includes/class-themegrill-demo-importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class ThemeGrill_Demo_Importer {
*
* @var string
*/
public $version = '1.9.4.3';
public $version = '1.9.5';

/**
* Theme single instance of this class.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "themegrill-demo-importer",
"title": "ThemeGrill Demo Importer",
"version": "1.9.4.4",
"version": "1.9.5",
"homepage": "https://themegrill.com/demo-importer/",
"repository": {
"type": "git",
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: ThemeGrill
Tags: themegrill, theme demos, demo, importer, one click import
Requires at least: 4.7
Tested up to: 6.4
Stable tag: 1.9.4.4
Stable tag: 1.9.5
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -76,6 +76,9 @@ Yes you can! Join in on our [GitHub repository](https://github.com/themegrill/th
3. Finally, Import the Demo with just one click.

== Changelog ==
= 1.9.5 - 13-03-2024 =
* Tweak – Update review notice message.

= 1.9.4.4 - 15-01-2023 =
* Support - Support for theme dashboard enhancement.

Expand Down
2 changes: 1 addition & 1 deletion themegrill-demo-importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: ThemeGrill Demo Importer
* Plugin URI: https://themegrill.com/demo-importer/
* Description: Import ThemeGrill official themes demo content, widgets and theme settings with just one click.
* Version: 1.9.4.4
* Version: 1.9.5
* Author: ThemeGrill
* Author URI: https://themegrill.com
* License: GPLv3 or later
Expand Down

0 comments on commit a1d361d

Please sign in to comment.