/** * Get Constant value of Constant defines core version required * * @param array $provider * @param string $addon_file * * @return string */ static function core_version_requied_value($provider, $addon_file) { // include defines.php from provider plugin folder, where defines core version required by addon if (file_exists($provider['path'] . 'defines.php')) { include_once $provider['path'] . 'defines.php'; } // get constant name defines core version required $constant = WR_Pb_Addon::core_version_constant($addon_file); // get value of core version required return defined($constant) ? constant($constant) : NULL; }