Wordpress - Error: call_user_func_array() expects parameter 1 to be a valid callback
Somewhere in your theme or plugins is a line like this:
add_filter( 'something', 'regis_options' );
Could also be add_action()
. Find that piece of code and remove or fix it.
The other errors are a result of the first one. The printed error message causes output and hence HTTP headers, so PHP/WP cannot send other headers anymore. They will go away when you fix the first error.
Warning: call_user_func_array()
It is usually caused by a filter or an action not properly declared.
add_filter ( 'action_tag' , array( $this , 'my_callback' ) , 30 );
The priority must be outside the callback array parameter. this fixed my issue.
Hi try this solution :
Add this in functions.php:
function regis_options($args) {
return $args;
}
Also add this in your class-wp-hook.php:
public function regis_options($args) {
echo '<pre>' . var_export($args, true) . '</pre>';
echo '<pre>' . var_dump(debug_backtrace()) . '</pre>';
return $args;
}