Skip to content

Commit

Permalink
- **Bug Fix:** The conflict check for 'Subscribe to Comments Reloaded…
Browse files Browse the repository at this point in the history
…' was not working in the previous release; i.e., if you attempt to activate both Comment Mail and the 'Subscribe to Comments Reloaded' plugin at the same, this should result in a Dashboard warning. Fixed in this release. See [Issue #315](wpsharks/comment-mail#315).
  • Loading branch information
jaswsinc committed Dec 2, 2016
1 parent 12ef9b9 commit 20cf100
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,7 @@
## [coming soon]

- **Bug Fix:** The conflict check for 'Subscribe to Comments Reloaded' was not working in the previous release; i.e., if you attempt to activate both Comment Mail and the 'Subscribe to Comments Reloaded' plugin at the same, this should result in a Dashboard warning. Fixed in this release. See [Issue #315](https://github.com/websharks/comment-mail/issues/315).

- **Bug Fix:** Prevent browser autocomplete in Comment Mail options. See [Issue #319](https://github.com/websharks/comment-mail/issues/319).

- **Bug Fix:** Conflict checks between lite and pro corrected. This was not working properly in the previous release; i.e., installing Comment Mail Pro when Comment Mail Lite is already running should result in Comment Mail Lite being deactivated automatically. See [Issue #270](https://github.com/websharks/comment-mail/issues/270).
Expand Down
13 changes: 8 additions & 5 deletions src/includes/classes/Conflicts.php
Expand Up @@ -34,10 +34,13 @@ protected static function doCheck()
$lite_slug = str_replace('_', '-', GLOBAL_NS);
$pro_slug = $lite_slug.'-pro'; // Pro suffix.

$conflicting_plugin_slugs = [IS_PRO ? $lite_slug : $pro_slug];
$active_plugins = (array) get_option('active_plugins', array());
$active_sitewide_plugins = is_multisite() ? array_keys((array) get_site_option('active_sitewide_plugins', array())) : array();
$active_plugins = array_unique(array_merge($active_plugins, $active_sitewide_plugins));
$conflicting_plugin_slugs = [
IS_PRO ? $lite_slug : $pro_slug,
'subscribe-to-comments-reloaded',
];
$active_plugins = (array) get_option('active_plugins', array());
$active_sitewide_plugins = is_multisite() ? array_keys((array) get_site_option('active_sitewide_plugins', array())) : array();
$active_plugins = array_unique(array_merge($active_plugins, $active_sitewide_plugins));

foreach ($active_plugins as $_active_plugin_basename) {
if (!($_active_plugin_slug = strstr($_active_plugin_basename, '/', true))) {
Expand Down Expand Up @@ -97,7 +100,7 @@ protected static function maybeEnqueueNotice()
}
echo '<div class="error">'.// Error notice.
' <p>'.// Running one or more conflicting plugins at the same time.
' '.sprintf(__('<strong>%1$s</strong> is NOT running. A conflicting plugin, <strong>%2$s</strong>, is currently active. Please deactivate the %2$s plugin to clear this message.', SLUG_TD), esc_html($this_plugin_name), esc_html($conflicting_plugin_name)).
' '.sprintf(__('<strong>%1$s</strong> is not running. A conflicting plugin, <strong>%2$s</strong>, is currently active at the same time. Please deactivate the <strong>%2$s</strong> plugin to clear this message.', SLUG_TD), esc_html($this_plugin_name), esc_html($conflicting_plugin_name)).
' </p>'.
'</div>';
});
Expand Down

0 comments on commit 20cf100

Please sign in to comment.