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
This commit is contained in:
bruceconlon 2017-11-22 11:59:58 +13:00 committed by GitHub
parent 49e80e353b
commit 038675e6c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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 */