Support » Plugins » add_submenu_page calls all functions wierdness

  • Resolved ianhaycox


    I’ve created submenus sucessfully but selecting any sub menu option calls ALL the submenu functions not just the one defined for the submenu. E.g.

    class myadmin extends myplugin {
      function addmenus() {
      function top() {echo 'top';}
      function sub1() {echo 'sub1';}
      function sub2() {echo 'sub2';}

    clicking on any menu option echos top sub1 sub2

    All the functions are called. This does not seem right. I expected
    either top OR sub1 OR sub2 to be echoed not all of them.

    Anyone have any ideas ? I’ve been searching and trying various combinations for hours and getting very frustrated.


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘add_submenu_page calls all functions wierdness’ is closed to new replies.