Page 1 of 1

Help: Adding a new link in the user account page

Posted: 09 Mar 2018, 11:09
by rkarmann
Hi all,

I'd like to know how can we add a new item in the user account page ?

I know that we must trigger the EVENT_MENU_ACCOUNT, but I don't know the exact syntax for the output function. This should be an array...

Code: Select all

function hooks() {
	return array(
		"EVENT_MENU_ACCOUNT" => "print_menu",
			);
}

function print_menu() {
# return array(????);
}
Thanks to those who can help me ! :D

Re: Help: Adding a new link in the user account page

Posted: 09 Mar 2018, 19:15
by atrol

Re: Help: Adding a new link in the user account page

Posted: 11 Mar 2018, 16:35
by rkarmann
Thanks, it helps a lot :)

Code: Select all

function print_menu() {
	
	$t_returns = array();
	
	$page = plugin_page( 'config_user' );
	$label = plugin_lang_get( 'my_theme' );
	
	$t_returns[] = "<a href=\"{$page}\">{$label}</a>";
	
	return $t_returns;
}

Re: Help: Adding a new link in the user account page

Posted: 18 Oct 2019, 14:16
by Onetaluko
This helped me today, thank you.