@gwmbox
UM is using a lot of filter hooks where you can modify the output without hacking UM and there must be a hook available where you want to insert your ID.
https://docs.ultimatemember.com/article/1785-um-hooks-map
Thread Starter
GregW
(@gwmbox)
Thanks yes I did find that but the navbar (tabs) section does not have a link to more information.
- um_profile_navbar_classes
- um_profile_navbar
- um_profile_menu
@gwmbox
Your hooks are all in this template file
.../plugins/ultimate-member/templates/profile.php
https://docs.ultimatemember.com/article/1516-templates-map
Thread Starter
GregW
(@gwmbox)
Yes I see that and I have edited it already for other tasks, but where in that do I get it to add an ID tag in each tab?
@gwmbox
You can try to use this filter um_profile_menu_link_{$id}
in
../plugins/ultimate-member/includes/core/um-actions-profile.php
at line 1726
where you can get the value for $id
from
<div class="um-profile-nav-item um-profile-nav-<?php echo esc_attr( $id . ' ' . $profile_nav_class ); ?>">
/**
* UM hook
*
* @type filter
* @title um_profile_menu_link_{$id}
* @description Change profile menu link by tab $id
* @input_vars
* [{"var":"$nav_link","type":"string","desc":"Profile Tab Link"}]
* @change_log
* ["Since: 2.0"]
* @usage
* <?php add_filter( 'um_profile_menu_link_{$id}', 'function_name', 10, 1 ); ?>
* @example
* <?php
* add_filter( 'um_profile_menu_link_{$id}', 'my_profile_menu_link', 10, 1 );
* function my_profile_menu_link( $nav_link ) {
* // your code here
* return $nav_link;
* }
* ?>
*/
Hi @gwmbox
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. 🙂
Regards