Registering a page through admin.php w/o making it appear in admin menu? (3 posts)

  1. Nova912
    Posted 6 years ago #

    Hello everyone,

    I've been developing WP themes for a while not but i just recently started to dive into plugin development and I have a question I can't seem to find in any of the documentation or searching on google (because the terms are too broad).

    I've found out how to make a top level menu and add subpages to it. But I can't figure out how to register a function to: admin.php?page=MyPlugin_action and not have that "action" page (whic handles the submission of various medium size form pages) how up in the admin menu.

    Can anyone point me in the right direction?

    Thanks in advance.

  2. tomontoast
    Posted 6 years ago #

    The simple answer is you can't without editing the sourcecode. You probably want to study this file: http://phpxref.com/xref/wordpress/wp-admin/admin.php.source.html. page=something.php must point to a valid file however you could use page=something.php&form=1 for example. You can also use page=something.php&action=something and create action hook admin_action_something

  3. Nova912
    Posted 6 years ago #

    Yeah, I figured I'd have to make a dispatcher action and have it control everything through extra $_GET vars -- just though there might of been an easier way.

    Thanks for the reply.

Topic Closed

This topic has been closed to new replies.

About this Topic