I have this error show up in my error_log.

PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wp_force_remove_style' not found or invalid function name in wp-includes/class-wp-hook.php on line 287

I will appreciate your advice as to how to fix this.

Thank you.

1 Answer 1


You have an action, but not the valid callback for your action.

For example,

You have somewhere following line:

add_action( 'some_action', 'wp_force_remove_style' );

But not have "wp_force_remove_style" function defined.

You have to have a function as following:

function wp_force_remove_style() {
    // Do you stuff.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.