WordPress.org

Ready to get started?Download WordPress

Forums

Renaming plugin function - still calls old function (2 posts)

  1. dyrk
    Member
    Posted 3 years ago #

    Hi

    I've built a custom plugin. I'm using the following to add a submenu.

    function menu_items() {
    	add_submenu_page('whatever','Whatever Admin', 'Whatever Admin', 'manage_options', 'whatever', 'whatever_admin');
    }

    The function whatever_admin used to be called something else. I renamed the function and now when I click the link in admin - it's still trying to find the old function though I can't find any reference to it anywhere.

    call_user_func_array() expects parameter 1 to be a valid callback, function 'old_function' not found or invalid function name

    How is this possible? and how can I resolve it?

    Thanks in advance

  2. dyrk
    Member
    Posted 3 years ago #

    Found reference to it. uncommented line which should have been commented.
    Ignore question.

    Though I must say...Wordpress's admin menus are very frustrating.

Topic Closed

This topic has been closed to new replies.

About this Topic