Skip to content

Instantly share code, notes, and snippets.

@imath
Created Jan 8, 2022
Embed
What would you like to do?
Code used to check the BuddyPress WP xProfile field type works as expected, see https://buddypress.org/support/topic/wordpress-specific-xprofile-meta-fields-not-saving/
<?php
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
function maelscuttle_twitter_xprofile( $methods = array() ) {
$methods['twitter'] = __( 'Twitter', 'maelscuttle-textdomain' );
return $methods;
}
add_filter( 'user_contactmethods', 'maelscuttle_twitter_xprofile' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment