1
我必須執行此操作:add_options_page在名爲功能
add_action('admin_menu', function(){
add_options_page(
'Submissions of MAIN page contact form',
'Submissions of MAIN page contact form',
'manage_options',
'ea_submissions2',
news()
);
});
在PHP 5.2匿名函數不支持,所以我做了以下內容:
function news_opt(){
add_options_page(
'Submissions of MAIN page contact form',
'Submissions of MAIN page contact form',
'manage_options',
'ea_submissions2',
news()
);
}
add_action('admin_menu', news_opt());
在這之後我得到致命錯誤:調用未定義的函數add_options_page()錯誤。什麼是問題?
感謝兄弟,已經在法典中找到它 – Zheka