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

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #154 from jmr06005/master
Fixing php warnings
  • Loading branch information
jmr06005 committed Apr 20, 2017
2 parents cb068ee + df03d5e commit 8896a3b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions inc/nav-drop-multi-walker.php
Expand Up @@ -22,7 +22,7 @@ if(!class_exists('Drop_Multi_Nav_Walker')) {
* 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 @@ if(!class_exists('Drop_Multi_Nav_Walker')) {
* 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 @@ if(!class_exists('Drop_Multi_Nav_Walker')) {
/* 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 @@ if(!class_exists('Drop_Multi_Nav_Walker')) {
* 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
Expand Up @@ -22,7 +22,7 @@ if(!class_exists('Top_Tabs_Nav_Walker')) {
* 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 @@ if(!class_exists('Top_Tabs_Nav_Walker')) {
* 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 @@ if(!class_exists('Top_Tabs_Nav_Walker')) {
/* 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 @@ if(!class_exists('Top_Tabs_Nav_Walker')) {
* 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 @@ if(!class_exists('Tabs_Drop_Nav_Walker')) {
* 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 @@ if(!class_exists('Tabs_Drop_Nav_Walker')) {
* 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 @@ if(!class_exists('Tabs_Drop_Nav_Walker')) {
/* 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 @@ if(!class_exists('Tabs_Drop_Nav_Walker')) {
* 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
Expand Up @@ -22,7 +22,7 @@ if(!class_exists('Bootstrap_Nav_Walker')) {
* 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 @@ if(!class_exists('Bootstrap_Nav_Walker')) {
* 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 @@ if(!class_exists('Bootstrap_Nav_Walker')) {
/* 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 @@ if(!class_exists('Bootstrap_Nav_Walker')) {
* 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 @@ if(!class_exists('Secondary_Bootstrap_Nav_Walker')) {
* 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 @@ if(!class_exists('Secondary_Bootstrap_Nav_Walker')) {
* 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 @@ if(!class_exists('Secondary_Bootstrap_Nav_Walker')) {
/* 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 @@ if(!class_exists('Secondary_Bootstrap_Nav_Walker')) {
* 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

0 comments on commit 8896a3b

Please sign in to comment.