'0.2.08' ); } // If actually a fresh install, then nothing more is necessary. if ( ! $options ) { return; } // Check if we have just upgraded from a lower version. $previous_version = $options['version']; $current_version = adaptive_images_plugin_get_version(); $plugin_upgraded = strcmp( $previous_version, $current_version ) < 0; if ( ! $plugin_upgraded ) { return; } // Stuff necessary for upgrading to plugin version 0.3.0 from previous version 0.2.08. if ( $previous_version == '0.2.08' ) { adaptive_images_upgrade_plugin_upgraded_to_v030(); add_action( 'admin_notices', 'adaptive_images_upgrade_plugin_upgraded_to_v030_message' ); } else { // We probably do not need this message but let's keep just in case. // add_action( 'admin_notices', 'adaptive_images_upgrade_plugin_upgraded_message' ); } } /** * Adds the admin notice message that informs the user when the pluggin has been upgraded to version 0.3.0, which * has a major rewrite and the user settings needed to be manually updated. It is done via an admin notice and * not via the settings errors, because in some pages the settings errors are called by the system itself and this * results in being called multiple times. * * @author Nevma (info@nevma.gr) * * @return void Nothing really! */ function adaptive_images_upgrade_plugin_upgraded_to_v030_message () { $current_version = adaptive_images_plugin_get_version(); echo '
' . 'Adaptive Images — Upgraded' . '
' . '' . 'The Adaptive Images plugin has been recently updated to version ' . $current_version . '.' . '
' . '' . 'You should probably save your settings once again in Adaptive Images Settings, because version 0.3.0 was a major rewrite of the code.' . '
' . '' . 'We are very sorry for the inconvenience and we promise to keep a steady path from now on.'. '
' . '' . 'Adaptive Images — Upgraded' . '
' . '' . 'The Adaptive Images plugin has been succesfully updated to version ' . $current_version . '.' . '
' . '