options = get_option( 'seopress_pro_option_name' ); if ( empty( $this->options ) ) { return; } $this->migrateRobotsTxt(); $settings = [ 'seopress_robots_enable' => [ 'type' => 'boolean', 'newOption' => [ 'tools', 'robots', 'enable' ] ], ]; aioseo()->importExport->seoPress->helpers->mapOldToNew( $settings, $this->options ); } /** * Migrates the robots.txt. * * @since 4.1.4 * * @return void */ public function migrateRobotsTxt() { $lines = explode( "\n", $this->options['seopress_robots_file'] ); $allRules = aioseo()->robotsTxt->extractRules( $lines ); aioseo()->options->tools->robots->rules = aioseo()->robotsTxt->prepareRobotsTxt( $allRules ); } }