Skip to content

Commit

Permalink
Improve new user on-boarding
Browse files Browse the repository at this point in the history
  • Loading branch information
jawngee committed Apr 25, 2017
1 parent 303744f commit 41972f4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion classes/ilab-media-tool-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public function uninstall()
*/
public function enabled()
{
$enabled=get_option("ilab-media-tool-enabled-$this->toolName",($this->env_variable) ? env($this->env_variable) : true);
$env = ($this->env_variable) ? getenv($this->env_variable) : false;
$enabled=get_option("ilab-media-tool-enabled-$this->toolName", $env);

if ($enabled && isset($this->toolInfo['dependencies']))
{
Expand Down
2 changes: 1 addition & 1 deletion classes/ilab-media-tools-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct()

add_action('admin_menu', function(){
add_menu_page('Settings', 'Media Cloud', 'manage_options', 'media-tools-top', [$this,'renderSettings'],'dashicons-cloud');
add_submenu_page( 'media-tools-top', 'ILab Tools', 'Tools', 'manage_options', 'media-tools-top', [$this,'renderSettings']);
add_submenu_page( 'media-tools-top', 'Media CLoud Tools', 'Enable/Disable Tools', 'manage_options', 'media-tools-top', [$this,'renderSettings']);

add_settings_section('ilab-media-tools','Enabled Tools',[$this,'renderSettingsSection'],'media-tools-top');

Expand Down
6 changes: 6 additions & 0 deletions classes/tools/s3/ilab-media-s3-tool.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ public function s3enabled() {
return false;
}

$penabled = parent::enabled();
if (!$penabled) {
$this->displayAdminNotice('error',"To start using S3, you will need to <a href='admin.php?page=media-tools-top'>enable it</a>.");
return false;
}

if ($this->settingsError)
return false;

Expand Down
2 changes: 1 addition & 1 deletion ilab-media-tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://interfacelab.com/media-tools
Description: Automatically upload media to Amazon S3 and integrate with Imgix, a real-time image processing CDN. Boosts site performance and simplifies workflows.
Author: interfacelab
Version: 1.4.2
Version: 1.4.3
Author URI: http://interfacelab.io
*/

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Tested up to: 4.7.4
License: GPLv3 or later
Donate link: http://www2.jdrf.org/site/TR?fr_id=6912&pg=personal&px=11429802
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Stable tag: 1.4.2
Stable tag: 1.4.3

Automatically upload media to Amazon S3 and integrate with Imgix, a real-time image processing CDN. Boosts site
performance and simplifies workflows.
Expand Down Expand Up @@ -99,6 +99,9 @@ No, I'm just one very enthusiastic customer.

== Changelog ==

= 1.4.3 =
* Improve new user on-boarding

= 1.4.2 =
* Changed plugin name
* Ability to import non-standard image types such as TIFF, Adobe Photoshop, and Adobe Illustrator (requires Imgix)
Expand Down

0 comments on commit 41972f4

Please sign in to comment.