[wp-hackers] 1.5.1: Important Bugs
false.hopes at gmail.com
Thu Mar 31 19:41:19 GMT 2005
Alright, so the hook should be added, but the problem is, I can never
pass the conditional on if a function is defined, instead its
including the plugin file again, despite me specifying the function
parameter, and thus, I go through the nonsense of redeclared
functions. Is this the intended result and are all plugin authors
expected to wrap every bit of their plugin code inside an
On Thu, 31 Mar 2005 14:44:03 -0500, Owen Winkler
<ringmaster at midnightcircus.com> wrote:
> Robert Deaton wrote:
> > This would suggest that if you do supply the function, then that
> > function would be called and the plugin page would not be included
> > again. This, however, is not the case, because the plugin file is
> > loaded again, and instead of the function being called a hook is added
> > with the function name you supply. Unless I'm a complete moron, this
> > is still an issue, and that mosquito patch isn't completely related.
> A hook *should* be added with the function name. That's how the plugin
> page is inserted into the admin panel.
> When you register your function using add_options_page() or
> add_submenu_page(), it creates a plugin hook for your function based on
> the page querystring that it will use. When the matching page is
> specified in the query string to an admin page, the plugin hook for your
> function is called. It's supposed to work this way. That's what
> happens in admin.php lines 43-50.
> Did you try running the sample code at the bottom of the codex page? It
> works fine for me, inserting all of the admin pages that were specified.
More information about the wp-hackers