Skip to content

Instantly share code, notes, and snippets.

@wp-user-manager
Created September 16, 2020 08:41
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/60d0703a817d974ae3880d03cb0c2df3 to your computer and use it in GitHub Desktop.
Save wp-user-manager/60d0703a817d974ae3880d03cb0c2df3 to your computer and use it in GitHub Desktop.
<?php
/**
* Register a new tab within the account page.
*
* @param array $tabs
*
* @return array
*/
function my_wpum_register_new_account_tabs( $tabs ) {
$tabs['custom-slug'] = [
'name' => esc_html__( 'Custom Title' ),
'priority' => 3, // Change this to define the position in the menu
];
return $tabs;
}
add_filter( 'wpum_get_account_page_tabs', 'my_wpum_register_new_account_tabs' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment