From 038675e6c988cfdba9119226a206ee498010be62 Mon Sep 17 00:00:00 2001 From: bruceconlon Date: Wed, 22 Nov 2017 11:59:58 +1300 Subject: [PATCH] Making the class pluggable As it would not affect any other users of the parent/child theme, placing a request that the fucntion first checks if the class exits, so it could be overridden in a child theme if needed --- inc/bootstrap-wp-navwalker.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/bootstrap-wp-navwalker.php b/inc/bootstrap-wp-navwalker.php index 0d43046..7b0810d 100644 --- a/inc/bootstrap-wp-navwalker.php +++ b/inc/bootstrap-wp-navwalker.php @@ -11,6 +11,8 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } +if (! class_exists ( 'WP_Bootstrap_Navwalker' )) : + /** * Class WP_Bootstrap_Navwalker * GitHub URI: https://github.com/twittem/wp-bootstrap-navwalker @@ -210,3 +212,5 @@ class WP_Bootstrap_Navwalker extends Walker_Nav_Menu { } } } + +endif; /* End if class exists */