Skip to content

Commit

Permalink
Add more details about recommended plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
capuderg committed Mar 31, 2021
1 parent afeebdf commit 9fcf697
Show file tree
Hide file tree
Showing 9 changed files with 121 additions and 31 deletions.
27 changes: 26 additions & 1 deletion assets/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/main.min.css

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@
margin-bottom: 0;
}
}

&--warning {
background: #FFF8E5;
margin-top: 0;

p {
font-size: 16px;
line-height: 24px;
}
}
}

&-importing,
Expand Down Expand Up @@ -514,6 +524,19 @@
}
}
}

span.ocdi-recommended-star {
background-color: #FFB900;
width: 16px;
height: 16px;
border-radius: 8px;

img {
width: 10px;
height: 10px;
margin: 2px 3px;
}
}
}

.ocdi-install-plugins-content-footer,
Expand Down
6 changes: 6 additions & 0 deletions inc/PluginInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ private function get_top_partner_plugins() {

$plugins = array_slice( $this->get_partner_plugins(), 0, 3 );

$plugins = array_map( function ( $plugin ) {
unset( $plugin['preselected'] );

return $plugin;
} , $plugins );

return array_filter(
$plugins,
function ( $plugin ) use ( $installed_plugins, $contact_form, $seo, $google_analytics ) {
Expand Down
57 changes: 31 additions & 26 deletions languages/one-click-demo-import.pot
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
msgid ""
msgstr ""
"Project-Id-Version: One Click Demo Import 3.0.0\n"
"Project-Id-Version: One Click Demo Import 3.0.1\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/one-click-demo-import\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2021-03-31T10:43:06+00:00\n"
"POT-Creation-Date: 2021-03-31T18:29:04+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.4.0\n"
"X-Domain: one-click-demo-import\n"
Expand Down Expand Up @@ -403,12 +403,12 @@ msgid "No import files specified!"
msgstr ""

#: inc/OneClickDemoImport.php:451
#: views/import.php:101
#: views/import.php:118
msgid "Import Complete!"
msgstr ""

#: inc/OneClickDemoImport.php:452
#: views/import.php:104
#: views/import.php:121
msgid "Congrats, your demo was imported successfully. You can now begin editing your site."
msgstr ""

Expand Down Expand Up @@ -473,31 +473,31 @@ msgstr ""
msgid "Make email delivery easy for WordPress. Connect with SMTP, Gmail, Outlook, Mailgun, and more."
msgstr ""

#: inc/PluginInstaller.php:220
#: inc/PluginInstaller.php:226
msgid "Could not install the plugin. You don't have permission to install plugins."
msgstr ""

#: inc/PluginInstaller.php:226
#: inc/PluginInstaller.php:232
msgid "Could not install the plugin. Plugin slug is missing."
msgstr ""

#: inc/PluginInstaller.php:231
#: inc/PluginInstaller.php:237
msgid "Plugin is already installed and activated!"
msgstr ""

#: inc/PluginInstaller.php:239
#: inc/PluginInstaller.php:245
msgid "Plugin was already installed! We activated it for you."
msgstr ""

#: inc/PluginInstaller.php:247
#: inc/PluginInstaller.php:253
msgid "Could not install the plugin. Don't have file permission."
msgstr ""

#: inc/PluginInstaller.php:287
#: inc/PluginInstaller.php:293
msgid "Plugin installed and activated succesfully."
msgstr ""

#: inc/PluginInstaller.php:294
#: inc/PluginInstaller.php:300
msgid "Could not install the plugin. WP Plugin installer could not retrieve plugin information."
msgstr ""

Expand Down Expand Up @@ -688,13 +688,13 @@ msgid "Select which pre-built pages you want to import to use on your website. A
msgstr ""

#: views/create-content.php:50
#: views/import.php:69
#: views/import.php:71
#: views/install-plugins.php:49
msgid "Checkmark icon"
msgstr ""

#: views/create-content.php:51
#: views/import.php:73
#: views/import.php:75
#: views/install-plugins.php:50
msgid "Loading..."
msgstr ""
Expand All @@ -704,13 +704,13 @@ msgid "The following plugins will be installed for free: "
msgstr ""

#: views/create-content.php:66
#: views/import.php:81
#: views/import.php:98
#: views/install-plugins.php:57
msgid "Back icon"
msgstr ""

#: views/create-content.php:66
#: views/import.php:81
#: views/import.php:98
#: views/install-plugins.php:57
msgid "Go Back"
msgstr ""
Expand All @@ -719,48 +719,53 @@ msgstr ""
msgid "Import"
msgstr ""

#: views/import.php:27
#: views/import.php:28
msgid "Before We Import Your Demo"
msgstr ""

#: views/import.php:29
#: views/import.php:30
msgid "To ensure the best experience, installing the following plugins is strongly recommended, and in some cases required."
msgstr ""

#: views/import.php:42
#: views/import.php:43
msgid "All required/recommended plugins are already installed. You can import your demo content."
msgstr ""

#: views/import.php:54
#: views/import.php:56
#: views/import.php:89
msgid "Star icon"
msgstr ""

#: views/import.php:71
#: views/import.php:73
msgid "Lock icon"
msgstr ""

#: views/import.php:82
#: views/import.php:85
msgid "The plugins with %1$s are recommended by One Click Demo Import plugin to help you grow your website. They are not required for the %2$s theme to work."
msgstr ""

#: views/import.php:99
#: views/plugin-page.php:277
msgid "Continue & Import"
msgstr ""

#: views/import.php:91
#: views/import.php:108
msgid "Importing Content"
msgstr ""

#: views/import.php:92
#: views/import.php:109
msgid "Please sit tight while we import your content. Do not refresh the page or hit the back button."
msgstr ""

#: views/import.php:95
#: views/import.php:112
msgid "Importing animation"
msgstr ""

#: views/import.php:112
#: views/import.php:129
msgid "Theme Settings"
msgstr ""

#: views/import.php:113
#: views/import.php:130
msgid "Visit Site"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion one-click-demo-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin Name: One Click Demo Import
Plugin URI: https://wordpress.org/plugins/one-click-demo-import/
Description: Import your content, widgets and theme settings with one click. Theme authors! Enable simple demo import for your theme demo data.
Version: 3.0.0
Version: 3.0.1
Author: One Click Demo Import
Author URI: https://profiles.wordpress.org/ocdi/
License: GPL3
Expand Down
9 changes: 8 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**Requires at least:** 4.9
**Tested up to:** 5.7
**Requires PHP:** 5.6
**Stable tag:** 3.0.0
**Stable tag:** 3.0.1
**License:** GPLv3 or later

Import your demo content, widgets and theme settings with one click. Theme authors! Enable simple theme demo import for your users.
Expand Down Expand Up @@ -367,6 +367,13 @@ Please visit this [docs page](https://github.com/awesomemotive/one-click-demo-im

## Changelog ##

### 3.0.1 ###

*Release Date - 31 March 2021*

* Add more details about recommended plugins.
* Change recommended plugins to opt-in.

### 3.0.0 ###

*Release Date - 31 March 2021*
Expand Down
9 changes: 8 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: import, content, demo, data, widgets, settings, redux, theme options
Requires at least: 4.9
Tested up to: 5.7
Requires PHP: 5.6
Stable tag: 3.0.0
Stable tag: 3.0.1
License: GPLv3 or later

Import your demo content, widgets and theme settings with one click. Theme authors! Enable simple theme demo import for your users.
Expand Down Expand Up @@ -359,6 +359,13 @@ Please visit this [docs page](https://github.com/awesomemotive/one-click-demo-im

== Changelog ==

= 3.0.1 =

*Release Date - 31 March 2021*

* Add more details about recommended plugins.
* Change recommended plugins to opt-in.

= 3.0.0 =

*Release Date - 31 March 2021*
Expand Down
17 changes: 17 additions & 0 deletions views/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

$plugin_installer = new PluginInstaller();
$theme_plugins = $plugin_installer->get_theme_plugins();
$theme = wp_get_theme();
?>

<div class="ocdi ocdi--install-plugins">
Expand Down Expand Up @@ -43,6 +44,7 @@
</p>
</div>
<?php else : ?>
<div>
<?php foreach ( $theme_plugins as $plugin ) : ?>
<?php $is_plugin_active = $plugin_installer->is_plugin_active( $plugin['slug'] ); ?>
<label class="plugin-item plugin-item-<?php echo esc_attr( $plugin['slug'] ); ?><?php echo $is_plugin_active ? ' plugin-item--active' : ''; ?><?php echo ! empty( $plugin['required'] ) ? ' plugin-item--required' : ''; ?>" for="ocdi-<?php echo esc_attr( $plugin['slug'] ); ?>-plugin">
Expand Down Expand Up @@ -75,6 +77,21 @@
</span>
</label>
<?php endforeach; ?>
</div>
<div class="ocdi-content-notice ocdi-content-notice--warning">
<p>
<?php
printf(
esc_html__(
'The plugins with %1$s are recommended by One Click Demo Import plugin to help you grow your website. They are not required for the %2$s theme to work.',
'one-click-demo-import'
),
'<span class="ocdi-recommended-star"><img src="' . esc_url( OCDI_URL . 'assets/images/icons/star.svg' ) . '" alt="' . esc_attr__( 'Star icon', 'one-click-demo-import' ) . '"></span>',
$theme->name
);
?>
</p>
</div>
<?php endif; ?>
</div>
<div class="ocdi-install-plugins-content-footer">
Expand Down

0 comments on commit 9fcf697

Please sign in to comment.