This code adds a new page to an existing WordPress menu. The page will have the title “page_title”, the menu label “menu_title” and the slug “menu_slug”. It will be accessible to users with the capability “capability” and when opened it will run the function “function_to_call” as part of the parent menu “parent_slug”.
Was this code snippet helpful?
YesNo