PHP error…
-
I keep getting this error on the front end:
“Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘addmetawebcapablelinks’ not found or invalid function name in…\wp-includes\class-wp-hook.php”
On the backend, I was getting this error:
“Warning: include(…/wp-content/plugins/add-to-home-screen-wp/options.php): failed to open stream: No such file or directory in …\assets\plugins\add-to-home-screen-wp\index.php on line 80”
I fixed the second error by changing line 80 on the file add-to-home-screen-wp\index.php from:
include(self::file_path(‘options.php’));
to:
include plugin_dir_path(__FILE__).’options.php’;
But I have no idea where the problem is for the error on the front. You might want to think about using native WordPress functions for file/directory paths instead of whatever that “self::file_path” is. Makes it a lot less likely your plugin with throw errors.
- The topic ‘PHP error…’ is closed to new replies.