Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options Page #15

Open
pretzlaw opened this issue Jun 14, 2019 · 0 comments
Open

Options Page #15

pretzlaw opened this issue Jun 14, 2019 · 0 comments

Comments

@pretzlaw
Copy link
Contributor

WP Example on

add_action( 'admin_menu', 'my_plugin_menu' );

function my_plugin_menu() {
	add_options_page( 
		'My Options',
		'My Plugin',
		'manage_options',
		'my-plugin.php',
		'my_plugin_page'
	);
}

Short in wp-di:

[
  'menu_slug' => SomeClass::class,
]

// SomeClass::__toString => page_title & menu_title
// SomeClass { public $capability } => caps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant