| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | if ( ! defined( '_GUTENBERG_VERSION_MIGRATION' ) ) { |
| 9 | 9 | // It's necessary to update this version every time a new migration is needed. |
| 10 | - define( '_GUTENBERG_VERSION_MIGRATION', '22.8.0' ); | |
| 10 | + define( '_GUTENBERG_VERSION_MIGRATION', '9.8.0' ); | |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Migrate Gutenberg's database on upgrade. |
| @@ -24,12 +24,8 @@ | ||
| 24 | 24 | if ( version_compare( $gutenberg_installed_version, '9.8.0', '<' ) ) { |
| 25 | 25 | _gutenberg_migrate_remove_fse_drafts(); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - if ( version_compare( $gutenberg_installed_version, '22.8.0', '<' ) ) { | |
| 29 | - _gutenberg_migrate_enable_real_time_collaboration(); | |
| 30 | - } | |
| 31 | - | |
| 32 | 28 | update_option( 'gutenberg_version_migration', _GUTENBERG_VERSION_MIGRATION ); |
| 33 | 29 | } |
| 34 | 30 | } |
| 35 | 31 | |
| @@ -60,27 +56,8 @@ | ||
| 60 | 56 | |
| 61 | 57 | // Delete useless options. |
| 62 | 58 | delete_option( 'gutenberg_last_synchronize_theme_template_checks' ); |
| 63 | 59 | delete_option( 'gutenberg_last_synchronize_theme_template-part_checks' ); |
| 64 | -} | |
| 65 | - | |
| 66 | -/** | |
| 67 | - * Update RTC option name. | |
| 68 | - * | |
| 69 | - * @since 22.8.0 | |
| 70 | - */ | |
| 71 | -function _gutenberg_migrate_enable_real_time_collaboration() { | |
| 72 | - $value1 = get_option( 'enable_real_time_collaboration', '1' ); | |
| 73 | - $value2 = get_option( 'wp_enable_real_time_collaboration', '1' ); | |
| 74 | - | |
| 75 | - // RTC is enabled by default in the plugin, so only set the value if it was | |
| 76 | - // previously disabled. Otherwise rely on the default value. | |
| 77 | - if ( ! $value1 || ! $value2 ) { | |
| 78 | - update_option( 'wp_collaboration_enabled', '0' ); | |
| 79 | - } | |
| 80 | - | |
| 81 | - delete_option( 'enable_real_time_collaboration' ); | |
| 82 | - delete_option( 'wp_enable_real_time_collaboration' ); | |
| 83 | 60 | } |
| 84 | 61 | |
| 85 | 62 | // Deletion of the `_wp_file_based` term (in _gutenberg_migrate_remove_fse_drafts) must happen |
| 86 | 63 | // after its taxonomy (`wp_theme`) is registered. This happens in `gutenberg_register_wp_theme_taxonomy`, |