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 a custom tab to show user pages */ | |
add_filter('um_profile_tabs', 'pages_tab', 1000 ); | |
function pages_tab( $tabs ) { | |
$tabs['pages'] = array( | |
'name' => 'Pages', | |
'icon' => 'um-faicon-pencil', | |
'custom' => true | |
); | |
return $tabs; | |
} |
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
/* | |
In this code sample, you can learn how to apply custom | |
validations on any fields you want. | |
This can be done using these steps: | |
1. Edit the field in backend (field modal) | |
2. Where it asks for field validation choose "Custom" | |
3. Enter a unique validation action name e.g. my_8numbers |
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
/* | |
This code sample shows you how to use the API to create | |
and add custom notifications (for real-time notifications) | |
plugin. | |
STEP 1: You need to extend the filter: um_notifications_core_log_types with your | |
new notification type as follows for example | |
*/ |
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 tab called "mytab" */ | |
add_filter('um_account_page_default_tabs_hook', 'my_custom_tab_in_um', 100 ); | |
function my_custom_tab_in_um( $tabs ) { | |
$tabs[800]['mytab']['icon'] = 'um-faicon-pencil'; | |
$tabs[800]['mytab']['title'] = 'My Custom Tab'; | |
$tabs[800]['mytab']['custom'] = true; | |
return $tabs; | |
} | |