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

By 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

- Advertisment -
SEMrush