This file contains 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
/** | |
* Add new predefined field "Profile Photo" in UM Form Builder. | |
*/ | |
add_filter("um_predefined_fields_hook","um_predefined_fields_hook_profile_photo", 99999, 1 ); | |
function um_predefined_fields_hook_profile_photo( $arr ){ | |
$arr['profile_photo'] = array( | |
'title' => __('Profile Photo','ultimate-member'), | |
'metakey' => 'profile_photo', |
This file contains 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 | |
add_action("init","um_custom_init"); | |
function um_custom_init(){ | |
remove_action( 'um_profile_header', 'um_profile_header', 9 ); | |
add_action( 'um_profile_header', 'um_custom_profile_header', 9 ); | |
} | |
/** | |
* Profile header |
This file contains 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 wpuf_post_umgroup( $post_id, $form_id ) { | |
/* Build the post content by adding the referer URL to the comment and update the post */ | |
$lv_comment = $_POST['_my_comment'] . PHP_EOL . PHP_EOL . home_url() . wp_get_referer(); | |
$lv_post = array(); | |
$lv_post['ID'] = $post_id; | |
$lv_post['post_author'] = get_current_user_id(); | |
$lv_post['post_content'] = $lv_comment; |
This file contains 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 | |
add_filter("um_get_option_filter__um_profile_object_cache_stop","__return_true"); | |
?> |
This file contains 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 | |
/** | |
** WooCommerce keep default role on member role upgrade | |
**/ | |
add_action("um_after_member_role_upgrade","um_custom_add_free_role", 10, 2 ); | |
function um_custom_add_free_role( $role, $old_roles ){ | |
$user_id = get_current_user_id(); | |
$u = new WP_User( $user_id ); | |
$u->add_role( 'free' ); |
This file contains 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
General settings - | |
[ultimatemember_account tab="general"] | |
Change password - | |
[ultimatemember_account tab="password"] | |
Privacy - | |
[ultimatemember_account tab="privacy"] | |
Notifications - |
This file contains 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
[ultimatemember_account tab="delete"] |
This file contains 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
[ultimatemember_account tab="notifications"] |
This file contains 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
[ultimatemember_account tab="privacy"] |
This file contains 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
[ultimatemember_account tab="password"] |