| @@ -13,10 +13,8 @@ | ||
| 13 | 13 | * @deprecated 3.17.0 |
| 14 | 14 | */ |
| 15 | 15 | const INSTALLS_HISTORY_META = 'elementor_install_history'; |
| 16 | 16 | |
| 17 | - const VERSION_OPTION_NAME = 'elementor_version'; | |
| 18 | - | |
| 19 | 17 | public static function get_install_history_meta() { |
| 20 | 18 | return 'elementor_install_history'; |
| 21 | 19 | } |
| 22 | 20 | |
| @@ -57,9 +55,9 @@ | ||
| 57 | 55 | return ELEMENTOR_VERSION; |
| 58 | 56 | } |
| 59 | 57 | |
| 60 | 58 | public function get_version_option_name() { |
| 61 | - return self::VERSION_OPTION_NAME; | |
| 59 | + return 'elementor_version'; | |
| 62 | 60 | } |
| 63 | 61 | |
| 64 | 62 | public function get_upgrades_class() { |
| 65 | 63 | return 'Elementor\Core\Upgrade\Upgrades'; |
| @@ -103,28 +101,6 @@ | ||
| 103 | 101 | public static function is_new_installation(): bool { |
| 104 | 102 | $installs_history = self::get_installs_history(); |
| 105 | 103 | |
| 106 | 104 | return empty( $installs_history ) || static::install_compare( ELEMENTOR_VERSION, '>=' ); |
| 107 | - } | |
| 108 | - | |
| 109 | - public static function had_install_prior_to( string $version ): bool { | |
| 110 | - if ( ! $version ) { | |
| 111 | - return false; | |
| 112 | - } | |
| 113 | - | |
| 114 | - $installs_history = self::get_installs_history(); | |
| 115 | - | |
| 116 | - if ( empty( $installs_history ) ) { | |
| 117 | - return false; | |
| 118 | - } | |
| 119 | - | |
| 120 | - uksort( $installs_history, 'version_compare' ); | |
| 121 | - | |
| 122 | - $first_version = array_key_first( $installs_history ); | |
| 123 | - | |
| 124 | - if ( ! $first_version ) { | |
| 125 | - return false; | |
| 126 | - } | |
| 127 | - | |
| 128 | - return version_compare( $first_version, $version, '<' ); | |
| 129 | 105 | } |
| 130 | 106 | } |