add_menu_page() with variable function

You have to declare the closure before you call add_menu_page():

$func = function() {
            echo "Done !";
};

add_menu_page('My page','My page','manage_options','my_page', $func );

Note you need PHP 5.3 to do that.

techhipbettruvabetnorabahisbahis forumutaraftarium24edusedusedueduedueduedueduseduedu