From 4f0295ebea3f5a50a2a814aef9b2e37040da2e71 Mon Sep 17 00:00:00 2001 From: William Patton Date: Tue, 17 Apr 2018 17:10:40 +0100 Subject: [PATCH] Modify walker with 'understarp' prefixed on class name and as textdomain --- header.php | 2 +- inc/class-wp-bootstrap-navwalker.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/header.php b/header.php index ec81538..9af38b8 100644 --- a/header.php +++ b/header.php @@ -70,7 +70,7 @@ $container = get_theme_mod( 'understrap_container_type' ); 'fallback_cb' => '', 'menu_id' => 'main-menu', 'depth' => 2, - 'walker' => new WP_Bootstrap_Navwalker(), + 'walker' => new Understrap_WP_Bootstrap_Navwalker(), ) ); ?> diff --git a/inc/class-wp-bootstrap-navwalker.php b/inc/class-wp-bootstrap-navwalker.php index cd598e1..71b52d9 100644 --- a/inc/class-wp-bootstrap-navwalker.php +++ b/inc/class-wp-bootstrap-navwalker.php @@ -20,13 +20,13 @@ */ /* Check if Class Exists. */ -if ( ! class_exists( 'WP_Bootstrap_Navwalker' ) ) { +if ( ! class_exists( 'Understrap_WP_Bootstrap_Navwalker' ) ) { /** * WP_Bootstrap_Navwalker class. * * @extends Walker_Nav_Menu */ - class WP_Bootstrap_Navwalker extends Walker_Nav_Menu { + class Understrap_WP_Bootstrap_Navwalker extends Walker_Nav_Menu { /** * Starts the list before the elements are added. @@ -363,7 +363,7 @@ if ( ! class_exists( 'WP_Bootstrap_Navwalker' ) ) { if ( $menu_class ) { $fallback_output .= ' class="' . esc_attr( $menu_class ) . '"'; } $fallback_output .= '>'; - $fallback_output .= '
  • ' . esc_html__( 'Add a menu', 'wp-bootstrap-navwalker' ) . '
  • '; + $fallback_output .= '
  • ' . esc_html__( 'Add a menu', 'understrap' ) . '
  • '; $fallback_output .= ''; if ( $container ) { $fallback_output .= '';