| @@ -12,9 +12,8 @@ | ||
| 12 | 12 | * @param string $current Current version. |
| 13 | 13 | * @param string $new New version. |
| 14 | 14 | */ |
| 15 | 15 | add_action( 'powerkit_plugin_upgrade', function ( $current, $new ) { |
| 16 | - /* Migration to 2.0.7 */ | |
| 17 | 16 | if ( version_compare( $current, '2.0.7', '<' ) ) { |
| 18 | 17 | require_once POWERKIT_PATH . 'modules/post-views/helpers/db-powerkit-post-views.php'; |
| 19 | 18 | |
| 20 | 19 | $post_views_db = new Powerkit_Post_Views_DB(); |
| @@ -29,9 +28,8 @@ | ||
| 29 | 28 | * @param string $current Current version. |
| 30 | 29 | * @param string $new New version. |
| 31 | 30 | */ |
| 32 | 31 | add_action( 'powerkit_plugin_upgrade', function ( $current, $new ) { |
| 33 | - /* Migration to 2.2.2 */ | |
| 34 | 32 | if ( version_compare( $current, '2.2.2', '<' ) ) { |
| 35 | 33 | $transients = array( |
| 36 | 34 | 'powerkit_connect_instagram_app_access_token', |
| 37 | 35 | 'powerkit_connect_instagram_app_type', |
| @@ -65,9 +63,8 @@ | ||
| 65 | 63 | * @param string $current Current version. |
| 66 | 64 | * @param string $new New version. |
| 67 | 65 | */ |
| 68 | 66 | add_action( 'powerkit_plugin_upgrade', function ( $current, $new ) { |
| 69 | - /* Migration to 2.3.0 */ | |
| 70 | 67 | if ( version_compare( $current, '2.3.0', '<' ) ) { |
| 71 | 68 | if ( 'before' === get_option( 'powerkit_toc_display', 'none' ) ) { |
| 72 | 69 | update_option( 'powerkit_toc_enable_automatically', true ); |
| 73 | 70 | } |
| @@ -73,6 +70,19 @@ | ||
| 73 | 70 | } |
| 74 | 71 | if ( 'after' === get_option( 'powerkit_toc_display', 'none' ) ) { |
| 75 | 72 | update_option( 'powerkit_toc_enable_automatically', true ); |
| 76 | 73 | } |
| 74 | + } | |
| 75 | +}, 10, 2 ); | |
| 76 | + | |
| 77 | + | |
| 78 | +/** | |
| 79 | + * Migration to 2.6.2 | |
| 80 | + * | |
| 81 | + * @param string $current Current version. | |
| 82 | + * @param string $new New version. | |
| 83 | + */ | |
| 84 | +add_action( 'powerkit_plugin_upgrade', function ( $current, $new ) { | |
| 85 | + if ( version_compare( $current, '2.6.2', '<' ) && get_option( 'powerkit_db_version' ) ) { | |
| 86 | + update_option( 'powerkit_enabled_headers_footers', 1 ); | |
| 77 | 87 | } |
| 78 | 88 | }, 10, 2 ); |