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

xymalf on "ch3mlm-sub-menu"

$
0
0
<?php

/*
  Plugin Name: options menu
  Plugin URI:
  Description: chapter 3 multi-menu
  Author: adrian
  Version: 1.0
  Author URI: http://www.xymalf.com

warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'ch3mlm_my_complex_submenu' not found or invalid function name in C:\wamp\www\WPDev\wp-includes\plugin.php on line 470
 */

add_action ( 'admin_menu', 'ch3mlm_admin_menu' );

function ch3mlm_admin_menu() {

add_menu_page( 'My complex plugin configuration',
'My Complex Plugin', 'manage options', 'ch3mlm-main-menu', 'ch3mlm_my_complex_main', plugins_url( 'myplugin.png', _FILE_ ));

add_submenu_page( 'ch3mlm-main-menu',
'My Complex Menu Sub-Config Page', 'Sub-Config Page',
'manage_options', 'ch3mlm-sub-menu',
'ch3mlm_my_complex_submenu' );

}

when I click on the sub menu page I am getting an error as in header even though file ch3mlm-sub-menu.php exists in the plugin directory.


Viewing all articles
Browse latest Browse all 8245

Trending Articles