[wp-hackers] newbie plugin author question (sorry in advance)

Otto otto at ottodestruct.com
Fri Nov 7 14:54:54 GMT 2008


On Fri, Nov 7, 2008 at 8:37 AM, Rick Boatright <rboatright at gmail.com> wrote:
> add_management_page('MeetingList', 'MeetingList', 8, 'meetinglist,
> 'MeetingList_manage');
>
> == QUESTION 1 ==
>
> Why (in 2.7) does clicking on the resulting meetinglist function menu item
> under tools  take me to
>
> wp-admin/import.php?page=meetinglist.php<http://localhost/wordpress/wp-admin/import.php?page=meetinglist.php>
>
> I don't understand why this is going through IMPORT....   what did I do
> wrong?

Nothing is wrong. You used add_management_page. That goes through the
import.php file.

Just like options goes through options-general.php and theme goes
through themes.php and users goes through either users.php or
profile.php.

This is normal.


> ===  Question 2 ===
>
> So, my resulting page comes up, displays fine, everything on it works, but
> when I try to POST the data on the page back so that I can write it in the
> table,  if I post back to self (import.php?page=meetinglist.php)  my _GET()
> and _REQUEST() are all empty.
>
> (if that question isn't obvious, I have a form on that page to send data
> back to my custom table which begins:
>
> <form name="meetingform" id="meetingform" class="wrap" method="post"
> action="import.php?page=meetlist.php">

Well, $_GET will be empty because you have method=post. So check in
$_POST instead.

Also, make your action just "". Blank. That will let it post back to
itself, regardless of the URL.


-Otto


More information about the wp-hackers mailing list