Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

xymalf on "Plug in menu causing fatal error"

$
0
0
add_action( 'admin_menu', 'ch3mlm_admin_menu' );

function ch3mlm_admin_menu() {
	// Create top-level menu item
	add_menu_page( 'My Complex Plugin Configuration Page',
		'My Complex Plugin', 'manage_options',
		'ch3mlm-main-menu', 'ch3mlm_my_complex_main',
		plugins_url( 'myplugin.png', __FILE__ ) );

	// Create a sub-menu under the top-level menu
	add_submenu_page( 'ch3mlm-main-menu',
		'My Complex Menu Sub-Config Page', 'Sub-Config Page',
		'manage_options', 'ch3mlm-sub-menu',
		'ch3mlm_my_complex_submenu' );

}`

[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

how do I define callback functions for the two pages in this menu.


Viewing all articles
Browse latest Browse all 8245

Trending Articles