I’am trying to use add_menu_page
to create a custom “custom_post” page. (Is this a mistake already or not ? :-/)
Here’s the code that won’t work :
add_menu_page( 'projets' , 'projets' , 'edit_posts', 'ajouter_projet' , array( $this, 'afficher_admin_page' ) , $img_url, 5);
But when I use this
add_menu_page( 'projets' , 'projets' , 'edit_posts', 'ajouter_projet' , afficher_admin_page' , $img_url, 5);
with the function afficher_admin_page
out of my class, it works.
What am I doing wrong ?
Thank you
Please use the link
this will definitely helps you.