Skip to content

Commit 16de2a8

Browse files
fix "Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method wp_bootstrap_navwalker::fallback()" message
1 parent 14ea510 commit 16de2a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wp_bootstrap_navwalker.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class wp_bootstrap_navwalker extends Walker_Nav_Menu {
1919
* @param string $output Passed by reference. Used to append additional content.
2020
* @param int $depth Depth of page. Used for padding.
2121
*/
22-
function start_lvl( &$output, $depth = 0, $args = array() ) {
22+
public function start_lvl( &$output, $depth = 0, $args = array() ) {
2323
$indent = str_repeat("\t", $depth);
2424
$output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n";
2525
}
@@ -34,7 +34,7 @@ function start_lvl( &$output, $depth = 0, $args = array() ) {
3434
* @param int $current_page Menu item ID.
3535
* @param object $args
3636
*/
37-
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
37+
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
3838
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
3939

4040
/**
@@ -141,7 +141,7 @@ function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
141141
* @param string $output Passed by reference. Used to append additional content.
142142
* @return null Null on failure with no changes to parameters.
143143
*/
144-
function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
144+
public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
145145
if ( ! $element )
146146
return;
147147

@@ -165,7 +165,7 @@ function display_element( $element, &$children_elements, $max_depth, $depth, $ar
165165
* @param array $args passed from the wp_nav_menu function.
166166
*
167167
*/
168-
function fallback( $args ) {
168+
public static function fallback( $args ) {
169169
if ( current_user_can( 'manage_options' ) ) {
170170

171171
extract( $args );

0 commit comments

Comments
 (0)