PluginProbe ʕ •ᴥ•ʔ
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF / 2.0.6
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF v2.0.6
2.0.6 2.0.5 trunk 1.3.7 1.4.0 1.4.1 1.4.2 1.4.6 1.5.0 1.5.3 1.5.6 1.5.8 1.6.5 1.6.6 1.6.9 1.7.0 1.7.4 1.8.1 1.8.2 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4
robin-image-optimizer / migrations / 010009.php
robin-image-optimizer / migrations Last commit date
010009.php 7 months ago 010300.php 7 months ago 010306.php 7 months ago 010309.php 7 months ago 010402.php 7 months ago 010501.php 3 months ago 010802.php 7 months ago 010803.php 3 months ago index.php 3 years ago
010009.php
48 lines
1 <?php #comp-page builds: premium
2
3 // Exit if accessed directly
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 /**
9 * Updates for altering the table used to store statistics data.
10 * Adds new columns and renames existing ones in order to add support for the new social buttons.
11 */
12 class WIOUpdate010009 extends Wbcr_Factory600_Update {
13
14 public function install() {
15
16 $db_version = RIO_Process_Queue::get_db_version();
17 $plugin_version_in_db = $this->get_plugin_version_in_db();
18 $current_plugin_version = $this->plugin->getPluginVersion();
19
20 $init_log_message = "Start plugin migration < %s.\r\n";
21 $init_log_message .= "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t-DB Version: {$db_version}\r\n";
22 $init_log_message .= "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t-Plugin Version in DB: {$plugin_version_in_db}\r\n";
23 $init_log_message .= "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t-Current Plugin Version: {$current_plugin_version}";
24
25 WRIO_Plugin::app()->logger->info( sprintf( $init_log_message, '1.1.5' ) );
26
27 WRIO_Plugin::app()->updateOption( 'image_optimization_server', 'server_2' );
28
29 WBCR\Factory_Templates_759\Helpers::flushPageCache();
30
31 WRIO_Plugin::app()->logger->info( 'Plugin migration was successfull!' );
32 }
33
34 /**
35 * Get previous plugin version
36 *
37 * @since 1.3.8
38 * @return int
39 */
40 public function get_plugin_version_in_db() {
41 if ( WRIO_Plugin::app()->isNetworkActive() ) {
42 return get_site_option( WRIO_Plugin::app()->getOptionName( 'plugin_version' ), 0 );
43 }
44
45 return get_option( WRIO_Plugin::app()->getOptionName( 'plugin_version' ), 0 );
46 }
47
48 }