ngs(); if ( ! isset( $this->oldOptions['modules']['aiosp_feature_manager_options'] ) ) { new Sitemap(); aioseo()->core->cache->delete( 'v3_migration_in_progress_settings' ); return; } $this->migrateFeatureManager(); if ( isset( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] ) ) { new SocialMeta(); } if ( isset( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap'] ) ) { new Sitemap(); } if ( isset( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_robots'] ) ) { new RobotsTxt(); } if ( ! empty( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_bad_robots'] ) ) { new BadRobots(); } if ( aioseo()->helpers->isWpmlActive() ) { new Wpml(); } aioseo()->core->cache->delete( 'v3_migration_in_progress_settings' ); } /** * Migrates the Feature Manager settings. * * @since 4.0.0 * * @return void */ protected function migrateFeatureManager() { if ( empty( $this->oldOptions['modules']['aiosp_feature_manager_options'] ) ) { return; } if ( empty( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] ) ) { aioseo()->options->social->facebook->general->enable = false; aioseo()->options->social->twitter->general->enable = false; } if ( empty( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap'] ) ) { aioseo()->options->sitemap->general->enable = false; aioseo()->options->sitemap->rss->enable = false; } if ( ! empty( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_robots'] ) ) { aioseo()->options->tools->robots->enable = true; } } /** * Checks whether the V3 migration is running. * * @since 4.1.8 * * @return bool Whether the V3 migration is running. */ public function isMigrationRunning() { return aioseo()->core->cache->get( 'v3_migration_in_progress_settings' ) || aioseo()->core->cache->get( 'v3_migration_in_progress_posts' ); } }