Skip to content
Snippets Groups Projects
Commit abf5fb85 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

Merge branch 'feature/check-plugin-version' into 'master'

Plugin version should be checked only in needed

See merge request !25
parents ff0953e5 00809070
No related branches found
No related tags found
1 merge request!25Plugin version should be checked only in needed
Pipeline #10548 passed with stages
in 52 seconds
## [3.2.2] - 2019-12-17
### Fixed
- Plugin version should be checked only in needed
## [3.2.1] - 2019-11-15
### Fixed
- Fixed plugin version notice
......
......@@ -37,6 +37,8 @@
private $min_openssl_version = null;
/** @var array */
protected $plugin_require;
/** @var bool */
protected $should_check_plugin_versions = false;
/** @var array */
private $module_require;
/** @var array */
......@@ -119,6 +121,9 @@
* @return $this
*/
public function add_plugin_require( $plugin_name, $nice_plugin_name = null, $plugin_require_version = null ) {
if ( $plugin_require_version ) {
$this->should_check_plugin_versions = true;
}
$this->plugin_require[ $plugin_name ] = array(
self::PLUGIN_INFO_KEY_NAME => $plugin_name,
self::PLUGIN_INFO_KEY_NICE_NAME => $nice_plugin_name === null ? $plugin_name : $nice_plugin_name,
......@@ -214,7 +219,9 @@
$notices = $this->append_plugin_require_notices( $notices );
$notices = $this->append_module_require_notices( $notices );
$notices = $this->append_settings_require_notices( $notices );
$notices = $this->check_minimum_require_plugins_version_and_append_notices( $notices );
if ( $this->should_check_plugin_versions ) {
$notices = $this->check_minimum_require_plugins_version_and_append_notices( $notices );
}
return $notices;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment