I have the following code in the functions.php file in my theme
function my_func(){
echo "foo";
}
add_action('admin_menu','my_func');
I assume this function "my_func" will be called once in the admin_menu action; however I have found that the function is being called many times -it will print the word "foo" in the top of every widget of the dashboard-!! for me this is a strange behavior!,how can I make the function runs for one time? I want it to run when creating the admin menu?
Best Regards
Thanks