WP-4352 Moving code from gsb_social to here