最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

call_user_func_array expects parameter 1 to be a valid callback

programmeradmin3浏览0评论

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wp_my_admin_enqueue_scripts' not found or invalid function name in /mnt/data/vhosts/casite-961871.cloudaccess/httpdocs/wp-includes/class-wp-hook.php on line 286

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wp_my_admin_enqueue_scripts' not found or invalid function name in /mnt/data/vhosts/casite-961871.cloudaccess/httpdocs/wp-includes/class-wp-hook.php on line 286

Share Improve this question edited Nov 30, 2018 at 21:50 jdm2112 3,6851 gold badge17 silver badges23 bronze badges asked Nov 29, 2018 at 18:32 Alan RossAlan Ross 111 gold badge1 silver badge2 bronze badges 1
  • Welcome to WPSE, Alan. You're going to need to edit your question and provide some context as to what is happening. Be descriptive so people can help. Just posting an error without any context to it make it difficult for people to provide an answer. – butlerblog Commented Nov 29, 2018 at 18:52
Add a comment  | 

2 Answers 2

Reset to default 2

This means you have a function named wp_my_admin_enqueue_scripts hooked to an action, either in your theme or a plugin, but that function name is not available to WordPress for some reason.

When that action fires, any functions "hooked" to it are executed by WordPress. If one of the hooked functions is not available, this is the error presented.

For example, in the sample code below the function named sc_corporate_widgets_init is executed when WordPress fires the widgets_init action.

add_action( 'widgets_init', 'sc_corporate_widgets_init' );

Make sure you do not have a spelling error with a function name. They must match exactly in order to prevent this error.

This error means that you have a wrong action (hook). meaning the code is trying to call a function that does not exists. But, from the path the error is coming from, I think:

  1. you may have tried to change the core code
  2. or more likley that your WordPress install is not complete, and you are missing files.
发布评论

评论列表(0)

  1. 暂无评论