| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | |
| 4 | 4 | use Elementor\Core\Base\DB_Upgrades_Manager; |
| 5 | 5 | |
| 6 | 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 7 | - exit; // Exit if accessed directly. | |
| 7 | + exit; // Exit if accessed directly | |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | class Manager extends DB_Upgrades_Manager { |
| 11 | 11 | |
| @@ -17,13 +17,9 @@ | ||
| 17 | 17 | public static function get_install_history_meta() { |
| 18 | 18 | return 'elementor_install_history'; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - /** | |
| 22 | - * TODO: Remove in future releases | |
| 23 | - * | |
| 24 | - * @deprecated 3.1.0 | |
| 25 | - */ | |
| 21 | + // todo: remove in future releases | |
| 26 | 22 | public function should_upgrade() { |
| 27 | 23 | if ( ( 'elementor' === $this->get_plugin_name() ) && version_compare( get_option( $this->get_version_option_name() ), '2.4.2', '<' ) ) { |
| 28 | 24 | delete_option( 'elementor_log' ); |
| 29 | 25 | } |
| @@ -97,32 +93,10 @@ | ||
| 97 | 93 | |
| 98 | 94 | update_option( static::get_install_history_meta(), $installs_history ); |
| 99 | 95 | } |
| 100 | 96 | |
| 101 | - public static function is_new_installation(): bool { | |
| 97 | + public static function is_new_installation() : bool { | |
| 102 | 98 | $installs_history = self::get_installs_history(); |
| 103 | 99 | |
| 104 | 100 | return empty( $installs_history ) || static::install_compare( ELEMENTOR_VERSION, '>=' ); |
| 105 | - } | |
| 106 | - | |
| 107 | - public static function had_install_prior_to( string $version ): bool { | |
| 108 | - if ( ! $version ) { | |
| 109 | - return false; | |
| 110 | - } | |
| 111 | - | |
| 112 | - $installs_history = self::get_installs_history(); | |
| 113 | - | |
| 114 | - if ( empty( $installs_history ) ) { | |
| 115 | - return false; | |
| 116 | - } | |
| 117 | - | |
| 118 | - uksort( $installs_history, 'version_compare' ); | |
| 119 | - | |
| 120 | - $first_version = array_key_first( $installs_history ); | |
| 121 | - | |
| 122 | - if ( ! $first_version ) { | |
| 123 | - return false; | |
| 124 | - } | |
| 125 | - | |
| 126 | - return version_compare( $first_version, $version, '<' ); | |
| 127 | 101 | } |
| 128 | 102 | } |