Supress warnings in Wordpress Walker classes

This commit is contained in:
2019-01-11 20:42:54 +00:00
parent 13be91aff0
commit c90f11a127
2 changed files with 8 additions and 8 deletions

View File

@@ -1,15 +1,15 @@
<?php
class Windycoys_Walker_Comments extends Walker_Comment {
function start_lvl(&$output) {
function start_lvl(&$output, $depth = 0, $args = Array()) {
$output .= '<ol class="comments__list comments__list--sub-list">';
}
function end_lvl(&$output) {
function end_lvl(&$output, $depth = 0, $args = Array()) {
$output .= '</ol>';
}
function start_el(&$output, $comment) {
function start_el(&$output, $comment, $depth = 0 , $args = Array(), $id = 0) {
$id = $comment->comment_ID;
$post_id = $comment->comment_post_ID;
$reply_link = get_permalink($post_id) . '?replytocom='.$id.'#respond';
@@ -41,7 +41,7 @@ class Windycoys_Walker_Comments extends Walker_Comment {
$output .= '</div></div>';
}
function end_el(&$output) {
function end_el(&$output, $comment, $depth = 0, $args = Array()) {
$output .= '</li>';
}
}

View File

@@ -1,15 +1,15 @@
<?php
class Windycoys_Walker_Navigation extends Walker_Nav_Menu {
function start_lvl(&$output, $depth = 0) {
function start_lvl(&$output, $depth = 0, $args = Array()) {
$output .= '<ul class="nav__list">';
}
function end_lvl(&$output) {
function end_lvl(&$output, $depth = 0, $args = Array()) {
$output .= '</ul>';
}
function start_el(&$output, $item) {
function start_el(&$output, $item, $depth = 0, $args = Array(), $id = 0) {
$title = $item->title;
$url = $item->url;
if ($title && $url) {
@@ -20,7 +20,7 @@ class Windycoys_Walker_Navigation extends Walker_Nav_Menu {
}
}
function end_el(&$output) {
function end_el(&$output, $item, $depth = 0, $args = Array()) {
$output .= '</li>';
}
}