How do you reference a method from a class for add_options_page callback?

0
93
Asked By Keven Krok On

I am trying to add an options page to my plugin and I am using a hook that calls a method of a class. How do I also make this callback reference the method inside this class. Here is the code that I have for it so far.

class WordPress_Admin_Config_Class
{
	public function load_options_page()
	{
		add_options_page( "My Plugin", "My Plugin", "activate_plugins", "my-plugin", "load_options_page_callback");
	}

	public function load_options_page_callback()
	{
		echo "Hello World";
	}
}

0 Answers

There is no answer to this question yet. If you know the answer or can offer some help, please use the form below.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.