WordPress.org

Ready to get started?Download WordPress

Forums

Please help plugin Error on top level menu dashboard (1 post)

  1. bukiyu
    Member
    Posted 2 years ago #

    Hello, I'm new to plugin development. I was reading Wrox Professional Professional Plugin Development. The problem is when I try to do a menu using this code.

    <?php
    add_action( ‘admin_menu’, ‘boj_menuexample_create_menu’ );
    function boj_menuexample_create_menu() {
    //create custom top-level menu
    add_menu_page( ‘My Plugin Settings Page’, ‘Menu Example Settings’,
    ‘manage_options’, __FILE__, ‘boj_menuexample_settings_page’);
    }
    ?>

    and when I try to access the menu I get the following Error msg;

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'boj_menuexample_settings_page' not found or invalid function name in C:\xampp\htdocs\wordpress\wp-includes\plugin.php on line 405

    Like I said I'm still new to this, so any help on what I should do would be appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic