Debug Bar Reports Warning
-
Hello,
The search box is working and we added your code snippet to a child theme to remove the submit button, but Debug bar is reporting the following:
WARNING: wp-includes/plugin.php:235 – call_user_func_array() expects parameter 1 to be a valid callback, function ‘myslug_nav_search_form’ not found or invalid function name
require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/customizr-pro/index.php’), do_action(‘__before_main_wrapper’), call_user_func_array, get_header, locate_template, load_template, require_once(‘/themes/customizr-pro/header.php’), do_action(‘__header’), call_user_func_array, TC_header_main->tc_navbar_display, apply_filters(‘tc_navbar_display’), call_user_func_array, TC_header_main->tc_new_menu_view, do_action(‘__navbar’), call_user_func_array, TC_menu->tc_menu_display, TC_menu->tc_regular_menu_display, TC_menu->tc_wp_nav_menu_view, wp_nav_menu, walk_nav_menu_tree, call_user_func_array, Walker->walk, TC_nav_walker->display_element, Walker->display_element, call_user_func_array, TC_nav_walker->start_el, Walker_Nav_Menu->start_el, apply_filters(‘walker_nav_menu_start_el’), call_user_func_array, Bop_Nav_Search_Box_Item->walker_nav_menu_start_el, apply_filters(‘bop_nav_search_show_submit_button’), call_user_func_arrayCan this warning be fixed?
We did add your code snippet to child theme to remove the submit button.
function myslug_show_search_submit( $bool, $item, $depth, $args ){
$bool = false;
return $bool;
}
add_filter( ‘bop_nav_search_show_submit_button’, ‘myslug_nav_search_form’, 10, 4 );NOTE: Could you please consider making the presence or absence of the submit button a user selectable option setting in a future release? Thanks!
https://ww.wp.xz.cn/plugins/bop-search-box-item-type-for-nav-menus/
The topic ‘Debug Bar Reports Warning’ is closed to new replies.