dtmooir3395 2016-12-29 03:28 采纳率: 0%
浏览 54
已采纳

Wordpress问题创建菜单选项

I have created a Custom Setting API for web developing for a client. I was just creating first menu option on the WP dashboard.

But when I send file I get this error message saying --> :call_user_func_array() expects parameter 1 to be a valid callback, function ' allb_admin_page' not found or invalid function name in

function allb_admin_page() {

  add_menu_page( ' ALLB Theme Options', 'ALLB', 'manage_options', 'a-legacy-left-behind', 'allb_theme_create_page', 110);

}

add_action( 'admin_menu', ' allb_admin_page' );

function allb_theme_create_page() {
  // genration of our admin page
}

I was thinking this may be new update or this function that i am using might be removed from WordPress or i am doing something wrong please explain.

Can anyone help with this quick issue having on word press, please?

Thank you, Happy New Years!!!

  • 写回答

2条回答 默认 最新

  • dongxiezhuo8852 2016-12-29 07:12
    关注

    Here is the answer..

    Please try it once, Just copy and past this code..

    function allb_admin_page() {
      add_menu_page('ALLB Theme Options', 'ALLB', 'manage_options', 'a-legacy-left-behind', 'allb_theme_create_page', 110);
    
    }
    add_action('admin_menu','allb_admin_page');
    
    function allb_theme_create_page() {
      // genration of our admin page
    }
    

    I hope it'll help to you..

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料