Skip to content

Instantly share code, notes, and snippets.

@Ungsik-Yun
Forked from ultimatemember/gist:8cdaf61e7bd9de35512c
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ungsik-Yun/86b005e9800acb16033b to your computer and use it in GitHub Desktop.
Save Ungsik-Yun/86b005e9800acb16033b to your computer and use it in GitHub Desktop.
wordpress plugin ultimate member expand
/* First we need to extend main profile tabs */
add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 );
function add_custom_profile_tab( $tabs ) {
$tabs['mycustomtab'] = array(
'name' => 'My custom tab',
'icon' => 'um-faicon-comments',
);
return $tabs;
}
/* Then we just have to add content to that tab using this action */
add_action('um_profile_content_mycustomtab_default', 'um_profile_content_mycustomtab_default');
function um_profile_content_mycustomtab_default( $args ) {
echo 'Hello world!';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment