Skip to content

Instantly share code, notes, and snippets.

@wp-user-manager
Last active February 12, 2020 12:45
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 wp-user-manager/8f6a28199450cca0a3a036a41bb09634 to your computer and use it in GitHub Desktop.
Save wp-user-manager/8f6a28199450cca0a3a036a41bb09634 to your computer and use it in GitHub Desktop.
WP User Manager - Create a new tab on the Profile page and add custom content to it
<?php
// This file should live in
// wp-content/mu-plugins/wpum-templates/profiles/bookings.php
// Output your custom content
<?php
add_filter( 'wpum_get_registered_profile_tabs', 'my_wpum_get_registered_profile_tabs' );
function my_wpum_get_registered_profile_tabs( $tabs ) {
$tabs['bookings'] = [
'name' => esc_html( 'Bookings' ),
'priority' => 3,
];
return $tabs;
}
add_filter( 'wpum_template_paths', 'my_wpum_template_paths' );
function my_wpum_template_paths( $paths) {
$paths[] = dirname( __FILE__ ). '/wpum-templates';
return $paths;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment