Last active
February 12, 2020 12:45
-
-
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
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
<?php | |
// This file should live in | |
// wp-content/mu-plugins/wpum-templates/profiles/bookings.php | |
// Output your custom content |
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
<?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