Doing it Wrong Error in broken-link-checker\core\core.php:97
-
Broken Link Checker throws the following notice in the WordPress dashboard:
PHP Notice: convert_to_screen(), add_meta_box() was called incorrectly. Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead. Please see Debugging in WordPress for more information. (This message was added in version 3.3.)
This can be fixed by moving this function call starting on line 89 of broken-link-checker\core\core.php:
//Add a "Screen Options" panel to the "Broken Links" page add_screen_options_panel( 'blc-screen-options', '', array(&$this, 'screen_options_html'), 'tools_page_view-broken-links', array(&$this, 'ajax_save_screen_options'), true );
to a separate function hooked by
add_action( 'add_meta_boxes', '{new function name}');
For example, the code at line 89 could be replaced with
add_action( 'add_meta_boxes', array(&$this,'add_screen_options_panel') );
and then anadd_screen_options_panel
function could be added to thewsBrokenLinkChecker
class that contains the code that used to start on line 89.
- The topic ‘Doing it Wrong Error in broken-link-checker\core\core.php:97’ is closed to new replies.