BSF_Rollback_Version::sort_product_versions( array $version_arr, string $current_version )
This will filter the versions and return the versions less than current installed version.
Description
Parameters
- $version_arr
-
(array) (Required) array of versions.
- $current_version
-
(string) (Required) Current install version.
Return
(array)
Source
File: admin/bsf-core/classes/class-bsf-rollback-version.php
public static function sort_product_versions( $version_arr, $current_version ) { $rollback_versions = array(); foreach ( $version_arr as $version ) { if ( version_compare( $version, $current_version, '>=' ) ) { continue; } $rollback_versions[] = $version; } return $rollback_versions; }
Expand full source code Collapse full source code View on Trac