diff --git a/src/Loader.php b/src/Loader.php index 7c558556..ab6bbbab 100644 --- a/src/Loader.php +++ b/src/Loader.php @@ -278,7 +278,7 @@ final class Loader { ], ], 'float_widget' => [ - 'button' => 'Toggle Help Widget', + 'button' => 'Toggle Help Widget for %s', 'panel' => [ 'greeting' => 'Thank you for using %s', 'title' => 'How can we help you?', diff --git a/src/Modules/Float_widget.php b/src/Modules/Float_widget.php index 2b11358c..ad4bbae9 100644 --- a/src/Modules/Float_widget.php +++ b/src/Modules/Float_widget.php @@ -185,7 +185,7 @@ private function get_float_localization_data() { 'logoUrl' => $this->float_widget_data['logo'], 'primaryColor' => esc_attr( $this->float_widget_data['primary_color'] ), 'strings' => [ - 'toggleButton' => Loader::$labels['float_widget']['button'], + 'toggleButton' => sprintf( Loader::$labels['float_widget']['button'], $this->float_widget_data['nice_name'] ), 'panelGreet' => sprintf( Loader::$labels['float_widget']['panel']['greeting'], $this->float_widget_data['nice_name'] ), 'panelTitle' => Loader::$labels['float_widget']['panel']['title'], 'closeToggle' => Loader::$labels['float_widget']['panel']['close'],