UPME Filters for Developers

Documentation for using UPME Filters for customizing existing profile content, features and adding new contents, features.

Documentation for UPME Filters

General Filters
Filter

– upme_init_options

Description

– Customize the default UPME settings on loading. Default options are passed as an array.

Parameters

– Default upme options as an array

Usage
function upme_init_options($defaults){   
    $defaults['label_for_registration_user_role'] = 'Custom Label';
    return $defaults;
}
add_filter('upme_init_options','upme_init_options');
Filter

– upme_replace_avatar

Description

– Customize the default UPME settings on loading. Default options are passed as an array.

Parameters

– Avatar image, User ID

Usage
function upme_replace_avatar($avatar,$user_id){   
	$avatar = '<img class="avatar avatar-64 photo my-avatar" alt="" src="https://0.gravatar.com/avatar/c6efe1b8f6c2f0654a25980de950?s=64&d=&r=G" width="64" height="64" />';
	return $avatar;
}
add_filter('upme_replace_avatar','upme_replace_avatar',10,2);
Filter

– upme_custom_js_strings

Description

– Customize strings used inside Javascipt files for profiles.

Parameters

– Array of strings used as Javascript Messages

Usage
function upme_custom_js_strings($custom_js_strings){
	$custom_js_strings['EditProfile'] = 'Update Profile';
	return $custom_js_strings;
}
add_filter('upme_custom_js_strings','upme_custom_js_strings');
Filter

– upme_profile_modal_shortcode

Description

– Customize the shortcode used in modal for specific users.

Parameters

– Shortcode assigned in admin section, User ID

Usage
function upme_profile_modal_shortcode($profile_shortcode,$user_id){
	if($user_id == 'SPECIFIC ID'){
		$profile_shortcode = '[upme show_stats=yes]';
	}
	return $profile_shortcode;
}
add_filter('upme_profile_modal_shortcode','upme_profile_modal_shortcode',10,2);
Filter

– upme_datepicker_settings

Description

– Customize the default settings used for datepicker field.

Parameters

– Datepicker settings array

Usage
function upme_datepicker_settings($date_picker_array){
	$date_picker_array['yearRange'] = '2000:2020';
	$date_picker_array['prevText'] = 'Past';
	$date_picker_array['nextText'] = 'Future';
	return $date_picker_array;
}
add_filter('upme_datepicker_settings', 'upme_datepicker_settings' );
Filter

– upme_reset_pass_subject

Description

– Customize the subject of reset password email.

Parameters

– Default subject

Usage
function upme_reset_pass_subject($title){
        $title = "Custom Reset Password";
	return $title ;
}
add_filter('upme_reset_pass_subject', 'upme_reset_pass_subject' );
Filter

– upme_reset_pass_content

Description

– Customize the contents of reset password email.

Parameters

– Default message, username, email, reset page URL

Usage
function upme_reset_pass_content($message,$user_login,$user_email,$reset_page_url){
        $message = "Custom Reset Pass Content $user_email  $user_login $reset_page_url"
	return $message;
}
add_filter('upme_reset_pass_content','upme_reset_pass_content',10,4);
Filter

– upme_new_user_act_subject

Description

– Customize the subject of email sent to users when Email Confirmation is enabled.

Parameters

– Default subject

Usage
function upme_new_user_act_subject($subject){
	$subject = "Custom User Activation";
	return $subject;
}
add_filter('upme_new_user_act_subject','upme_new_user_act_subject');
Filter

– upme_new_user_act_content

Description

– Customize the content of email sent to users when Email Confirmation is enabled.

Parameters

– Default message, username, email, activation link

Usage
function upme_new_user_act_content($message,$user_login,$user_email,$activation_link){
	$message = "Custom User Activation Content $user_email  $user_login $activation_link"
	return $message;
}
add_filter('upme_new_user_act_content','upme_new_user_act_content',10,4);
Filter

– upme_new_user_act_admin_subject

Description

– Customize the subject of email sent to admin when Email Confirmation is enabled.

Parameters

– Default subject

Usage
function upme_new_user_act_admin_subject($subject){
	$subject = "Custom User Activation - Admin";
	return $subject;
}
add_filter('upme_new_user_act_admin_subject','upme_new_user_act_admin_subject');
Filter

– upme_new_user_act_admin_content

Description

– Customize the contents of email sent to admin when Email Confirmation is enabled.

Parameters

– Default message, username, email

Usage
function upme_new_user_act_admin_content($message,$user_login,$user_email){
	$message = "Custom User Activation Admin Content $user_email  $user_login";
	return $message;
}
add_filter('upme_new_user_act_admin_content','upme_new_user_act_admin_content',10,3);
Profile Filters
Filter

– upme_profile_before_head

Description

– Display dynamic content before the profile head section. Useful for displaying custom data or messages.

Parameters

– Empty content, ID of the user profile

Usage
function upme_profile_before_head($content,$user_id){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_profile_before_head','upme_profile_before_head',10,2);
Filter

– upme_compact_profile_before_head

Description

– Display dynamic content before the profile head section in compact view mode. Useful for displaying custom data or messages.

Parameters

– Empty content, ID of the user profile

Usage
function upme_compact_profile_before_head($content,$user_id){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_compact_profile_before_head','upme_compact_profile_before_head',10,2);
Filter

– upme_full_profile_before_head

Description

– Display dynamic content before the profile head section in full view mode. Useful for displaying custom data or messages.

Parameters

– Empty content, ID of the user profile

Usage
function upme_full_profile_before_head($content,$user_id){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_full_profile_before_head','upme_full_profile_before_head',10,2);
Filter

– upme_profile_after_head

Description

– Display dynamic content after the profile head section. Useful for displaying custom data or messages.

Parameters

– Empty content, ID of the user profile

Usage
function upme_profile_after_head($content,$user_id){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_profile_after_head','upme_profile_after_head',10,2);
Filter

– upme_compact_profile_after_head

Description

– Display dynamic content after the profile head section in compact view mode. Useful for displaying custom data or messages.

Parameters

– Empty content, ID of the user profile

Usage
function upme_compact_profile_after_head($content,$user_id){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_compact_profile_after_head','upme_compact_profile_after_head',10,2);
Filter

– upme_full_profile_after_head

Description

– Display dynamic content after the profile head section in full view mode. Useful for displaying custom data or messages.

Parameters

– Empty content, ID of the user profile

Usage
function upme_full_profile_after_head($content,$user_id){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_full_profile_after_head','upme_full_profile_after_head',10,2);
Filter

– upme_profile_after_fields

Description

– Display dynamic content after the profile fields section. Useful for displaying custom data or messages.

Parameters

– Empty content, ID of the user profile

Usage
function upme_profile_after_fields($content,$user_id){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_profile_after_fields','upme_profile_after_fields',10,2);
Filter

– upme_compact_profile_after_fields

Description

– Display dynamic content after the profile fields section in compact view mode. Useful for displaying custom data or messages.

Parameters

– Empty content, ID of the user profile

Usage
function upme_compact_profile_after_fields($content,$user_id){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_compact_profile_after_fields','upme_compact_profile_after_fields',10,2);
Filter

– upme_full_profile_after_fields

Description

– Display dynamic content after the profile fields section in full view mode. Useful for displaying custom data or messages.

Parameters

– Empty content, ID of the user profile

Usage
function upme_full_profile_after_fields($content,$user_id){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_full_profile_after_fields','upme_full_profile_after_fields',10,2);
Filter

– upme_profile_role_label

Description

– Customize the lable used to display the user roles of profile inside profile fields(Defaults to User Role).

Parameters

– Default label

Usage
function upme_profile_role_label($label){
	$label = "Memebrship Type";
	return $label;
}
add_filter('upme_profile_role_label','upme_profile_role_label');
Filter

– upme_profile_id_label

Description

– Customize the lable used to display the user ID of profile inside profile fields(Defaults to User ID).

Parameters

– Default label

Usage
function upme_profile_id_label($label){
	$label = "Employee No";
	return $label;
}
add_filter('upme_profile_id_label','upme_profile_id_label');
Filter

– upme_custom_profile_url

Description

– Link UPME profile title to a custom link overriding the default link.

Parameters

– Profile Link, Params array(User Id, view, modal, group, use_in_sidebar, context)

Usage
function upme_custom_profile_url($profile_link,$params){
	$custom_link = 'http://url_here/'. $params['id'];
	return $custom_link;
}
add_filter('upme_custom_profile_url','upme_custom_profile_url',10,2);
Filter

– upme_custom_profile_pic

Description

– Customize the default profile pic, styles or disable the profile pic.

Parameters

– Profile picture with link, Params array(User Id, view, modal, use_in_sidebar, context)

Usage
function upme_custom_profile_pic($profile_pic_display,$params){
	// Disable profile pic
	return '';
}
add_filter('upme_custom_profile_pic','upme_custom_profile_pic',10,2);
Filter

– upme_profile_edit_bar

Description

– Customize the buttons used in the Edit/View profile section inside the profile head.

Parameters

– HTML for exisitng buttons, User ID, Array of paremeters(logout_url,group,use_in_sidebar,type)

Usage
function upme_profile_edit_bar($edit_buttons , $id, $params){

	//$logout_url = 'Execute upme_logout shortcode here;

	$edit_buttons = '<a class="upme-button-alt upme-fire-editor" >Save Profile</a>';
	$edit_buttons .= '<a class="upme-button-alt upme-fire-editor" href="#edit">Update Profile</a>';
	$edit_buttons .= $logout_url;
	$edit_buttons = '<a class="upme-button-alt upme-fire-editor" >Custom Button</a>';
	
	return $edit_buttons;
}
add_filter( 'upme_profile_edit_bar','upme_profile_edit_bar',10,3);
Filter

– upme_stats_items

Description

– Customize the items in profile stats section.

Parameters

– Default stats section items, User ID

Usage
function upme_stats_items($upme_stats_items,$user_id){
	unset($upme_stats_items['posts']);
	$upme_stats_items['sites'] = '<div class="upme-stats-i upme-stats-comments"><i class="upme-icon-comments-alt"></i><span class="upme-comments-link">'.$user_id.' Sites</span></div>';                    
                           
	return $upme_stats_items;
}
add_filter('upme_stats_items','upme_stats_items',10,2);
Registration Filters
Filter

– upme_register_before_head

Description

– Display dynamic content before the head section of registration form. Useful for displaying custom data or messages.

Parameters

– Empty content

Usage
function upme_register_before_head($content){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_register_before_head','upme_register_before_head');
Filter

– upme_register_after_head

Description

– Display dynamic content after the head section of registration form. Useful for displaying custom data or messages.

Parameters

– Empty content

Usage
function upme_register_after_head($content){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_register_after_head','upme_register_after_head');
Filter

– upme_register_after_fields

Description

– Display dynamic content after the fields section of registration form. Useful for displaying custom data or messages.

Parameters

– Empty content

Usage
function upme_register_after_fields($content){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_register_after_fields','upme_register_after_fields');
Login Filters
Filter

– upme_login_before_head

Description

– Display dynamic content before the head section of login form. Useful for displaying custom data or messages.

Parameters

– Empty content

Usage
function upme_login_before_head($content){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_login_before_head','upme_login_before_head');
Filter

– upme_login_after_head

Description

– Display dynamic content after the head section of login form. Useful for displaying custom data or messages.

Parameters

– Empty content

Usage
function upme_login_after_head($content){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_login_after_head','upme_login_after_head');
Filter

– upme_login_after_fields

Description

– Display dynamic content after the fields section of login form. Useful for displaying custom data or messages.

Parameters

– Empty content

Usage
function upme_login_after_fields($content){   
    $content = "Custom HTML Block with Data";
    return $content;
}
add_filter('upme_login_after_fields','upme_login_after_fields');
Email Filters
Filter

– upme_new_user_act_admin_content

Description

– Customize the email sent to admin on new user registration, when email confirmation is enabled. Modified email content should be returned.

Parameters

– Email message, username, email address

Usage
function upme_new_user_act_admin_content($message,$user_login,$user_email){
	return "Custom User Activation Admin Content $user_email  $user_login";
}
add_filter('upme_new_user_act_admin_content','upme_new_user_act_admin_content',10,3);
Filter

– upme_new_user_act_admin_subject

Description

– Customize the email subject to admin on new user registration, when email confirmation is enabled. Modified email subject should be returned.

Parameters

– Email subject

Usage
function upme_new_user_act_admin_subject($subject){
	$subject = "Custom User Activation Admin Subject";
	return $subject;
}
add_filter('upme_new_user_act_admin_subject','upme_new_user_act_admin_subject');
Filter

– upme_new_user_act_content

Description

– Customize the email sent to user on new user registration, when email confirmation is enabled. Modified email content should be returned.

Parameters

– Email message, username, email address, activation link

Usage
function upme_new_user_act_content($message,$user_login,$user_email,$activation_link){
	$message = "Custom User Activation Message";
	return $message;
}
add_filter('upme_new_user_act_content','upme_new_user_act_content',10,4);
Filter

– upme_new_user_act_subject

Description

– Customize the email subject to user on new user registration, when email confirmation is enabled. Modified email subject should be returned.

Parameters

– Email subject

Usage
function upme_new_user_act_subject($subject){
	$subject = "Custom Subject for User Activation";
	return $subject;
}
add_filter('upme_new_user_act_subject','upme_new_user_act_subject');
Filter

– upme_reset_pass_content

Description

– Customize the email sent to user on password reset. Modified email content should be returned.

Parameters

– Email message, username, email address, reset page link

Usage
function upme_reset_pass_content($message,$user_login,$user_email,$reset_page_url){
	$message = "Custom Reset Pass Email Content";
	return $message;
}
add_filter('upme_reset_pass_content','upme_reset_pass_content',10,4);
Filter

– upme_reset_pass_subject

Description

– Customize the email subject to user on password reset. Modified subject should be returned.

Parameters

– Email subject

Usage
function upme_reset_pass_subject($subject){
	$subject = "Custom Reset Password Email Subject";
	return $subject;
}
add_filter('upme_reset_pass_subject','upme_reset_pass_subject');