Astra_Admin_Settings::get_astra_addon_min_supported_version( string $input_version )
Get minimum supported version for Astra addon.
Description
This function will be used to inform the user about incompatible version of Astra addon.
Parameters
- $input_version
-
(string) (Required) Input version of the addon.
Source
File: inc/core/class-astra-admin-settings.php
public static function get_astra_addon_min_supported_version( $input_version ) { if ( defined( 'ASTRA_EXT_VER' ) && version_compare( ASTRA_EXT_VER, ASTRA_EXT_MIN_VER ) < 0 ) { return ASTRA_EXT_MIN_VER; } $supported_version = ''; // First, check if the exact version is supported if ( isset( self::$astra_addon_supported_version_map[ $input_version ] ) ) { $supported_version = self::$astra_addon_supported_version_map[ $input_version ]; } else { foreach ( self::$astra_addon_supported_version_map as $index => $supported ) { /** @psalm-suppress TypeDoesNotContainType */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort if ( '' !== $supported_version || version_compare( $input_version, $index ) > 0 ) { /** @psalm-suppress TypeDoesNotContainType */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $supported_version = $supported; break; } } } return $supported_version; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
4.3.0 | Introduced. |