update( $wpdb->posts, array( 'post_type' => 'cfstudio_field_group' ), array( 'post_type' => 'cfs_field_group' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery // Field group meta keys. foreach ( array( 'fields', 'location', 'options', 'group_key', 'json_modified' ) as $key ) { $wpdb->update( $wpdb->postmeta, array( 'meta_key' => '_cfstudio_' . $key ), array( 'meta_key' => '_cfs_' . $key ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery } // Plugin options. foreach ( array( 'options_pages', 'google_maps_api_key', 'translate_options', 'version' ) as $key ) { $old = get_option( 'cfs_' . $key, null ); if ( null !== $old && false === get_option( 'cfstudio_' . $key, false ) ) { update_option( 'cfstudio_' . $key, $old ); } delete_option( 'cfs_' . $key ); } // Block namespace inside saved content. $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL "UPDATE {$wpdb->posts} SET post_content = REPLACE(REPLACE(post_content, '