Created
April 5, 2021 12:51
-
-
Save nikitasinelnikov/2cde4af0e95e8c609be3f11334a5d2ac to your computer and use it in GitHub Desktop.
Ultimate Member: Unlock the ability to restrict the User Profile page
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
| function um_custom_profile_restriction( $exclude, $post ) { | |
| if ( $exclude ) { | |
| if ( ! empty( $post->post_type ) && $post->post_type == 'page' ) { | |
| if ( um_is_core_post( $post, 'user' ) ) { | |
| $exclude = false; | |
| } | |
| } | |
| } | |
| return $exclude; | |
| } | |
| add_filter( 'um_exclude_posts_from_privacy', 'um_custom_profile_restriction', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment