Running Content Upgrade%1$s
A find & replace is running in the background to update URLs in your post content. %2$s', 'amazon-s3-and-cloudfront' ), $this->get_progress_text(), $this->get_generic_message() ); } /** * Switch to a new blog for processing. * * @return bool */ protected function upgrade_blog() { $this->upgrade_theme_mods(); return parent::upgrade_blog(); } /** * Upgrade theme mods. Ensures background and header images have local URLs saved to the database. */ protected function upgrade_theme_mods() { global $wpdb; $mods = $wpdb->get_results( "SELECT * FROM `{$wpdb->options}` WHERE option_name LIKE 'theme_mods_%'" ); foreach ( $mods as $mod ) { $value = AS3CF_Utils::maybe_unserialize( $mod->option_value ); if ( isset( $value['background_image'] ) ) { $value['background_image'] = $this->as3cf->filter_provider->filter_customizer_image( $value['background_image'] ); } if ( isset( $value['header_image'] ) ) { $value['header_image'] = $this->as3cf->filter_provider->filter_customizer_image( $value['header_image'] ); } if ( isset( $value['header_image_data'] ) ) { $value['header_image_data'] = $this->as3cf->filter_provider->filter_header_image_data( $value['header_image_data'] ); } $value = maybe_serialize( $value ); if ( $value !== $mod->option_value ) { $wpdb->query( "UPDATE `{$wpdb->options}` SET option_value = '{$value}' WHERE option_id = '{$mod->option_id}'" ); } } } }