Conditions | 8 |
Paths | 12 |
Total Lines | 25 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function is_version_update_required( $selected_version, $compare_version ) { |
||
22 | $use_dev_versions = defined( 'JETPACK_AUTOLOAD_DEV' ) && JETPACK_AUTOLOAD_DEV; |
||
23 | |||
24 | if ( is_null( $selected_version ) ) { |
||
25 | return true; |
||
26 | } |
||
27 | |||
28 | if ( $use_dev_versions && $this->is_package_version_dev( $selected_version ) ) { |
||
29 | return false; |
||
30 | } |
||
31 | |||
32 | if ( $this->is_package_version_dev( $compare_version ) ) { |
||
33 | if ( $use_dev_versions ) { |
||
34 | return true; |
||
35 | } else { |
||
36 | return false; |
||
37 | } |
||
38 | } |
||
39 | |||
40 | if ( version_compare( $selected_version, $compare_version, '<' ) ) { |
||
41 | return true; |
||
42 | } |
||
43 | |||
44 | return false; |
||
45 | } |
||
46 | |||
62 |