• add_options_page(‘My Plugin’, ‘Plugin’, 10, basename(__FILE__), array(‘Class’, ‘method’) );

    – add_options_page is not instantiating the class (the code above), it callings it as a static method… now my problem is how can I make the method call to be an instance of a Class and not as static method…

    I guess the solution for this is to pass a variable instantiated by Class as reference… is there another option or none?

    thanks….

Viewing 2 replies - 1 through 2 (of 2 total)
  • tunamaxx

    (@tunamaxx)

    I’m just swinging away in the dark her, but shouldn’t:

    add_options_page('My Plugin', 'Plugin', 10, basename(__FILE__), array('Class', 'method') );

    …actually be this:

    add_options_page('My Plugin', 'Plugin', 10, basename(__FILE__), array(&$this, 'method') );

    tunamaxx

    (@tunamaxx)

    Oh crap… for some reason I thought this said 1 hour old. Sorry!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add_options_page() passing class’ is closed to new replies.