Skip to content

Instantly share code, notes, and snippets.

@imath
Created January 8, 2022 04:42
Show Gist options
  • Save imath/c634d9bfb575f128d76a25aaa76fc2e5 to your computer and use it in GitHub Desktop.
Save imath/c634d9bfb575f128d76a25aaa76fc2e5 to your computer and use it in GitHub Desktop.
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