[wp-hackers] add_options_page reference method in class?
Edward de Leau
e at leau.net
Thu May 6 20:43:43 UTC 2010
I have made an abstract class "EdlWPPluginAdmin" which contains the regular
plugin admin code.
The method "AdminForm" in there is a basic admin form.
I'm trying to get add_options_page to work to call this method with:
"function AddOptionMenu() {
add_options_page($this->mStrPluginAdminPageTitle,
$this->mStrPluginAdminMenuTitle,
$this->mStrPluginAdminAccessLevel,
$this->mStrPluginAdminFile,
'$this->AdminForm');
}"
now... $this->AdminForm does not work.
It gives me: *Warning*: call_user_func_array() expects parameter 1 to be a
valid callback, function '$this->AdminForm' not found or invalid function
name in*C:\temp\xamp\htdocs\wordpress\wp-includes\plugin.php* on line *339*
*
*
I tried several combinations even self::, &$this->, calling it from the
class the extends the admin class and the php page that instatiantiates the
class but somehow I cant get this reference to this method to work.
I think it should be something like &$this-> but whatever i try it does not
work.
Does anyone have a clue?
--
Edward de Leau
http://populair.eu
More information about the wp-hackers
mailing list