Skip to content
This repository has been archived by the owner. It is now read-only.

Fixing php warnings #154

Merged
merged 1 commit into from
Apr 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions inc/nav-drop-multi-walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function skip( $item ) {
* Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu".
* So basically add one to what you'd expect it to be
*/
function start_lvl(&$output, $depth, $args)
function start_lvl(&$output, $depth = 0, $args = array())
{
if(isset($args->with_search) && $args->with_search == true){
add_filter('wp_nav_menu_items', 'search_menu_item', 1, 2);
Expand All @@ -43,7 +43,7 @@ function start_lvl(&$output, $depth, $args)
* Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu".
* So basically add one to what you'd expect it to be
*/
function end_lvl(&$output, $depth)
function end_lvl(&$output, $depth = 0, $args = array())
{
if ($depth == 0) { // This is actually the end of the level-1 submenu ($depth is misleading here too!)

Expand All @@ -58,7 +58,7 @@ function end_lvl(&$output, $depth)
/* Output the <li> and the containing <a>
* Note: $depth is "correct" at this level
*/
function start_el(&$output, $item, $depth, $args)
function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
{
global $wp_query;
if ( $this->skip( $item ) ) return;
Expand Down Expand Up @@ -135,7 +135,7 @@ function start_el(&$output, $item, $depth, $args)
* Note: the <a> is already closed
* Note 2: $depth is "correct" at this level
*/
function end_el (&$output, $item, $depth, $args)
function end_el (&$output, $item, $depth = 0, $args = array())
{
if ( $this->skip( $item ) ) return;
$output .= '</li>';
Expand Down
16 changes: 8 additions & 8 deletions inc/nav-tabs-walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function skip( $item ) {
* Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu".
* So basically add one to what you'd expect it to be
*/
function start_lvl(&$output, $depth, $args)
function start_lvl(&$output, $depth = 0, $args = array())
{
if(isset($args->with_search) && $args->with_search == true){
add_filter('wp_nav_menu_items', 'search_menu_item', 1, 2);
Expand All @@ -43,7 +43,7 @@ function start_lvl(&$output, $depth, $args)
* Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu".
* So basically add one to what you'd expect it to be
*/
function end_lvl(&$output, $depth)
function end_lvl(&$output, $depth = 0, $args = array())
{
if ($depth == 0) { // This is actually the end of the level-1 submenu ($depth is misleading here too!)

Expand All @@ -58,7 +58,7 @@ function end_lvl(&$output, $depth)
/* Output the <li> and the containing <a>
* Note: $depth is "correct" at this level
*/
function start_el(&$output, $item, $depth, $args)
function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
{
global $wp_query;
if ( $this->skip( $item ) ) return;
Expand Down Expand Up @@ -123,7 +123,7 @@ function start_el(&$output, $item, $depth, $args)
* Note: the <a> is already closed
* Note 2: $depth is "correct" at this level
*/
function end_el (&$output, $item, $depth, $args)
function end_el (&$output, $item, $depth = 0, $args = array())
{
if ( $this->skip( $item ) ) return;
$output .= '</li>';
Expand Down Expand Up @@ -179,7 +179,7 @@ function skip( $item ) {
* Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu".
* So basically add one to what you'd expect it to be
*/
function start_lvl(&$output, $depth, $args)
function start_lvl(&$output, $depth = 0, $args = array())
{
if(isset($args->with_search) && $args->with_search == true){
add_filter('wp_nav_menu_items', 'search_menu_item', 1, 2);
Expand All @@ -198,7 +198,7 @@ function start_lvl(&$output, $depth, $args)
* Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu".
* So basically add one to what you'd expect it to be
*/
function end_lvl(&$output, $depth)
function end_lvl(&$output, $depth = 0, $args = array())
{
if ($depth == 1) { // This is actually the end of the level-1 submenu ($depth is misleading here too!)

Expand All @@ -215,7 +215,7 @@ function end_lvl(&$output, $depth)
/* Output the <li> and the containing <a>
* Note: $depth is "correct" at this level
*/
function start_el(&$output, $item, $depth, $args)
function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0 )
{
global $wp_query;
if ( $this->skip( $item ) ) return;
Expand Down Expand Up @@ -297,7 +297,7 @@ function start_el(&$output, $item, $depth, $args)
* Note: the <a> is already closed
* Note 2: $depth is "correct" at this level
*/
function end_el (&$output, $item, $depth, $args)
function end_el (&$output, $item, $depth = 0, $args = array())
{
if ( $this->skip( $item ) ) return;
$output .= '</li>';
Expand Down
16 changes: 8 additions & 8 deletions inc/nav-walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function skip( $item ) {
* Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu".
* So basically add one to what you'd expect it to be
*/
function start_lvl(&$output, $depth, $args)
function start_lvl(&$output, $depth = 0, $args = array())
{
if(isset($args->with_search) && $args->with_search == true){
add_filter('wp_nav_menu_items', 'search_menu_item', 1, 2);
Expand All @@ -43,7 +43,7 @@ function start_lvl(&$output, $depth, $args)
* Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu".
* So basically add one to what you'd expect it to be
*/
function end_lvl(&$output, $depth)
function end_lvl(&$output, $depth = 0, $args = array())
{
if ($depth == 0) { // This is actually the end of the level-1 submenu ($depth is misleading here too!)

Expand All @@ -58,7 +58,7 @@ function end_lvl(&$output, $depth)
/* Output the <li> and the containing <a>
* Note: $depth is "correct" at this level
*/
function start_el(&$output, $item, $depth, $args)
function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
{
global $wp_query;
if ( $this->skip( $item ) ) return;
Expand Down Expand Up @@ -135,7 +135,7 @@ function start_el(&$output, $item, $depth, $args)
* Note: the <a> is already closed
* Note 2: $depth is "correct" at this level
*/
function end_el (&$output, $item, $depth, $args)
function end_el (&$output, $item, $depth = 0, $args = array())
{
if ( $this->skip( $item ) ) return;
$output .= '</li>';
Expand Down Expand Up @@ -176,7 +176,7 @@ class Secondary_Bootstrap_Nav_Walker extends Walker_Nav_Menu {
* Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu".
* So basically add one to what you'd expect it to be
*/
function start_lvl(&$output, $depth, $args)
function start_lvl(&$output, $depth = 0, $args = array())
{
if(isset($args->with_search) && $args->with_search == true){
add_filter('wp_nav_menu_items', 'search_menu_item', 1, 2);
Expand All @@ -197,7 +197,7 @@ function start_lvl(&$output, $depth, $args)
* Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu".
* So basically add one to what you'd expect it to be
*/
function end_lvl(&$output, $depth)
function end_lvl(&$output, $depth = 0, $args = array())
{
$tabs = str_repeat("\t", $depth);
$output .= "\n{$tabs}</ul>\n";
Expand All @@ -207,7 +207,7 @@ function end_lvl(&$output, $depth)
/* Output the <li> and the containing <a>
* Note: $depth is "correct" at this level
*/
function start_el(&$output, $item, $depth, $args)
function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
{
global $wp_query;
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
Expand Down Expand Up @@ -276,7 +276,7 @@ function start_el(&$output, $item, $depth, $args)
* Note: the <a> is already closed
* Note 2: $depth is "correct" at this level
*/
function end_el (&$output, $item, $depth, $args)
function end_el (&$output, $item, $depth = 0, $args = array())
{
$output .= '</li>';
return;
Expand Down