• 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.

Viewing 1 replies (of 1 total)
  • Thread Starter gmsdwx

    (@gmsdwx)

    Found the problem with the front end error. In the index.php file on line 309,

    if (!get_option(‘addmetawebcapablelinks’)) {
    add_action(‘wp_head’, ‘addmetawebcapablelinks’, 3);
    }

    needs to be changed to:

    if (get_option(‘addmetawebcapablelinks’)) {
    add_action(‘wp_head’, ‘addmetawebcapablelinks’, 3);
    }

    Apparently the “addmetawebcapablelinks” function no longer exists. I can’t find it anywhere. So that probably should go away altogether.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP error…’ is closed to new replies.