Last active
March 6, 2024 08:37
-
-
Save cryptexvinci/59203e5b1862f8ec3714eccdb875770e to your computer and use it in GitHub Desktop.
Make all Ultimate Member User Profiles Private by Default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Ultimate member - Make all UM User Profile Private by Default. | |
* URL: https://wordpress.org/plugins/ultimate-member/ | |
*/ | |
add_filter( 'get_user_metadata', function( $profile_privacy, $object_id, $meta_key ) { | |
if( $meta_key === 'profile_privacy' ) { | |
$profile_privacy = 'Only me'; | |
} | |
return $profile_privacy; | |
}, 30, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment